X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tools-for-build%2Fgrovel-headers.c;h=cf02e27ee60fbae09555807048fd0f0f8566a9f1;hb=7c7e6276719b8d40fddec2070cad81064a25c8ed;hp=b117233eda72ec0df12ea743359a059b68787be0;hpb=d1355f6b79af346f05cf21c18637e269e0b499a1;p=sbcl.git diff --git a/tools-for-build/grovel-headers.c b/tools-for-build/grovel-headers.c index b117233..cf02e27 100644 --- a/tools-for-build/grovel-headers.c +++ b/tools-for-build/grovel-headers.c @@ -29,8 +29,13 @@ #include #include #include -#include -#include +#ifdef __APPLE_CC__ + #include "../src/runtime/ppc-darwin-dlshim.h" + #include "../src/runtime/ppc-darwin-langinfo.h" +#else + #include + #include +#endif #include "genesis/config.h" @@ -44,8 +49,15 @@ 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) +void deferrno(char* lisp_name, long unix_number) +{ + defconstant(lisp_name, unix_number); +} + +void defsignal(char* lisp_name, long unix_number) +{ + defconstant(lisp_name, unix_number); +} int main(int argc, char *argv[]) @@ -120,12 +132,12 @@ main(int argc, char *argv[]) printf("\n"); printf(";;; error numbers\n"); - DEFERRNO(ENOENT); - DEFERRNO(EINTR); - DEFERRNO(EIO); - DEFERRNO(EEXIST); - DEFERRNO(ESPIPE); - DEFERRNO(EWOULDBLOCK); + deferrno("enoent", ENOENT); + deferrno("eintr", EINTR); + deferrno("eio", EIO); + deferrno("eexist", EEXIST); + deferrno("espipe", ESPIPE); + deferrno("ewouldblock", EWOULDBLOCK); printf("\n"); printf(";;; for wait3(2) in run-program.lisp\n"); @@ -169,47 +181,47 @@ main(int argc, char *argv[]) printf("\n"); printf(";;; signals\n"); - DEFSIGNAL(SIGALRM); - DEFSIGNAL(SIGBUS); - DEFSIGNAL(SIGCHLD); - DEFSIGNAL(SIGCONT); + defsignal("sigalrm", SIGALRM); + defsignal("sigbus", SIGBUS); + defsignal("sigchld", SIGCHLD); + defsignal("sigcont", SIGCONT); #ifdef SIGEMT - DEFSIGNAL(SIGEMT); + defsignal("sigemt", SIGEMT); #endif - DEFSIGNAL(SIGFPE); - DEFSIGNAL(SIGHUP); - DEFSIGNAL(SIGILL); - DEFSIGNAL(SIGINT); - DEFSIGNAL(SIGIO); - DEFSIGNAL(SIGIOT); - DEFSIGNAL(SIGKILL); - DEFSIGNAL(SIGPIPE); - DEFSIGNAL(SIGPROF); - DEFSIGNAL(SIGQUIT); - DEFSIGNAL(SIGSEGV); + defsignal("sigfpe", SIGFPE); + defsignal("sighup", SIGHUP); + defsignal("sigill", SIGILL); + defsignal("sigint", SIGINT); + defsignal("sigio", SIGIO); + defsignal("sigiot", SIGIOT); + defsignal("sigkill", SIGKILL); + defsignal("sigpipe", SIGPIPE); + defsignal("sigprof", SIGPROF); + defsignal("sigquit", SIGQUIT); + defsignal("sigsegv", SIGSEGV); #if ((defined LISP_FEATURE_LINUX) && (defined LISP_FEATURE_X86)) - DEFSIGNAL(SIGSTKFLT); + defsignal("sigstkflt", SIGSTKFLT); #endif - DEFSIGNAL(SIGSTOP); + defsignal("sigstop", SIGSTOP); #if (!((defined LISP_FEATURE_LINUX) && (defined LISP_FEATURE_X86))) - DEFSIGNAL(SIGSYS); + defsignal("sigsys", SIGSYS); #endif - DEFSIGNAL(SIGTERM); - DEFSIGNAL(SIGTRAP); - DEFSIGNAL(SIGTSTP); - DEFSIGNAL(SIGTTIN); - DEFSIGNAL(SIGTTOU); - DEFSIGNAL(SIGURG); - DEFSIGNAL(SIGUSR1); - DEFSIGNAL(SIGUSR2); - DEFSIGNAL(SIGVTALRM); + defsignal("sigterm", SIGTERM); + defsignal("sigtrap", SIGTRAP); + defsignal("sigtstp", SIGTSTP); + defsignal("sigttin", SIGTTIN); + defsignal("sigttou", SIGTTOU); + defsignal("sigurg", SIGURG); + defsignal("sigusr1", SIGUSR1); + defsignal("sigusr2", SIGUSR2); + defsignal("sigvtalrm", SIGVTALRM); #ifdef LISP_FEATURE_SUNOS - DEFSIGNAL(SIGWAITING); + defsignal("sigwaiting", SIGWAITING); #endif - DEFSIGNAL(SIGWINCH); + defsignal("sigwinch", SIGWINCH); #ifndef LISP_FEATURE_HPUX - DEFSIGNAL(SIGXCPU); - DEFSIGNAL(SIGXFSZ); + defsignal("sigxcpu", SIGXCPU); + defsignal("sigxfsz", SIGXFSZ); #endif return 0; }