Anonymous avatar Anonymous committed b73eee5

Nicer checks code AKA thou shalt not warn.

Comments (0)

Files changed (1)

 	printf '#define _GNU_SOURCE 1\n#include <getopt.h>\nint main(int argc, char *argv[]) { getopt_long(argc, argv, "", 0, 0); return 0; }\n' > $@
 
 check-sysexits.c:
-	printf '#define _BSD_SOURCE 1\n#include <sysexits.h>\nint main(int argc, char *argv[]) { int test = EX_IOERR; return EX_OK; }\n' > $@
+	printf '#define _BSD_SOURCE 1\n#include <sysexits.h>\nint main(int argc, char *argv[]) { return EX_OK + EX_IOERR; }\n' > $@
 
 check-mmapio.c:
-	printf '#define _POSIX_C_SOURCE 200112L\n#include <unistd.h>\n#include <sys/types.h>\n#include <sys/mman.h>\nint main(void) { ftruncate(0, 0); mmap(0, 0, 0, 0, 0, 0); }\n' > $@
+	printf '#define _POSIX_C_SOURCE 200112L\n#include <unistd.h>\n#include <sys/types.h>\n#include <sys/mman.h>\nint main(void) { return (ftruncate(0, 0) || mmap(0, 0, 0, 0, 0, 0) == MAP_FAILED); }\n' > $@
 
 clean:
 	rm -f $(PROG) $(OBJS) $(CONFIGOUT)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.