Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | /* unixish.h |
2 | * | |
3 | * Copyright (c) 1997-2002, Larry Wall | |
4 | * | |
5 | * You may distribute under the terms of either the GNU General Public | |
6 | * License or the Artistic License, as specified in the README file. | |
7 | * | |
8 | */ | |
9 | ||
10 | /* | |
11 | * The following symbols are defined if your operating system supports | |
12 | * functions by that name. All Unixes I know of support them, thus they | |
13 | * are not checked by the configuration script, but are directly defined | |
14 | * here. | |
15 | */ | |
16 | ||
17 | #ifndef PERL_MICRO | |
18 | ||
19 | /* HAS_IOCTL: | |
20 | * This symbol, if defined, indicates that the ioctl() routine is | |
21 | * available to set I/O characteristics | |
22 | */ | |
23 | #define HAS_IOCTL / **/ | |
24 | ||
25 | /* HAS_UTIME: | |
26 | * This symbol, if defined, indicates that the routine utime() is | |
27 | * available to update the access and modification times of files. | |
28 | */ | |
29 | #define HAS_UTIME / **/ | |
30 | ||
31 | /* HAS_GROUP | |
32 | * This symbol, if defined, indicates that the getgrnam() and | |
33 | * getgrgid() routines are available to get group entries. | |
34 | * The getgrent() has a separate definition, HAS_GETGRENT. | |
35 | */ | |
36 | #define HAS_GROUP / **/ | |
37 | ||
38 | /* HAS_PASSWD | |
39 | * This symbol, if defined, indicates that the getpwnam() and | |
40 | * getpwuid() routines are available to get password entries. | |
41 | * The getpwent() has a separate definition, HAS_GETPWENT. | |
42 | */ | |
43 | #define HAS_PASSWD / **/ | |
44 | ||
45 | #define HAS_KILL | |
46 | #define HAS_WAIT | |
47 | ||
48 | #endif /* !PERL_MICRO */ | |
49 | ||
50 | /* USEMYBINMODE | |
51 | * This symbol, if defined, indicates that the program should | |
52 | * use the routine my_binmode(FILE *fp, char iotype) to insure | |
53 | * that a file is in "binary" mode -- that is, that no translation | |
54 | * of bytes occurs on read or write operations. | |
55 | */ | |
56 | #undef USEMYBINMODE | |
57 | ||
58 | /* Stat_t: | |
59 | * This symbol holds the type used to declare buffers for information | |
60 | * returned by stat(). It's usually just struct stat. It may be necessary | |
61 | * to include <sys/stat.h> and <sys/types.h> to get any typedef'ed | |
62 | * information. | |
63 | */ | |
64 | #define Stat_t struct stat | |
65 | ||
66 | /* USE_STAT_RDEV: | |
67 | * This symbol is defined if this system has a stat structure declaring | |
68 | * st_rdev | |
69 | */ | |
70 | #define USE_STAT_RDEV / **/ | |
71 | ||
72 | /* ACME_MESS: | |
73 | * This symbol, if defined, indicates that error messages should be | |
74 | * should be generated in a format that allows the use of the Acme | |
75 | * GUI/editor's autofind feature. | |
76 | */ | |
77 | #undef ACME_MESS /**/ | |
78 | ||
79 | /* UNLINK_ALL_VERSIONS: | |
80 | * This symbol, if defined, indicates that the program should arrange | |
81 | * to remove all versions of a file if unlink() is called. This is | |
82 | * probably only relevant for VMS. | |
83 | */ | |
84 | /* #define UNLINK_ALL_VERSIONS / **/ | |
85 | ||
86 | /* VMS: | |
87 | * This symbol, if defined, indicates that the program is running under | |
88 | * VMS. It is currently automatically set by cpps running under VMS, | |
89 | * and is included here for completeness only. | |
90 | */ | |
91 | /* #define VMS / **/ | |
92 | ||
93 | /* ALTERNATE_SHEBANG: | |
94 | * This symbol, if defined, contains a "magic" string which may be used | |
95 | * as the first line of a Perl program designed to be executed directly | |
96 | * by name, instead of the standard Unix #!. If ALTERNATE_SHEBANG | |
97 | * begins with a character other then #, then Perl will only treat | |
98 | * it as a command line if it finds the string "perl" in the first | |
99 | * word; otherwise it's treated as the first line of code in the script. | |
100 | * (IOW, Perl won't hand off to another interpreter via an alternate | |
101 | * shebang sequence that might be legal Perl code.) | |
102 | */ | |
103 | /* #define ALTERNATE_SHEBANG "#!" / **/ | |
104 | ||
105 | #if !defined(NSIG) || defined(M_UNIX) || defined(M_XENIX) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) | |
106 | # include <signal.h> | |
107 | #endif | |
108 | ||
109 | #ifndef SIGABRT | |
110 | # define SIGABRT SIGILL | |
111 | #endif | |
112 | #ifndef SIGILL | |
113 | # define SIGILL 6 /* blech */ | |
114 | #endif | |
115 | #define ABORT() kill(PerlProc_getpid(),SIGABRT); | |
116 | ||
117 | /* | |
118 | * fwrite1() should be a routine with the same calling sequence as fwrite(), | |
119 | * but which outputs all of the bytes requested as a single stream (unlike | |
120 | * fwrite() itself, which on some systems outputs several distinct records | |
121 | * if the number_of_items parameter is >1). | |
122 | */ | |
123 | #define fwrite1 fwrite | |
124 | ||
125 | #define Stat(fname,bufptr) stat((fname),(bufptr)) | |
126 | #define Fstat(fd,bufptr) fstat((fd),(bufptr)) | |
127 | #define Fflush(fp) fflush(fp) | |
128 | #define Mkdir(path,mode) mkdir((path),(mode)) | |
129 | ||
130 | #ifndef PERL_SYS_INIT | |
131 | # define PERL_SYS_INIT(c,v) PERL_FPU_INIT MALLOC_INIT | |
132 | #endif | |
133 | ||
134 | #ifndef PERL_SYS_TERM | |
135 | #define PERL_SYS_TERM() OP_REFCNT_TERM; MALLOC_TERM | |
136 | #endif | |
137 | ||
138 | #define BIT_BUCKET "/dev/null" | |
139 | ||
140 | #define dXSUB_SYS | |
141 | ||
142 | #define USE_ENVIRON_ARRAY | |
143 |