| 1 | /* dosish.h
|
|---|
| 2 | *
|
|---|
| 3 | * Copyright (C) 1993, 1994, 1996, 1997, 1998, 1999,
|
|---|
| 4 | * 2000, 2001, 2002, 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 DJGPP
|
|---|
| 17 | # define BIT_BUCKET "nul"
|
|---|
| 18 | # define OP_BINARY O_BINARY
|
|---|
| 19 | # define PERL_SYS_INIT(c,v) MALLOC_CHECK_TAINT2(*c,*v) Perl_DJGPP_init(c,v)
|
|---|
| 20 | # define init_os_extras Perl_init_os_extras
|
|---|
| 21 | # include <signal.h>
|
|---|
| 22 | # define HAS_UTIME
|
|---|
| 23 | # define HAS_KILL
|
|---|
| 24 | char *djgpp_pathexp (const char*);
|
|---|
| 25 | void Perl_DJGPP_init (int *argcp,char ***argvp);
|
|---|
| 26 | # if (DJGPP==2 && DJGPP_MINOR < 2)
|
|---|
| 27 | # define NO_LOCALECONV_MON_THOUSANDS_SEP
|
|---|
| 28 | # endif
|
|---|
| 29 | # ifdef USE_5005THREADS
|
|---|
| 30 | # define OLD_PTHREADS_API
|
|---|
| 31 | # endif
|
|---|
| 32 | # define PERL_FS_VER_FMT "%d_%d_%d"
|
|---|
| 33 | #else /* DJGPP */
|
|---|
| 34 | # ifdef WIN32
|
|---|
| 35 | # define PERL_SYS_INIT(c,v) MALLOC_CHECK_TAINT2(*c,*v) Perl_win32_init(c,v)
|
|---|
| 36 | # define PERL_SYS_TERM() Perl_win32_term()
|
|---|
| 37 | # define BIT_BUCKET "nul"
|
|---|
| 38 | # else
|
|---|
| 39 | # ifdef NETWARE
|
|---|
| 40 | # define PERL_SYS_INIT(c,v) MALLOC_CHECK_TAINT2(*c,*v) Perl_nw5_init(c,v)
|
|---|
| 41 | # define BIT_BUCKET "nwnul"
|
|---|
| 42 | # else
|
|---|
| 43 | # define PERL_SYS_INIT(c,v) MALLOC_CHECK_TAINT2(*c,*v)
|
|---|
| 44 | # define BIT_BUCKET "\\dev\\nul" /* "wanna be like, umm, Newlined, or somethin?" */
|
|---|
| 45 | # endif /* NETWARE */
|
|---|
| 46 | # endif
|
|---|
| 47 | #endif /* DJGPP */
|
|---|
| 48 |
|
|---|
| 49 | #ifndef PERL_SYS_TERM
|
|---|
| 50 | # define PERL_SYS_TERM() OP_REFCNT_TERM; MALLOC_TERM
|
|---|
| 51 | #endif
|
|---|
| 52 | #define dXSUB_SYS
|
|---|
| 53 |
|
|---|
| 54 | /*
|
|---|
| 55 | * 5.003_07 and earlier keyed on #ifdef MSDOS for determining if we were
|
|---|
| 56 | * running on DOS, *and* if we had to cope with 16 bit memory addressing
|
|---|
| 57 | * constraints, *and* we need to have memory allocated as unsigned long.
|
|---|
| 58 | *
|
|---|
| 59 | * with the advent of *real* compilers for DOS, they are not locked together.
|
|---|
| 60 | * MSDOS means "I am running on MSDOS". HAS_64K_LIMIT means "I have
|
|---|
| 61 | * 16 bit memory addressing constraints".
|
|---|
| 62 | *
|
|---|
| 63 | * if you need the last, try #DEFINE MEM_SIZE unsigned long.
|
|---|
| 64 | */
|
|---|
| 65 | #ifdef MSDOS
|
|---|
| 66 | # ifndef DJGPP
|
|---|
| 67 | # define HAS_64K_LIMIT
|
|---|
| 68 | # endif
|
|---|
| 69 | #endif
|
|---|
| 70 |
|
|---|
| 71 | /* USEMYBINMODE
|
|---|
| 72 | * This symbol, if defined, indicates that the program should
|
|---|
| 73 | * use the routine my_binmode(FILE *fp, char iotype, int mode) to insure
|
|---|
| 74 | * that a file is in "binary" mode -- that is, that no translation
|
|---|
| 75 | * of bytes occurs on read or write operations.
|
|---|
| 76 | */
|
|---|
| 77 | #undef USEMYBINMODE
|
|---|
| 78 |
|
|---|
| 79 | /* Stat_t:
|
|---|
| 80 | * This symbol holds the type used to declare buffers for information
|
|---|
| 81 | * returned by stat(). It's usually just struct stat. It may be necessary
|
|---|
| 82 | * to include <sys/stat.h> and <sys/types.h> to get any typedef'ed
|
|---|
| 83 | * information.
|
|---|
| 84 | */
|
|---|
| 85 | #if defined(WIN64) || defined(USE_LARGE_FILES)
|
|---|
| 86 | # if defined(__BORLANDC__) /* buk */
|
|---|
| 87 | # include <sys\stat.h>
|
|---|
| 88 | # define Stat_t struct stati64
|
|---|
| 89 | # else
|
|---|
| 90 | #define Stat_t struct _stati64
|
|---|
| 91 | # endif
|
|---|
| 92 | #else
|
|---|
| 93 | #if defined(UNDER_CE)
|
|---|
| 94 | #define Stat_t struct xcestat
|
|---|
| 95 | #else
|
|---|
| 96 | #define Stat_t struct stat
|
|---|
| 97 | #endif
|
|---|
| 98 | #endif
|
|---|
|
|---|