[q-lang-cvs] q/modules/clib clib.c, 1.81, 1.82 clib.q, 1.31, 1.32 system.c, 1.3, 1.4 system.q, 1.3,
Brought to you by:
agraef
From: Albert G. <ag...@us...> - 2007-12-16 20:23:26
|
Update of /cvsroot/q-lang/q/modules/clib In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv29513/modules/clib Modified Files: clib.c clib.q system.c system.q Log Message: move signal and scheduling constants from system.q to clib.q Index: system.q =================================================================== RCS file: /cvsroot/q-lang/q/modules/clib/system.q,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** system.q 4 Oct 2007 12:33:26 -0000 1.3 --- system.q 16 Dec 2007 20:23:21 -0000 1.4 *************** *** 41,47 **** P_WAIT, P_NOWAIT, P_OVERLAY, P_DETACH, - // scheduling policies (setsched, getsched) - SCHED_OTHER, SCHED_RR, SCHED_FIFO, - // file access modes O_RDONLY, O_WRONLY, O_RDWR, --- 41,44 ---- *************** *** 82,94 **** CLOCKS_PER_SEC, CLK_TCK, - // trap action values - SIG_IGN, SIG_DFL, SIG_TRP, - - // signal numbers - SIGABRT, SIGALRM, SIGFPE, SIGHUP, SIGILL, SIGINT, SIGKILL, SIGPIPE, - SIGQUIT, SIGSEGV, SIGTERM, SIGUSR1, SIGUSR2, SIGCHLD, SIGCONT, SIGSTOP, - SIGTSTP, SIGTTIN, SIGTTOU, SIGBUS, SIGPOLL, SIGPROF, SIGSYS, SIGTRAP, - SIGURG, SIGVTALRM, SIGXCPU, SIGXFSZ, - /* termios constants ******************************************************/ --- 79,82 ---- *************** *** 207,215 **** CLOCKS_PER_SEC, CLK_TCK, - SIGABRT, SIGALRM, SIGFPE, SIGHUP, SIGILL, SIGINT, SIGKILL, SIGPIPE, - SIGQUIT, SIGSEGV, SIGTERM, SIGUSR1, SIGUSR2, SIGCHLD, SIGCONT, SIGSTOP, - SIGTSTP, SIGTTIN, SIGTTOU, SIGBUS, SIGPOLL, SIGPROF, SIGSYS, SIGTRAP, - SIGURG, SIGVTALRM, SIGXCPU, SIGXFSZ, - TCSANOW, TCSADRAIN, TCSAFLUSH, --- 195,198 ---- *************** *** 277,283 **** ) = sys_vars; ! def SIG_IGN = -1, SIG_DFL = 0, SIG_TRP = 1, ! SCHED_OTHER = 0, SCHED_RR = 1, SCHED_FIFO = 2, ! AF_UNIX = AF_LOCAL, AF_FILE = AF_LOCAL; // these values should be ubiquitous --- 260,264 ---- ) = sys_vars; ! def AF_UNIX = AF_LOCAL, AF_FILE = AF_LOCAL; // these values should be ubiquitous Index: clib.q =================================================================== RCS file: /cvsroot/q-lang/q/modules/clib/clib.q,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** clib.q 3 Oct 2007 16:19:39 -0000 1.31 --- clib.q 16 Dec 2007 20:23:21 -0000 1.32 *************** *** 44,47 **** --- 44,59 ---- SIZEOF_FLOAT, SIZEOF_DOUBLE, + // trap action values + SIG_IGN, SIG_DFL, SIG_TRP, + + // signal numbers + SIGABRT, SIGALRM, SIGFPE, SIGHUP, SIGILL, SIGINT, SIGKILL, SIGPIPE, + SIGQUIT, SIGSEGV, SIGTERM, SIGUSR1, SIGUSR2, SIGCHLD, SIGCONT, SIGSTOP, + SIGTSTP, SIGTTIN, SIGTTOU, SIGBUS, SIGPOLL, SIGPROF, SIGSYS, SIGTRAP, + SIGURG, SIGVTALRM, SIGXCPU, SIGXFSZ, + + // scheduling policies (setsched, getsched) + SCHED_OTHER, SCHED_RR, SCHED_FIFO, + // file buffering modes (setvbuf) IONBF, IOLBF, IOFBF, *************** *** 56,63 **** --- 68,83 ---- SIZEOF_FLOAT, SIZEOF_DOUBLE, + SIGABRT, SIGALRM, SIGFPE, SIGHUP, SIGILL, SIGINT, SIGKILL, SIGPIPE, + SIGQUIT, SIGSEGV, SIGTERM, SIGUSR1, SIGUSR2, SIGCHLD, SIGCONT, SIGSTOP, + SIGTSTP, SIGTTIN, SIGTTOU, SIGBUS, SIGPOLL, SIGPROF, SIGSYS, SIGTRAP, + SIGURG, SIGVTALRM, SIGXCPU, SIGXFSZ, + IONBF, IOLBF, IOFBF, SEEK_SET, SEEK_CUR, SEEK_END) = sys_vars; + def SIG_IGN = -1, SIG_DFL = 0, SIG_TRP = 1, + SCHED_OTHER = 0, SCHED_RR = 1, SCHED_FIFO = 2; + /****************************************************************************/ Index: system.c =================================================================== RCS file: /cvsroot/q-lang/q/modules/clib/system.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** system.c 16 Dec 2007 09:37:39 -0000 1.3 --- system.c 16 Dec 2007 20:23:21 -0000 1.4 *************** *** 1015,1161 **** #endif - /* Signal numbers. */ - - #ifdef SIGABRT - #define _SIGABRT SIGABRT - #else - #define _SIGABRT (-1) - #endif - #ifdef SIGALRM - #define _SIGALRM SIGALRM - #else - #define _SIGALRM (-1) - #endif - #ifdef SIGFPE - #define _SIGFPE SIGFPE - #else - #define _SIGFPE (-1) - #endif - #ifdef SIGHUP - #define _SIGHUP SIGHUP - #else - #define _SIGHUP (-1) - #endif - #ifdef SIGILL - #define _SIGILL SIGILL - #else - #define _SIGILL (-1) - #endif - #ifdef SIGINT - #define _SIGINT SIGINT - #else - #define _SIGINT (-1) - #endif - #ifdef SIGKILL - #define _SIGKILL SIGKILL - #else - #define _SIGKILL (-1) - #endif - #ifdef SIGPIPE - #define _SIGPIPE SIGPIPE - #else - #define _SIGPIPE (-1) - #endif - #ifdef SIGQUIT - #define _SIGQUIT SIGQUIT - #else - #define _SIGQUIT (-1) - #endif - #ifdef SIGSEGV - #define _SIGSEGV SIGSEGV - #else - #define _SIGSEGV (-1) - #endif - #ifdef SIGTERM - #define _SIGTERM SIGTERM - #else - #define _SIGTERM (-1) - #endif - #ifdef SIGUSR1 - #define _SIGUSR1 SIGUSR1 - #else - #define _SIGUSR1 (-1) - #endif - #ifdef SIGUSR2 - #define _SIGUSR2 SIGUSR2 - #else - #define _SIGUSR2 (-1) - #endif - #ifdef SIGCHLD - #define _SIGCHLD SIGCHLD - #else - #define _SIGCHLD (-1) - #endif - #ifdef SIGCONT - #define _SIGCONT SIGCONT - #else - #define _SIGCONT (-1) - #endif - #ifdef SIGSTOP - #define _SIGSTOP SIGSTOP - #else - #define _SIGSTOP (-1) - #endif - #ifdef SIGTSTP - #define _SIGTSTP SIGTSTP - #else - #define _SIGTSTP (-1) - #endif - #ifdef SIGTTIN - #define _SIGTTIN SIGTTIN - #else - #define _SIGTTIN (-1) - #endif - #ifdef SIGTTOU - #define _SIGTTOU SIGTTOU - #else - #define _SIGTTOU (-1) - #endif - #ifdef SIGBUS - #define _SIGBUS SIGBUS - #else - #define _SIGBUS (-1) - #endif - #ifdef SIGPOLL - #define _SIGPOLL SIGPOLL - #else - #define _SIGPOLL (-1) - #endif - #ifdef SIGPROF - #define _SIGPROF SIGPROF - #else - #define _SIGPROF (-1) - #endif - #ifdef SIGSYS - #define _SIGSYS SIGSYS - #else - #define _SIGSYS (-1) - #endif - #ifdef SIGTRAP - #define _SIGTRAP SIGTRAP - #else - #define _SIGTRAP (-1) - #endif - #ifdef SIGURG - #define _SIGURG SIGURG - #else - #define _SIGURG (-1) - #endif - #ifdef SIGVTALRM - #define _SIGVTALRM SIGVTALRM - #else - #define _SIGVTALRM (-1) - #endif - #ifdef SIGXCPU - #define _SIGXCPU SIGXCPU - #else - #define _SIGXCPU (-1) - #endif - #ifdef SIGXFSZ - #define _SIGXFSZ SIGXFSZ - #else - #define _SIGXFSZ (-1) - #endif - /* Termios constants. */ --- 1015,1018 ---- *************** *** 1640,1644 **** if (argc != 0) return __FAIL; return mktuplel ! (270, mkint(P_WAIT), mkint(P_NOWAIT), mkint(P_OVERLAY), mkint(P_DETACH), --- 1497,1501 ---- if (argc != 0) return __FAIL; return mktuplel ! (242, mkint(P_WAIT), mkint(P_NOWAIT), mkint(P_OVERLAY), mkint(P_DETACH), *************** *** 1666,1698 **** mkint((long)CLOCKS_PER_SEC), mkint((long)CLK_TCK), - mkint(_SIGABRT), - mkint(_SIGALRM), - mkint(_SIGFPE), - mkint(_SIGHUP), - mkint(_SIGILL), - mkint(_SIGINT), - mkint(_SIGKILL), - mkint(_SIGPIPE), - mkint(_SIGQUIT), - mkint(_SIGSEGV), - mkint(_SIGTERM), - mkint(_SIGUSR1), - mkint(_SIGUSR2), - mkint(_SIGCHLD), - mkint(_SIGCONT), - mkint(_SIGSTOP), - mkint(_SIGTSTP), - mkint(_SIGTTIN), - mkint(_SIGTTOU), - mkint(_SIGBUS), - mkint(_SIGPOLL), - mkint(_SIGPROF), - mkint(_SIGSYS), - mkint(_SIGTRAP), - mkint(_SIGURG), - mkint(_SIGVTALRM), - mkint(_SIGXCPU), - mkint(_SIGXFSZ), - mkint(TCSANOW), mkint(TCSADRAIN), --- 1523,1526 ---- Index: clib.c =================================================================== RCS file: /cvsroot/q-lang/q/modules/clib/clib.c,v retrieving revision 1.81 retrieving revision 1.82 diff -C2 -d -r1.81 -r1.82 *** clib.c 3 Oct 2007 10:27:46 -0000 1.81 --- clib.c 16 Dec 2007 20:23:21 -0000 1.82 *************** *** 714,717 **** --- 714,860 ---- #endif + /* Signal numbers. */ + + #ifdef SIGABRT + #define _SIGABRT SIGABRT + #else + #define _SIGABRT (-1) + #endif + #ifdef SIGALRM + #define _SIGALRM SIGALRM + #else + #define _SIGALRM (-1) + #endif + #ifdef SIGFPE + #define _SIGFPE SIGFPE + #else + #define _SIGFPE (-1) + #endif + #ifdef SIGHUP + #define _SIGHUP SIGHUP + #else + #define _SIGHUP (-1) + #endif + #ifdef SIGILL + #define _SIGILL SIGILL + #else + #define _SIGILL (-1) + #endif + #ifdef SIGINT + #define _SIGINT SIGINT + #else + #define _SIGINT (-1) + #endif + #ifdef SIGKILL + #define _SIGKILL SIGKILL + #else + #define _SIGKILL (-1) + #endif + #ifdef SIGPIPE + #define _SIGPIPE SIGPIPE + #else + #define _SIGPIPE (-1) + #endif + #ifdef SIGQUIT + #define _SIGQUIT SIGQUIT + #else + #define _SIGQUIT (-1) + #endif + #ifdef SIGSEGV + #define _SIGSEGV SIGSEGV + #else + #define _SIGSEGV (-1) + #endif + #ifdef SIGTERM + #define _SIGTERM SIGTERM + #else + #define _SIGTERM (-1) + #endif + #ifdef SIGUSR1 + #define _SIGUSR1 SIGUSR1 + #else + #define _SIGUSR1 (-1) + #endif + #ifdef SIGUSR2 + #define _SIGUSR2 SIGUSR2 + #else + #define _SIGUSR2 (-1) + #endif + #ifdef SIGCHLD + #define _SIGCHLD SIGCHLD + #else + #define _SIGCHLD (-1) + #endif + #ifdef SIGCONT + #define _SIGCONT SIGCONT + #else + #define _SIGCONT (-1) + #endif + #ifdef SIGSTOP + #define _SIGSTOP SIGSTOP + #else + #define _SIGSTOP (-1) + #endif + #ifdef SIGTSTP + #define _SIGTSTP SIGTSTP + #else + #define _SIGTSTP (-1) + #endif + #ifdef SIGTTIN + #define _SIGTTIN SIGTTIN + #else + #define _SIGTTIN (-1) + #endif + #ifdef SIGTTOU + #define _SIGTTOU SIGTTOU + #else + #define _SIGTTOU (-1) + #endif + #ifdef SIGBUS + #define _SIGBUS SIGBUS + #else + #define _SIGBUS (-1) + #endif + #ifdef SIGPOLL + #define _SIGPOLL SIGPOLL + #else + #define _SIGPOLL (-1) + #endif + #ifdef SIGPROF + #define _SIGPROF SIGPROF + #else + #define _SIGPROF (-1) + #endif + #ifdef SIGSYS + #define _SIGSYS SIGSYS + #else + #define _SIGSYS (-1) + #endif + #ifdef SIGTRAP + #define _SIGTRAP SIGTRAP + #else + #define _SIGTRAP (-1) + #endif + #ifdef SIGURG + #define _SIGURG SIGURG + #else + #define _SIGURG (-1) + #endif + #ifdef SIGVTALRM + #define _SIGVTALRM SIGVTALRM + #else + #define _SIGVTALRM (-1) + #endif + #ifdef SIGXCPU + #define _SIGXCPU SIGXCPU + #else + #define _SIGXCPU (-1) + #endif + #ifdef SIGXFSZ + #define _SIGXFSZ SIGXFSZ + #else + #define _SIGXFSZ (-1) + #endif + #ifndef SEEK_SET #define SEEK_SET 0 *************** *** 728,732 **** if (argc != 0) return __FAIL; return mktuplel ! (13, mkint(SIZEOF_CHAR), mkint(SIZEOF_SHORT), mkint(SIZEOF_INT), --- 871,875 ---- if (argc != 0) return __FAIL; return mktuplel ! (41, mkint(SIZEOF_CHAR), mkint(SIZEOF_SHORT), mkint(SIZEOF_INT), *************** *** 734,737 **** --- 877,909 ---- mkint(SIZEOF_FLOAT), mkint(SIZEOF_DOUBLE), + mkint(_SIGABRT), + mkint(_SIGALRM), + mkint(_SIGFPE), + mkint(_SIGHUP), + mkint(_SIGILL), + mkint(_SIGINT), + mkint(_SIGKILL), + mkint(_SIGPIPE), + mkint(_SIGQUIT), + mkint(_SIGSEGV), + mkint(_SIGTERM), + mkint(_SIGUSR1), + mkint(_SIGUSR2), + mkint(_SIGCHLD), + mkint(_SIGCONT), + mkint(_SIGSTOP), + mkint(_SIGTSTP), + mkint(_SIGTTIN), + mkint(_SIGTTOU), + mkint(_SIGBUS), + mkint(_SIGPOLL), + mkint(_SIGPROF), + mkint(_SIGSYS), + mkint(_SIGTRAP), + mkint(_SIGURG), + mkint(_SIGVTALRM), + mkint(_SIGXCPU), + mkint(_SIGXFSZ), + mkint(_IONBF), mkint(_IOLBF), mkint(_IOFBF), |