Fix cosmopolitan.h for C++
We now have an integration test that runs the amalgamated sources through a C++ compiler, to prevent the recurrence of such issues. Fixes #38 Thanks @gbbnfhb for the report!
This commit is contained in:
11
test/libc/release/smokecxx.cc
Normal file
11
test/libc/release/smokecxx.cc
Normal file
@@ -0,0 +1,11 @@
|
||||
int main() {
|
||||
int rc;
|
||||
FILE *f;
|
||||
f = fopen("/dev/null", "w");
|
||||
fprintf(f, "hello world\n");
|
||||
fclose(f);
|
||||
rc = system("exit 42");
|
||||
CHECK_NE(-1, rc);
|
||||
CHECK_EQ(42, WEXITSTATUS(rc));
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user