xref: /openbsd-src/gnu/usr.bin/perl/dosish.h (revision f6aab3d83b51b91c24247ad2c2573574de475a82)
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 #ifndef PERL_SYS_TERM_BODY
28 #  define PERL_SYS_TERM_BODY()                         \
29     HINTS_REFCNT_TERM; KEYWORD_PLUGIN_MUTEX_TERM;      \
30     OP_CHECK_MUTEX_TERM; OP_REFCNT_TERM; PERLIO_TERM;  \
31     MALLOC_TERM; LOCALE_TERM; USER_PROP_MUTEX_TERM;    \
32     ENV_TERM;
33 #endif
34 #define dXSUB_SYS dNOOP
35 
36 /* USEMYBINMODE
37  *	This symbol, if defined, indicates that the program should
38  *	use the routine my_binmode(FILE *fp, char iotype, int mode) to insure
39  *	that a file is in "binary" mode -- that is, that no translation
40  *	of bytes occurs on read or write operations.
41  */
42 #undef USEMYBINMODE
43 
44 /* Stat_t:
45  *	This symbol holds the type used to declare buffers for information
46  *	returned by stat().  It's usually just struct stat.  It may be necessary
47  *	to include <sys/stat.h> and <sys/types.h> to get any typedef'ed
48  *	information.
49  */
50 #if defined(WIN32)
51 #  define Stat_t struct w32_stat
52 #else
53 #  define Stat_t struct _stati64
54 #endif
55 
56 /* USE_STAT_RDEV:
57  *	This symbol is defined if this system has a stat structure declaring
58  *	st_rdev
59  */
60 #define USE_STAT_RDEV 	/**/
61 
62 /* ACME_MESS:
63  *	This symbol, if defined, indicates that error messages should be
64  *	should be generated in a format that allows the use of the Acme
65  *	GUI/editor's autofind feature.
66  */
67 #undef ACME_MESS	/**/
68 
69 /* ALTERNATE_SHEBANG:
70  *	This symbol, if defined, contains a "magic" string which may be used
71  *	as the first line of a Perl program designed to be executed directly
72  *	by name, instead of the standard Unix #!.  If ALTERNATE_SHEBANG
73  *	begins with a character other then #, then Perl will only treat
74  *	it as a command line if it finds the string "perl" in the first
75  *	word; otherwise it's treated as the first line of code in the script.
76  *	(IOW, Perl won't hand off to another interpreter via an alternate
77  *	shebang sequence that might be legal Perl code.)
78  */
79 /* #define ALTERNATE_SHEBANG "#!" / **/
80 
81 #include <signal.h>
82 
83 /*
84  * fwrite1() should be a routine with the same calling sequence as fwrite(),
85  * but which outputs all of the bytes requested as a single stream (unlike
86  * fwrite() itself, which on some systems outputs several distinct records
87  * if the number_of_items parameter is >1).
88  */
89 #define fwrite1 fwrite
90 
91 #define Fstat(fd,bufptr)   fstat((fd),(bufptr))
92 #define Fflush(fp)      fflush(fp)
93 #define Mkdir(path,mode)   mkdir((path),(mode))
94 
95 #ifndef WIN32
96 #  define Stat(fname,bufptr) stat((fname),(bufptr))
97 #else
98 #  define HAS_IOCTL
99 #  define HAS_UTIME
100 #  define HAS_KILL
101 #  define HAS_WAIT
102 #  define HAS_CHOWN
103 #endif	/* WIN32 */
104 
105 /* Don't go reading from /dev/urandom */
106 #define PERL_NO_DEV_RANDOM
107 
108 /*
109  * ex: set ts=8 sts=4 sw=4 et:
110  */
111