Commit | Line | Data |
---|---|---|
d6376244 JH |
1 | /* dosish.h |
2 | * | |
4bb101f2 | 3 | * Copyright (C) 1993, 1994, 1996, 1997, 1998, 1999, |
663f364b | 4 | * 2000, 2001, 2002, 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 | */ | |
79072805 | 10 | #define ABORT() abort(); |
a0d0e21e | 11 | |
137443ea | 12 | #ifndef SH_PATH |
55497cff | 13 | #define SH_PATH "/bin/sh" |
137443ea | 14 | #endif |
55497cff | 15 | |
4457f3fc | 16 | #ifdef WIN32 |
604645a6 AC |
17 | # define PERL_SYS_INIT_BODY(c,v) \ |
18 | MALLOC_CHECK_TAINT2(*c,*v) Perl_win32_init(c,v); PERLIO_INIT | |
19 | # define PERL_SYS_TERM_BODY() Perl_win32_term() | |
20 | # define BIT_BUCKET "nul" | |
604645a6 AC |
21 | #else |
22 | # define PERL_SYS_INIT_BODY(c,v) \ | |
23 | MALLOC_CHECK_TAINT2(*c,*v); PERLIO_INIT | |
24 | # define BIT_BUCKET "\\dev\\nul" /* "wanna be like, umm, Newlined, or somethin?" */ | |
25 | #endif | |
55497cff | 26 | |
0721b9ab KW |
27 | /* Generally add things last-in first-terminated. IO and memory terminations |
28 | * need to be generally last | |
29 | * | |
30 | * BEWARE that using PerlIO in these will be using freed memory, so may appear | |
31 | * to work, but must NOT be retained in production code. */ | |
cbec8ebe | 32 | #ifndef PERL_SYS_TERM_BODY |
1e5c5f69 | 33 | # define PERL_SYS_TERM_BODY() \ |
0721b9ab | 34 | ENV_TERM; USER_PROP_MUTEX_TERM; LOCALE_TERM; \ |
1e5c5f69 | 35 | HINTS_REFCNT_TERM; KEYWORD_PLUGIN_MUTEX_TERM; \ |
0721b9ab KW |
36 | OP_CHECK_MUTEX_TERM; OP_REFCNT_TERM; \ |
37 | PERLIO_TERM; MALLOC_TERM; | |
23f519f0 | 38 | #endif |
564894ea | 39 | #define dXSUB_SYS dNOOP |
c07a80fd | 40 | |
e6aa3164 | 41 | /* USEMYBINMODE |
42 | * This symbol, if defined, indicates that the program should | |
16fe6d59 | 43 | * use the routine my_binmode(FILE *fp, char iotype, int mode) to insure |
e6aa3164 | 44 | * that a file is in "binary" mode -- that is, that no translation |
45 | * of bytes occurs on read or write operations. | |
46 | */ | |
47 | #undef USEMYBINMODE | |
48 | ||
61bb5906 CB |
49 | /* Stat_t: |
50 | * This symbol holds the type used to declare buffers for information | |
51 | * returned by stat(). It's usually just struct stat. It may be necessary | |
52 | * to include <sys/stat.h> and <sys/types.h> to get any typedef'ed | |
53 | * information. | |
54 | */ | |
92b3a3eb TC |
55 | #if defined(WIN32) |
56 | # define Stat_t struct w32_stat | |
57 | #else | |
58 | # define Stat_t struct _stati64 | |
59 | #endif | |
61bb5906 | 60 | |
e6aa3164 | 61 | /* USE_STAT_RDEV: |
62 | * This symbol is defined if this system has a stat structure declaring | |
63 | * st_rdev | |
64 | */ | |
65 | #define USE_STAT_RDEV /**/ | |
66 | ||
67 | /* ACME_MESS: | |
68 | * This symbol, if defined, indicates that error messages should be | |
69 | * should be generated in a format that allows the use of the Acme | |
70 | * GUI/editor's autofind feature. | |
71 | */ | |
72 | #undef ACME_MESS /**/ | |
73 | ||
44a8e56a | 74 | /* ALTERNATE_SHEBANG: |
75 | * This symbol, if defined, contains a "magic" string which may be used | |
76 | * as the first line of a Perl program designed to be executed directly | |
77 | * by name, instead of the standard Unix #!. If ALTERNATE_SHEBANG | |
78 | * begins with a character other then #, then Perl will only treat | |
d1be9408 | 79 | * it as a command line if it finds the string "perl" in the first |
44a8e56a | 80 | * word; otherwise it's treated as the first line of code in the script. |
81 | * (IOW, Perl won't hand off to another interpreter via an alternate | |
82 | * shebang sequence that might be legal Perl code.) | |
83 | */ | |
84 | /* #define ALTERNATE_SHEBANG "#!" / **/ | |
85 | ||
a3526348 SH |
86 | #include <signal.h> |
87 | ||
a0d0e21e LW |
88 | /* |
89 | * fwrite1() should be a routine with the same calling sequence as fwrite(), | |
90 | * but which outputs all of the bytes requested as a single stream (unlike | |
91 | * fwrite() itself, which on some systems outputs several distinct records | |
92 | * if the number_of_items parameter is >1). | |
93 | */ | |
94 | #define fwrite1 fwrite | |
95 | ||
a0d0e21e | 96 | #define Fstat(fd,bufptr) fstat((fd),(bufptr)) |
4457f3fc | 97 | #define Fflush(fp) fflush(fp) |
8cc95fdb | 98 | #define Mkdir(path,mode) mkdir((path),(mode)) |
3fe9a6f1 | 99 | |
100 | #ifndef WIN32 | |
101 | # define Stat(fname,bufptr) stat((fname),(bufptr)) | |
102 | #else | |
2d7a9237 GS |
103 | # define HAS_IOCTL |
104 | # define HAS_UTIME | |
105 | # define HAS_KILL | |
106 | # define HAS_WAIT | |
b990f8c8 | 107 | # define HAS_CHOWN |
3fe9a6f1 | 108 | #endif /* WIN32 */ |
7da0e383 | 109 | |
a5f78619 AD |
110 | /* Don't go reading from /dev/urandom */ |
111 | #define PERL_NO_DEV_RANDOM | |
e9a8c099 | 112 | |
30ceec5d TK |
113 | #ifdef WIN32 |
114 | # define NO_ENVIRON_ARRAY | |
115 | #endif | |
116 | ||
e9a8c099 | 117 | /* |
14d04a33 | 118 | * ex: set ts=8 sts=4 sw=4 et: |
e9a8c099 | 119 | */ |