RE: [PATCH] compress 2.018
[p5sagit/p5-mst-13.2.git] / unixish.h
CommitLineData
d6376244 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 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 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 18#ifndef PERL_MICRO
19
a0d0e21e 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 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 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 38
39/* HAS_PASSWD
28e8609d 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 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 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 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 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 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 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))
125#define Fstat(fd,bufptr) fstat((fd),(bufptr))
a5f75d66 126#define Fflush(fp) fflush(fp)
8cc95fdb 127#define Mkdir(path,mode) mkdir((path),(mode))
a0d0e21e 128
cbec8ebe 129#ifndef PERL_SYS_INIT_BODY
130# define PERL_SYS_INIT_BODY(c,v) \
7f7c3354 131 MALLOC_CHECK_TAINT2(*c,*v) PERL_FPU_INIT; PERLIO_INIT; MALLOC_INIT
60e4866f 132#endif
133
cbec8ebe 134#ifndef PERL_SYS_TERM_BODY
135# define PERL_SYS_TERM_BODY() \
bf81751b 136 HINTS_REFCNT_TERM; OP_REFCNT_TERM; PERLIO_TERM; MALLOC_TERM;
c301d606 137
60e4866f 138#endif
35f48355 139
140#define BIT_BUCKET "/dev/null"
141
a3c8358c 142#define dXSUB_SYS
13b6e58c 143
1ccb7c8d 144#ifndef NO_ENVIRON_ARRAY
13b6e58c 145#define USE_ENVIRON_ARRAY
1ccb7c8d 146#endif
13b6e58c 147
e9a8c099 148/*
149 * Local variables:
150 * c-indentation-style: bsd
151 * c-basic-offset: 4
152 * indent-tabs-mode: t
153 * End:
154 *
155 * ex: set ts=8 sts=4 sw=4 noet:
156 */