Add a test for [perl #17753].
[p5sagit/p5-mst-13.2.git] / unixish.h
CommitLineData
d6376244 1/* unixish.h
2 *
3f774658 3 * Copyright (c) 1997-2002, Larry Wall
d6376244 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
79072805 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 */
a0d0e21e 16
12ae5dfc 17#ifndef PERL_MICRO
18
a0d0e21e 19/* HAS_IOCTL:
20 * This symbol, if defined, indicates that the ioctl() routine is
21 * available to set I/O characteristics
22 */
95146c06 23#define HAS_IOCTL / **/
a0d0e21e 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 */
95146c06 29#define HAS_UTIME / **/
a0d0e21e 30
1aef975c 31/* HAS_GROUP
28e8609d 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.
79072805 35 */
95146c06 36#define HAS_GROUP / **/
1aef975c 37
38/* HAS_PASSWD
28e8609d 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.
1aef975c 42 */
95146c06 43#define HAS_PASSWD / **/
79072805 44
1aef975c 45#define HAS_KILL
46#define HAS_WAIT
12ae5dfc 47
3ebb1980 48#endif /* !PERL_MICRO */
16d20bd9 49
47234eb8 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
61bb5906 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
47234eb8 66/* USE_STAT_RDEV:
67 * This symbol is defined if this system has a stat structure declaring
68 * st_rdev
69 */
95146c06 70#define USE_STAT_RDEV / **/
47234eb8 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
16d20bd9 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 */
95146c06 84/* #define UNLINK_ALL_VERSIONS / **/
16d20bd9 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 */
95146c06 91/* #define VMS / **/
ed6116ce 92
44a8e56a 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
d1be9408 98 * it as a command line if it finds the string "perl" in the first
44a8e56a 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
4bbed605 105#if !defined(NSIG) || defined(M_UNIX) || defined(M_XENIX) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
ed6116ce 106# include <signal.h>
107#endif
108
79072805 109#ifndef SIGABRT
110# define SIGABRT SIGILL
111#endif
112#ifndef SIGILL
113# define SIGILL 6 /* blech */
114#endif
7766f137 115#define ABORT() kill(PerlProc_getpid(),SIGABRT);
79072805 116
a0d0e21e 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))
a5f75d66 127#define Fflush(fp) fflush(fp)
8cc95fdb 128#define Mkdir(path,mode) mkdir((path),(mode))
a0d0e21e 129
60e4866f 130#ifndef PERL_SYS_INIT
c77b533b 131# define PERL_SYS_INIT(c,v) PERL_FPU_INIT MALLOC_INIT
60e4866f 132#endif
133
134#ifndef PERL_SYS_TERM
534825c4 135#define PERL_SYS_TERM() OP_REFCNT_TERM; MALLOC_TERM
60e4866f 136#endif
35f48355 137
138#define BIT_BUCKET "/dev/null"
139
a3c8358c 140#define dXSUB_SYS
13b6e58c 141
142#define USE_ENVIRON_ARRAY
143