3 * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002,
4 * 2003, 2006, 2007, by Larry Wall and others
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.
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
19 * This symbol, if defined, indicates that the ioctl() routine is
20 * available to set I/O characteristics
22 #define HAS_IOCTL /**/
25 * This symbol, if defined, indicates that the routine utime() is
26 * available to update the access and modification times of files.
28 #define HAS_UTIME /**/
31 * This symbol, if defined, indicates that the getgrnam() and
32 * getgrgid() routines are available to get group entries.
33 * The getgrent() has a separate definition, HAS_GETGRENT.
35 #define HAS_GROUP /**/
38 * This symbol, if defined, indicates that the getpwnam() and
39 * getpwuid() routines are available to get password entries.
40 * The getpwent() has a separate definition, HAS_GETPWENT.
42 #define HAS_PASSWD /**/
48 * This symbol, if defined, indicates that the program should
49 * use the routine my_binmode(FILE *fp, char iotype) to insure
50 * that a file is in "binary" mode -- that is, that no translation
51 * of bytes occurs on read or write operations.
56 * This symbol holds the type used to declare buffers for information
57 * returned by stat(). It's usually just struct stat. It may be necessary
58 * to include <sys/stat.h> and <sys/types.h> to get any typedef'ed
61 #define Stat_t struct stat
64 * This symbol is defined if this system has a stat structure declaring
67 #define USE_STAT_RDEV /**/
70 * This symbol, if defined, indicates that error messages should be
71 * should be generated in a format that allows the use of the Acme
72 * GUI/editor's autofind feature.
76 /* UNLINK_ALL_VERSIONS:
77 * This symbol, if defined, indicates that the program should arrange
78 * to remove all versions of a file if unlink() is called. This is
79 * probably only relevant for VMS.
81 /* #define UNLINK_ALL_VERSIONS / **/
84 * This symbol, if defined, indicates that the program is running under
85 * VMS. It is currently automatically set by cpps running under VMS,
86 * and is included here for completeness only.
91 * This symbol, if defined, contains a "magic" string which may be used
92 * as the first line of a Perl program designed to be executed directly
93 * by name, instead of the standard Unix #!. If ALTERNATE_SHEBANG
94 * begins with a character other then #, then Perl will only treat
95 * it as a command line if it finds the string "perl" in the first
96 * word; otherwise it's treated as the first line of code in the script.
97 * (IOW, Perl won't hand off to another interpreter via an alternate
98 * shebang sequence that might be legal Perl code.)
100 /* #define ALTERNATE_SHEBANG "#!" / **/
105 # define SIGABRT SIGILL
108 # define SIGILL 6 /* blech */
110 #define ABORT() kill(PerlProc_getpid(),SIGABRT);
113 * fwrite1() should be a routine with the same calling sequence as fwrite(),
114 * but which outputs all of the bytes requested as a single stream (unlike
115 * fwrite() itself, which on some systems outputs several distinct records
116 * if the number_of_items parameter is >1).
118 #define fwrite1 fwrite
120 #define Stat(fname,bufptr) stat((fname),(bufptr))
123 int afstat(int fd, struct stat *statb);
124 # define Fstat(fd,bufptr) afstat((fd),(bufptr))
128 # define Fstat(fd,bufptr) fstat((fd),(bufptr))
131 #define Fflush(fp) fflush(fp)
132 #define Mkdir(path,mode) mkdir((path),(mode))
134 #if defined(__amigaos4__)
135 # define PLATFORM_SYS_TERM_ amigaos4_dispose_fork_array()
136 # define PLATFORM_SYS_INIT_ STMT_START { \
137 amigaos4_init_fork_array(); \
138 amigaos4_init_environ_sema(); \
141 # define PLATFORM_SYS_TERM_ NOOP
142 # define PLATFORM_SYS_INIT_ NOOP
145 #ifndef PERL_SYS_INIT_BODY
146 #define PERL_SYS_INIT_BODY(c,v) \
147 MALLOC_CHECK_TAINT2(*c,*v) PERL_FPU_INIT; PERLIO_INIT; \
148 MALLOC_INIT; PLATFORM_SYS_INIT_;
151 /* Generally add things last-in first-terminated. IO and memory terminations
152 * need to be generally last
154 * BEWARE that using PerlIO in these will be using freed memory, so may appear
155 * to work, but must NOT be retained in production code. */
156 #ifndef PERL_SYS_TERM_BODY
157 # define PERL_SYS_TERM_BODY() \
158 SHUTDOWN_TERM; ENV_TERM; USER_PROP_MUTEX_TERM; \
159 LOCALE_TERM; HINTS_REFCNT_TERM; \
160 KEYWORD_PLUGIN_MUTEX_TERM; OP_CHECK_MUTEX_TERM; \
161 OP_REFCNT_TERM; PERLIO_TERM; MALLOC_TERM; \
165 #define BIT_BUCKET "/dev/null"
167 #define dXSUB_SYS dNOOP
169 #ifndef NO_ENVIRON_ARRAY
170 #define USE_ENVIRON_ARRAY
174 * ex: set ts=8 sts=4 sw=4 et: