mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-25 20:10:29 +00:00
Add syscalls to Blinkenlights and fix bugs
This commit is contained in:
parent
f6df29cc3d
commit
578cb21591
25 changed files with 187 additions and 108 deletions
6
third_party/getopt/getopt.c
vendored
6
third_party/getopt/getopt.c
vendored
|
@ -79,8 +79,10 @@ hidden char *getopt_place;
|
|||
char kGetoptEmsg[1] hidden;
|
||||
|
||||
static void getopt_print_badch(const char *s) {
|
||||
fputs(program_invocation_name, stderr);
|
||||
fputs(": ", stderr);
|
||||
if (program_invocation_name) {
|
||||
fputs(program_invocation_name, stderr);
|
||||
fputs(": ", stderr);
|
||||
}
|
||||
fputs(s, stderr);
|
||||
fputs(" -- ", stderr);
|
||||
fputc(optopt, stderr);
|
||||
|
|
3
third_party/make/getprogname.c
vendored
3
third_party/make/getprogname.c
vendored
|
@ -17,12 +17,13 @@
|
|||
/* clang-format off */
|
||||
#include "third_party/make/config.h"
|
||||
#include "third_party/make/getprogname.h"
|
||||
#include "libc/bits/safemacros.internal.h"
|
||||
#include "third_party/make/dirname.h"
|
||||
|
||||
char const *
|
||||
getprogname (void)
|
||||
{
|
||||
return program_invocation_short_name;
|
||||
return firstnonnull(program_invocation_short_name, "unknown");
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
5
third_party/mbedtls/test/lib.c
vendored
5
third_party/mbedtls/test/lib.c
vendored
|
@ -16,6 +16,7 @@
|
|||
*/
|
||||
#include "libc/assert.h"
|
||||
#include "libc/bits/bits.h"
|
||||
#include "libc/bits/safemacros.internal.h"
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/dce.h"
|
||||
#include "libc/fmt/conv.h"
|
||||
|
@ -1011,8 +1012,8 @@ int execute_tests(int argc, const char **argv, const char *default_filename) {
|
|||
file = fopen(test_filename, "r");
|
||||
if (file == NULL) {
|
||||
WRITE("%s (%s) failed to open test file: %s %m\n",
|
||||
program_invocation_short_name, GetProgramExecutableName(),
|
||||
test_filename);
|
||||
firstnonnull(program_invocation_short_name, "unknown"),
|
||||
GetProgramExecutableName(), test_filename);
|
||||
if (outcome_file != NULL) fclose(outcome_file);
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue