X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tools-for-build%2Fgrovel_headers.c;h=0184bfaef202804691c7d3a9c222ac97e6b31e3f;hb=5164d4bba99fa9d486ceb3aa65c6c7b136702a11;hp=a9adf64fa7e01fbf0ca3133bdf05e4e4f2200b7b;hpb=0d669e68a1ffbea42af6216f2ae8c7d7ca12ffb6;p=sbcl.git diff --git a/tools-for-build/grovel_headers.c b/tools-for-build/grovel_headers.c index a9adf64..0184bfa 100644 --- a/tools-for-build/grovel_headers.c +++ b/tools-for-build/grovel_headers.c @@ -23,11 +23,13 @@ #include #include #include +#include +#include #include #include #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) @@ -47,9 +49,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"); @@ -102,5 +104,40 @@ 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"); + return 0; }