X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tools-for-build%2Fgrovel-headers.c;h=dc5005416de3f9624caca2f4035fc9ffdd9dcb48;hb=771b864c8f32af7734bc0550aeaf1539fc4df194;hp=facc3f8273225cc081ad2c8339e782103a985d3c;hpb=dcf5978d9d33098e868ae6eea28e1b310038c03d;p=sbcl.git diff --git a/tools-for-build/grovel-headers.c b/tools-for-build/grovel-headers.c index facc3f8..dc50054 100644 --- a/tools-for-build/grovel-headers.c +++ b/tools-for-build/grovel-headers.c @@ -28,6 +28,8 @@ #include #include #include +#include +#include #include "genesis/config.h" @@ -41,6 +43,7 @@ defconstant(char* lisp_name, long unix_number) lisp_name, unix_number, unix_number); } +#define DEFERRNO(name) defconstant(#name, name) #define DEFSIGNAL(name) defconstant(#name, name) int @@ -59,6 +62,14 @@ main(int argc, char *argv[]) \n\ "); + printf("(in-package \"SB!ALIEN\")\n\n"); + + printf (";;;flags for dlopen()\n"); + + defconstant ("rtld-lazy", RTLD_LAZY); + defconstant ("rtld-now", RTLD_NOW); + defconstant ("rtld-global", RTLD_GLOBAL); + printf("(in-package \"SB!UNIX\")\n\n"); printf(";;; types, types, types\n"); @@ -74,7 +85,7 @@ main(int argc, char *argv[]) DEFTYPE("uid-t", uid_t); printf("\n"); - printf(";;; fcntl.h (or unistd.h on OpenBSD)\n"); + printf(";;; fcntl.h (or unistd.h on OpenBSD and NetBSD)\n"); defconstant("r_ok", R_OK); defconstant("w_ok", W_OK); defconstant("x_ok", X_OK); @@ -104,6 +115,15 @@ main(int argc, char *argv[]) defconstant("s-ifsock", S_IFSOCK); printf("\n"); + printf(";;; error numbers\n"); + DEFERRNO(ENOENT); + DEFERRNO(EINTR); + DEFERRNO(EIO); + DEFERRNO(EEXIST); + DEFERRNO(ESPIPE); + DEFERRNO(EWOULDBLOCK); + printf("\n"); + printf(";;; for wait3(2) in run-program.lisp\n"); defconstant("wnohang", WNOHANG); defconstant("wuntraced", WUNTRACED); @@ -149,8 +169,7 @@ main(int argc, char *argv[]) DEFSIGNAL(SIGBUS); DEFSIGNAL(SIGCHLD); DEFSIGNAL(SIGCONT); -/* FIXME: Maybe #ifdef SIGEMT would be a smarter conditional? */ -#if (!(defined LISP_FEATURE_LINUX) || !((defined LISP_FEATURE_PPC) || (defined LISP_FEATURE_X86))) +#ifdef SIGEMT DEFSIGNAL(SIGEMT); #endif DEFSIGNAL(SIGFPE);