comparison src/sysdep.c @ 239:41f2f0e326e9 r20-5b18

Import from CVS: tag r20-5b18
author cvs
date Mon, 13 Aug 2007 10:15:48 +0200
parents 557eaa0339bf
children 677f6a0ee643
comparison
equal deleted inserted replaced
238:b5f2e56b938d 239:41f2f0e326e9
28 */ 28 */
29 29
30 #define DONT_ENCAPSULATE 30 #define DONT_ENCAPSULATE
31 31
32 #include <config.h> 32 #include <config.h>
33
34 #ifdef WINDOWSNT
35 #include <direct.h>
36 /* <process.h> should not conflict with "process.h", as per ANSI definition.
37 This is not true though with visual c though. The trick below works with
38 VC4.2b and with VC5.0. It assumes that VC is installed in a kind of
39 standard way, so include files get to what/ever/path/include.
40 */
41 #include <../include/process.h>
42 #endif /* WINDOWSNT */
43
33 #include "lisp.h" 44 #include "lisp.h"
34 45
35 #include <stddef.h> 46 #include <stddef.h>
36 47
37 /* ------------------------------- */ 48 /* ------------------------------- */
67 #include "syssignal.h" 78 #include "syssignal.h"
68 #endif 79 #endif
69 #ifndef WINDOWSNT 80 #ifndef WINDOWSNT
70 #include <sys/times.h> 81 #include <sys/times.h>
71 #endif 82 #endif
72 83 #ifdef WINDOWSNT
73 #if defined(WINDOWSNT) 84 #include <sys/utime.h>
74 #include <direct.h> 85 #include "ntheap.h"
75 /* In process.h which conflicts with the local copy. */ 86 #endif
76 #define _P_WAIT 0
77 int _CRTAPI1 _spawnlp (int, const char *, const char *, ...);
78 int _CRTAPI1 _getpid (void);
79 #endif
80
81 87
82 /* ------------------------------- */ 88 /* ------------------------------- */
83 /* TTY definitions */ 89 /* TTY definitions */
84 /* ------------------------------- */ 90 /* ------------------------------- */
85 91
515 #endif /* not NO_SUBPROCESSES */ 521 #endif /* not NO_SUBPROCESSES */
516 522
517 523
518 #if !defined (SIGTSTP) && !defined (USG_JOBCTRL) 524 #if !defined (SIGTSTP) && !defined (USG_JOBCTRL)
519 525
526 #if defined(__STDC__) || defined(_MSC_VER)
527 #define SIG_PARAM_TYPE int
528 #else
529 #define SIG_PARAM_TYPE
530 #endif
531
520 /* Record a signal code and the handler for it. */ 532 /* Record a signal code and the handler for it. */
521 struct save_signal 533 struct save_signal
522 { 534 {
523 int code; 535 int code;
524 SIGTYPE (*handler) (); 536 SIGTYPE (*handler) (SIG_PARAM_TYPE);
525 }; 537 };
526 538
527 static void 539 static void
528 save_signal_handlers (struct save_signal *saved_handlers) 540 save_signal_handlers (struct save_signal *saved_handlers)
529 { 541 {
530 while (saved_handlers->code) 542 while (saved_handlers->code)
531 { 543 {
532 saved_handlers->handler 544 saved_handlers->handler
533 = (SIGTYPE (*) ()) signal (saved_handlers->code, SIG_IGN); 545 = (SIGTYPE (*) (SIG_PARAM_TYPE)) signal (saved_handlers->code, SIG_IGN);
534 saved_handlers++; 546 saved_handlers++;
535 } 547 }
536 } 548 }
537 549
538 static void 550 static void