0.7.6:
[sbcl.git] / tools-for-build / grovel_headers.c
index 4e7afbe..0d33082 100644 (file)
 #include <sys/types.h>
 #include <sys/times.h>
 #include <sys/stat.h>
+#include <sys/wait.h>
 #include <fcntl.h>
 #include <unistd.h>
 
 #define DEFTYPE(lispname,cname) { cname foo; \
-    printf("(define-alien-type "##lispname##" (%s %d))\n", (((foo=-1)<0) ? "sb!alien:signed" : "unsigned"), (8 * (sizeof foo))); }
+    printf("(define-alien-type " lispname " (%s %d))\n", (((foo=-1)<0) ? "sb!alien:signed" : "unsigned"), (8 * (sizeof foo))); }
 
 void
 defconstant(char* lisp_name, long unix_number)
@@ -46,9 +47,9 @@ main(int argc, char *argv[])
 
     /* don't need no steenking hand-editing */
     printf(
-";;;; This is an automatically generated file, please do not hand-edit it.
-;;;; See the program \"grovel_headers.c\".
-
+";;;; This is an automatically generated file, please do not hand-edit it.\n\
+;;;; See the program \"grovel_headers.c\".\n\
+\n\
 ");
 
     printf("(in-package \"SB!UNIX\")\n\n");
@@ -96,5 +97,10 @@ main(int argc, char *argv[])
     defconstant("s-ifsock", S_IFSOCK);
     printf("\n");
 
+    printf(";;; for wait3(2) in run-program.lisp\n");
+    defconstant("wnohang", WNOHANG);
+    defconstant("wuntraced", WUNTRACED);
+    printf("\n");
+
     return 0;
 }