1 /* dosish.h 2 * 3 * Copyright (C) 1993, 1994, 1996, 1997, 1998, 1999, 4 * 2000, 2001, 2002, 2007, by Larry Wall and others 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 #define ABORT() abort(); 11 12 #ifndef SH_PATH 13 #define SH_PATH "/bin/sh" 14 #endif 15 16 #ifdef WIN32 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" 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 26 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. */ 32 #ifndef PERL_SYS_TERM_BODY 33 # define PERL_SYS_TERM_BODY() \ 34 ENV_TERM; USER_PROP_MUTEX_TERM; LOCALE_TERM; \ 35 HINTS_REFCNT_TERM; KEYWORD_PLUGIN_MUTEX_TERM; \ 36 OP_CHECK_MUTEX_TERM; OP_REFCNT_TERM; \ 37 PERLIO_TERM; MALLOC_TERM; 38 #endif 39 #define dXSUB_SYS dNOOP 40 41 /* USEMYBINMODE 42 * This symbol, if defined, indicates that the program should 43 * use the routine my_binmode(FILE *fp, char iotype, int mode) to insure 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 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 */ 55 #if defined(WIN32) 56 # define Stat_t struct w32_stat 57 #else 58 # define Stat_t struct _stati64 59 #endif 60 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 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 79 * it as a command line if it finds the string "perl" in the first 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 86 #include <signal.h> 87 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 96 #define Fstat(fd,bufptr) fstat((fd),(bufptr)) 97 #define Fflush(fp) fflush(fp) 98 #define Mkdir(path,mode) mkdir((path),(mode)) 99 100 #ifndef WIN32 101 # define Stat(fname,bufptr) stat((fname),(bufptr)) 102 #else 103 # define HAS_IOCTL 104 # define HAS_UTIME 105 # define HAS_KILL 106 # define HAS_WAIT 107 # define HAS_CHOWN 108 #endif /* WIN32 */ 109 110 /* Don't go reading from /dev/urandom */ 111 #define PERL_NO_DEV_RANDOM 112 113 #ifdef WIN32 114 # define NO_ENVIRON_ARRAY 115 #endif 116 117 /* 118 * ex: set ts=8 sts=4 sw=4 et: 119 */ 120