Commit | Line | Data |
---|---|---|
d6376244 JH |
1 | /* unixish.h |
2 | * | |
699a97de | 3 | * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, |
663f364b | 4 | * 2003, 2006, 2007, by Larry Wall and others |
d6376244 JH |
5 | * |
6 | * You may distribute under the terms of either the GNU General Public | |
7 | * License or the Artistic License, as specified in the README file. | |
8 | * | |
9 | */ | |
10 | ||
79072805 LW |
11 | /* |
12 | * The following symbols are defined if your operating system supports | |
13 | * functions by that name. All Unixes I know of support them, thus they | |
14 | * are not checked by the configuration script, but are directly defined | |
15 | * here. | |
16 | */ | |
a0d0e21e | 17 | |
12ae5dfc JH |
18 | #ifndef PERL_MICRO |
19 | ||
a0d0e21e LW |
20 | /* HAS_IOCTL: |
21 | * This symbol, if defined, indicates that the ioctl() routine is | |
22 | * available to set I/O characteristics | |
23 | */ | |
36894f0b | 24 | #define HAS_IOCTL /**/ |
a0d0e21e LW |
25 | |
26 | /* HAS_UTIME: | |
27 | * This symbol, if defined, indicates that the routine utime() is | |
28 | * available to update the access and modification times of files. | |
29 | */ | |
36894f0b | 30 | #define HAS_UTIME /**/ |
a0d0e21e | 31 | |
1aef975c | 32 | /* HAS_GROUP |
28e8609d JH |
33 | * This symbol, if defined, indicates that the getgrnam() and |
34 | * getgrgid() routines are available to get group entries. | |
35 | * The getgrent() has a separate definition, HAS_GETGRENT. | |
79072805 | 36 | */ |
36894f0b | 37 | #define HAS_GROUP /**/ |
1aef975c AD |
38 | |
39 | /* HAS_PASSWD | |
28e8609d JH |
40 | * This symbol, if defined, indicates that the getpwnam() and |
41 | * getpwuid() routines are available to get password entries. | |
42 | * The getpwent() has a separate definition, HAS_GETPWENT. | |
1aef975c | 43 | */ |
36894f0b | 44 | #define HAS_PASSWD /**/ |
79072805 | 45 | |
1aef975c AD |
46 | #define HAS_KILL |
47 | #define HAS_WAIT | |
12ae5dfc | 48 | |
3ebb1980 | 49 | #endif /* !PERL_MICRO */ |
16d20bd9 | 50 | |
47234eb8 | 51 | /* USEMYBINMODE |
52 | * This symbol, if defined, indicates that the program should | |
53 | * use the routine my_binmode(FILE *fp, char iotype) to insure | |
54 | * that a file is in "binary" mode -- that is, that no translation | |
55 | * of bytes occurs on read or write operations. | |
56 | */ | |
57 | #undef USEMYBINMODE | |
58 | ||
61bb5906 CB |
59 | /* Stat_t: |
60 | * This symbol holds the type used to declare buffers for information | |
61 | * returned by stat(). It's usually just struct stat. It may be necessary | |
62 | * to include <sys/stat.h> and <sys/types.h> to get any typedef'ed | |
63 | * information. | |
64 | */ | |
65 | #define Stat_t struct stat | |
66 | ||
47234eb8 | 67 | /* USE_STAT_RDEV: |
68 | * This symbol is defined if this system has a stat structure declaring | |
69 | * st_rdev | |
70 | */ | |
36894f0b | 71 | #define USE_STAT_RDEV /**/ |
47234eb8 | 72 | |
73 | /* ACME_MESS: | |
74 | * This symbol, if defined, indicates that error messages should be | |
75 | * should be generated in a format that allows the use of the Acme | |
76 | * GUI/editor's autofind feature. | |
77 | */ | |
78 | #undef ACME_MESS /**/ | |
79 | ||
16d20bd9 AD |
80 | /* UNLINK_ALL_VERSIONS: |
81 | * This symbol, if defined, indicates that the program should arrange | |
82 | * to remove all versions of a file if unlink() is called. This is | |
83 | * probably only relevant for VMS. | |
84 | */ | |
95146c06 | 85 | /* #define UNLINK_ALL_VERSIONS / **/ |
16d20bd9 AD |
86 | |
87 | /* VMS: | |
88 | * This symbol, if defined, indicates that the program is running under | |
89 | * VMS. It is currently automatically set by cpps running under VMS, | |
90 | * and is included here for completeness only. | |
91 | */ | |
95146c06 | 92 | /* #define VMS / **/ |
ed6116ce | 93 | |
44a8e56a | 94 | /* ALTERNATE_SHEBANG: |
95 | * This symbol, if defined, contains a "magic" string which may be used | |
96 | * as the first line of a Perl program designed to be executed directly | |
97 | * by name, instead of the standard Unix #!. If ALTERNATE_SHEBANG | |
98 | * begins with a character other then #, then Perl will only treat | |
d1be9408 | 99 | * it as a command line if it finds the string "perl" in the first |
44a8e56a | 100 | * word; otherwise it's treated as the first line of code in the script. |
101 | * (IOW, Perl won't hand off to another interpreter via an alternate | |
102 | * shebang sequence that might be legal Perl code.) | |
103 | */ | |
104 | /* #define ALTERNATE_SHEBANG "#!" / **/ | |
105 | ||
ed6116ce | 106 | # include <signal.h> |
ed6116ce | 107 | |
79072805 LW |
108 | #ifndef SIGABRT |
109 | # define SIGABRT SIGILL | |
110 | #endif | |
111 | #ifndef SIGILL | |
112 | # define SIGILL 6 /* blech */ | |
113 | #endif | |
7766f137 | 114 | #define ABORT() kill(PerlProc_getpid(),SIGABRT); |
79072805 | 115 | |
a0d0e21e LW |
116 | /* |
117 | * fwrite1() should be a routine with the same calling sequence as fwrite(), | |
118 | * but which outputs all of the bytes requested as a single stream (unlike | |
119 | * fwrite() itself, which on some systems outputs several distinct records | |
120 | * if the number_of_items parameter is >1). | |
121 | */ | |
122 | #define fwrite1 fwrite | |
123 | ||
124 | #define Stat(fname,bufptr) stat((fname),(bufptr)) | |
4e4f9c12 | 125 | |
ea34f6bd | 126 | #ifdef __amigaos4__ |
4e4f9c12 | 127 | int afstat(int fd, struct stat *statb); |
f8e1187f | 128 | # define Fstat(fd,bufptr) afstat((fd),(bufptr)) |
4e4f9c12 AB |
129 | #endif |
130 | ||
131 | #ifndef Fstat | |
f8e1187f | 132 | # define Fstat(fd,bufptr) fstat((fd),(bufptr)) |
4e4f9c12 AB |
133 | #endif |
134 | ||
a5f75d66 | 135 | #define Fflush(fp) fflush(fp) |
8cc95fdb | 136 | #define Mkdir(path,mode) mkdir((path),(mode)) |
a0d0e21e | 137 | |
5ce45b7b | 138 | #if defined(__amigaos4__) |
5ce45b7b | 139 | # define PERL_SYS_INIT_BODY(c,v) \ |
6e3136a6 | 140 | MALLOC_CHECK_TAINT2(*c,*v) PERL_FPU_INIT; PERLIO_INIT; MALLOC_INIT; amigaos4_init_fork_array(); amigaos4_init_environ_sema(); |
929e1213 KW |
141 | # define PERL_SYS_TERM_BODY() \ |
142 | HINTS_REFCNT_TERM; OP_CHECK_MUTEX_TERM; \ | |
143 | OP_REFCNT_TERM; PERLIO_TERM; MALLOC_TERM; LOCALE_TERM; \ | |
144 | amigaos4_dispose_fork_array(); | |
5ce45b7b AB |
145 | #endif |
146 | ||
cbec8ebe DM |
147 | #ifndef PERL_SYS_INIT_BODY |
148 | # define PERL_SYS_INIT_BODY(c,v) \ | |
7f7c3354 | 149 | MALLOC_CHECK_TAINT2(*c,*v) PERL_FPU_INIT; PERLIO_INIT; MALLOC_INIT |
60e4866f LJ |
150 | #endif |
151 | ||
cbec8ebe | 152 | #ifndef PERL_SYS_TERM_BODY |
929e1213 KW |
153 | # define PERL_SYS_TERM_BODY() \ |
154 | HINTS_REFCNT_TERM; OP_CHECK_MUTEX_TERM; \ | |
155 | OP_REFCNT_TERM; PERLIO_TERM; MALLOC_TERM; \ | |
156 | LOCALE_TERM; | |
c301d606 | 157 | |
60e4866f | 158 | #endif |
35f48355 CS |
159 | |
160 | #define BIT_BUCKET "/dev/null" | |
161 | ||
564894ea | 162 | #define dXSUB_SYS dNOOP |
13b6e58c | 163 | |
1ccb7c8d | 164 | #ifndef NO_ENVIRON_ARRAY |
13b6e58c | 165 | #define USE_ENVIRON_ARRAY |
1ccb7c8d | 166 | #endif |
13b6e58c | 167 | |
e9a8c099 | 168 | /* |
14d04a33 | 169 | * ex: set ts=8 sts=4 sw=4 et: |
e9a8c099 | 170 | */ |