X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tools-for-build%2Fgrovel_headers.c;h=a2e0f081bb275874f51bead8687f0b9097b237f9;hb=f51d3fd40bb44b518299f0ae626583a6899f7af2;hp=0d330824b1535c2ace010f883cbccdbc6f43c82d;hpb=686043635c45a16b418d2cc96a7f704fdab182c2;p=sbcl.git diff --git a/tools-for-build/grovel_headers.c b/tools-for-build/grovel_headers.c index 0d33082..a2e0f08 100644 --- a/tools-for-build/grovel_headers.c +++ b/tools-for-build/grovel_headers.c @@ -23,8 +23,13 @@ #include #include #include +#include +#include #include #include +#include + +#include "genesis/config.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))); } @@ -36,6 +41,8 @@ defconstant(char* lisp_name, long unix_number) lisp_name, unix_number, unix_number); } +#define DEFSIGNAL(name) defconstant(#name, name) + int main(int argc, char *argv[]) { @@ -102,5 +109,84 @@ main(int argc, char *argv[]) defconstant("wuntraced", WUNTRACED); printf("\n"); + printf(";;; various ioctl(2) flags\n"); + defconstant("tiocnotty", TIOCNOTTY); + defconstant("tiocgwinsz", TIOCGWINSZ); + defconstant("tiocswinsz", TIOCSWINSZ); + defconstant("tiocgpgrp", TIOCGPGRP); + defconstant("tiocspgrp", TIOCSPGRP); + /* KLUDGE: These are referenced by old CMUCL-derived code, but + * Linux doesn't define them. + * + * I think these are the BSD names, but I don't know what the + * corresponding SysV/Linux names are. As a point of reference, + * CMUCL doesn't have these defined either (although the defining + * forms *do* exist in src/code/unix.lisp), so I don't feel nearly + * so bad about not hunting them down. Insight into renamed + * obscure ioctl(2) flags appreciated. --njf, 2002-08-26 + * + * I note that the first one I grepped for, TIOCSIGSEND, is + * referenced in SBCL conditional on #+HPUX. Maybe the porters of + * Oxbridge know more about things like that? And even if they + * don't, one benefit of the Rhodes crusade to heal the worthy + * ports should be that afterwards, if we grep for something like + * this in CVS and it's not there, we can lightheartedly nuke it. + * -- WHN 2002-08-30 */ + /* + defconstant("tiocsigsend", TIOCSIGSEND); + defconstant("tiocflush", TIOCFLUSH); + defconstant("tiocgetp", TIOCGETP); + defconstant("tiocsetp", TIOCSETP); + defconstant("tiocgetc", TIOCGETC); + defconstant("tiocsetc", TIOCSETC); + defconstant("tiocgltc", TIOCGLTC); + defconstant("tiocsltc", TIOCSLTC); + */ + printf("\n"); + + printf(";;; signals\n"); + DEFSIGNAL(SIGALRM); + DEFSIGNAL(SIGBUS); + DEFSIGNAL(SIGCHLD); + DEFSIGNAL(SIGCONT); +#ifndef LISP_FEATURE_LINUX + DEFSIGNAL(SIGEMT); +#endif + DEFSIGNAL(SIGFPE); + DEFSIGNAL(SIGHUP); + DEFSIGNAL(SIGILL); + DEFSIGNAL(SIGINT); + DEFSIGNAL(SIGIO); + DEFSIGNAL(SIGIOT); + DEFSIGNAL(SIGKILL); + DEFSIGNAL(SIGPIPE); + DEFSIGNAL(SIGPROF); + DEFSIGNAL(SIGQUIT); + DEFSIGNAL(SIGSEGV); +#ifdef LISP_FEATURE_LINUX + DEFSIGNAL(SIGSTKFLT); +#endif + DEFSIGNAL(SIGSTOP); +#ifndef LISP_FEATURE_LINUX + DEFSIGNAL(SIGSYS); +#endif + DEFSIGNAL(SIGTERM); + DEFSIGNAL(SIGTRAP); + DEFSIGNAL(SIGTSTP); + DEFSIGNAL(SIGTTIN); + DEFSIGNAL(SIGTTOU); + DEFSIGNAL(SIGURG); + DEFSIGNAL(SIGUSR1); + DEFSIGNAL(SIGUSR2); + DEFSIGNAL(SIGVTALRM); +#ifdef LISP_FEATURE_SVR4 + DEFSIGNAL(SIGWAITING); +#endif + DEFSIGNAL(SIGWINCH); +#ifndef LISP_FEATURE_HPUX + DEFSIGNAL(SIGXCPU); + DEFSIGNAL(SIGXFSZ); +#endif + return 0; }