Commit | Line | Data |
4633a7c4 |
1 | #include <signal.h> |
2 | |
3 | /* HAS_IOCTL: |
4 | * This symbol, if defined, indicates that the ioctl() routine is |
5 | * available to set I/O characteristics |
6 | */ |
7 | #define HAS_IOCTL /**/ |
8 | |
9 | /* HAS_UTIME: |
10 | * This symbol, if defined, indicates that the routine utime() is |
11 | * available to update the access and modification times of files. |
12 | */ |
13 | #define HAS_UTIME /**/ |
14 | |
15 | #define HAS_KILL |
16 | #define HAS_WAIT |
17 | |
18 | #ifndef SIGABRT |
19 | # define SIGABRT SIGILL |
20 | #endif |
21 | #ifndef SIGILL |
22 | # define SIGILL 6 /* blech */ |
23 | #endif |
24 | #define ABORT() kill(getpid(),SIGABRT); |
25 | |
eacfb5f1 |
26 | #define PERL_SYS_INIT(argcp, argvp) do { \ |
27 | _response(argcp, argvp); \ |
28 | _wildcard(argcp, argvp); } while (0) |
29 | |
30 | |
4633a7c4 |
31 | /* |
32 | * fwrite1() should be a routine with the same calling sequence as fwrite(), |
33 | * but which outputs all of the bytes requested as a single stream (unlike |
34 | * fwrite() itself, which on some systems outputs several distinct records |
35 | * if the number_of_items parameter is >1). |
36 | */ |
37 | #define fwrite1 fwrite |
38 | |
39 | #define my_getenv(var) getenv(var) |
40 | |
41 | /*****************************************************************************/ |
42 | |
43 | #include <stdlib.h> /* before the following definitions */ |
44 | #include <unistd.h> /* before the following definitions */ |
45 | |
46 | #define chdir _chdir2 |
47 | #define getcwd _getcwd2 |
48 | |
49 | /* This guy is needed for quick stdstd */ |
50 | |
51 | #if defined(USE_STDIO_PTR) && defined(STDIO_PTR_LVALUE) && defined(STDIO_CNT_LVALUE) |
52 | # define _filbuf _fill |
53 | /* Perl uses ungetc only with successful return */ |
54 | # define ungetc(c,fp) \ |
55 | (FILE_ptr(fp) > FILE_base(fp) && c == (int)*(FILE_ptr(fp) - 1) \ |
56 | ? (--FILE_ptr(fp), ++FILE_cnt(fp), (int)c) : ungetc(c,fp)) |
57 | #endif |
58 | |
59 | #define OP_BINARY O_BINARY |
60 | |
61 | #define OS2_STAT_HACK 1 |
62 | #if OS2_STAT_HACK |
63 | |
64 | #define Stat(fname,bufptr) os2_stat((fname),(bufptr)) |
65 | #define Fstat(fd,bufptr) fstat((fd),(bufptr)) |
66 | |
67 | #undef S_IFBLK |
68 | #undef S_ISBLK |
69 | #define S_IFBLK 0120000 |
70 | #define S_ISBLK(mode) (((mode) & S_IFMT) == S_IFBLK) |
71 | |
72 | #else |
73 | |
74 | #define Stat(fname,bufptr) stat((fname),(bufptr)) |
75 | #define Fstat(fd,bufptr) fstat((fd),(bufptr)) |
76 | |
77 | #endif |