Apply some touchups

This commit is contained in:
Justine Tunney 2021-02-07 06:11:44 -08:00
parent 9f149e1de3
commit 2f3bd90216
139 changed files with 1188 additions and 1154 deletions

View file

@ -1,11 +1,14 @@
int main(int argc, char *argv[]) {
int rc;
char *s;
FILE *f;
s = strdup(argv[0]);
f = fopen("/dev/null", "w");
fprintf(f, "hello world %d\n", argc);
fprintf(f, "hello world %d %s\n", argc, s);
fclose(f);
rc = system("exit 42");
CHECK_NE(-1, rc);
CHECK_EQ(42, WEXITSTATUS(rc));
free(s);
return 0;
}

View file

@ -20,7 +20,7 @@ o/$(MODE)/test/libc/release/smoke.com.dbg: \
o/$(MODE)/libc/crt/crt.o \
o/$(MODE)/ape/ape.o \
o/$(MODE)/cosmopolitan.a
@ACTION=CC build/compile $(CC) \
@ACTION=CC $(COMPILE) $(CC) \
-o $@ \
-Os \
-static \
@ -49,7 +49,7 @@ o/$(MODE)/test/libc/release/smokecxx.com.dbg: \
o/$(MODE)/libc/crt/crt.o \
o/$(MODE)/ape/ape.o \
o/$(MODE)/cosmopolitan.a
@ACTION=CXX build/compile $(CXX) \
@ACTION=CXX $(COMPILE) $(CXX) \
-o $@ \
-Os \
-static \
@ -74,7 +74,7 @@ o/$(MODE)/test/libc/release/smokeansi.com.dbg: \
o/$(MODE)/libc/crt/crt.o \
o/$(MODE)/ape/ape.o \
o/$(MODE)/cosmopolitan.a
@ACTION=ANSI build/compile $(CC) \
@ACTION=ANSI $(COMPILE) $(CC) \
-o $@ \
-Os \
-ansi \
@ -100,7 +100,7 @@ o/$(MODE)/test/libc/release/smokeclang.com.dbg: \
o/$(MODE)/libc/crt/crt.o \
o/$(MODE)/ape/ape.o \
o/$(MODE)/cosmopolitan.a
@ACTION=CLANG build/compile clang \
@ACTION=CLANG $(COMPILE) clang \
-o $@ \
-Os \
-static \
@ -125,4 +125,6 @@ o/$(MODE)/test/libc/release: \
o/$(MODE)/test/libc/release/smokecxx.com \
o/$(MODE)/test/libc/release/smokecxx.com.runs \
o/$(MODE)/test/libc/release/smokeansi.com \
o/$(MODE)/test/libc/release/smokeansi.com.runs
o/$(MODE)/test/libc/release/smokeansi.com.runs \
o/$(MODE)/test/libc/release/smokeclang.com \
o/$(MODE)/test/libc/release/smokeclang.com.runs