home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / perl_blb.zip / os2 / 5.00455 / CORE / unixish.h < prev    next >
C/C++ Source or Header  |  1997-11-25  |  4KB  |  125 lines

  1. /*
  2.  * The following symbols are defined if your operating system supports
  3.  * functions by that name.  All Unixes I know of support them, thus they
  4.  * are not checked by the configuration script, but are directly defined
  5.  * here.
  6.  */
  7.  
  8. /* HAS_IOCTL:
  9.  *    This symbol, if defined, indicates that the ioctl() routine is
  10.  *    available to set I/O characteristics
  11.  */
  12. #define    HAS_IOCTL        / **/
  13.  
  14. /* HAS_UTIME:
  15.  *    This symbol, if defined, indicates that the routine utime() is
  16.  *    available to update the access and modification times of files.
  17.  */
  18. #define HAS_UTIME        / **/
  19.  
  20. /* HAS_GROUP
  21.  *    This symbol, if defined, indicates that the getgrnam(),
  22.  *    getgrgid(), and getgrent() routines are available to 
  23.  *    get group entries.
  24.  */
  25. #define HAS_GROUP        / **/
  26.  
  27. /* HAS_PASSWD
  28.  *    This symbol, if defined, indicates that the getpwnam(),
  29.  *    getpwuid(), and getpwent() routines are available to 
  30.  *    get password entries.
  31.  */
  32. #define HAS_PASSWD        / **/
  33.  
  34. #define HAS_KILL
  35. #define HAS_WAIT
  36.   
  37. /* USEMYBINMODE
  38.  *    This symbol, if defined, indicates that the program should
  39.  *    use the routine my_binmode(FILE *fp, char iotype) to insure
  40.  *    that a file is in "binary" mode -- that is, that no translation
  41.  *    of bytes occurs on read or write operations.
  42.  */
  43. #undef USEMYBINMODE
  44.  
  45. /* USE_STAT_RDEV:
  46.  *    This symbol is defined if this system has a stat structure declaring
  47.  *    st_rdev
  48.  */
  49. #define USE_STAT_RDEV     / **/
  50.  
  51. /* ACME_MESS:
  52.  *    This symbol, if defined, indicates that error messages should be 
  53.  *    should be generated in a format that allows the use of the Acme
  54.  *    GUI/editor's autofind feature.
  55.  */
  56. #undef ACME_MESS    /**/
  57.  
  58. /* UNLINK_ALL_VERSIONS:
  59.  *    This symbol, if defined, indicates that the program should arrange
  60.  *    to remove all versions of a file if unlink() is called.  This is
  61.  *    probably only relevant for VMS.
  62.  */
  63. /* #define UNLINK_ALL_VERSIONS        / **/
  64.  
  65. /* VMS:
  66.  *    This symbol, if defined, indicates that the program is running under
  67.  *    VMS.  It is currently automatically set by cpps running under VMS,
  68.  *    and is included here for completeness only.
  69.  */
  70. /* #define VMS        / **/
  71.  
  72. /* ALTERNATE_SHEBANG:
  73.  *    This symbol, if defined, contains a "magic" string which may be used
  74.  *    as the first line of a Perl program designed to be executed directly
  75.  *    by name, instead of the standard Unix #!.  If ALTERNATE_SHEBANG
  76.  *    begins with a character other then #, then Perl will only treat
  77.  *    it as a command line if if finds the string "perl" in the first
  78.  *    word; otherwise it's treated as the first line of code in the script.
  79.  *    (IOW, Perl won't hand off to another interpreter via an alternate
  80.  *    shebang sequence that might be legal Perl code.)
  81.  */
  82. /* #define ALTERNATE_SHEBANG "#!" / **/
  83.  
  84. #if !defined(NSIG) || defined(M_UNIX) || defined(M_XENIX)
  85. # include <signal.h>
  86. #endif
  87.  
  88. #ifndef SIGABRT
  89. #    define SIGABRT SIGILL
  90. #endif
  91. #ifndef SIGILL
  92. #    define SIGILL 6         /* blech */
  93. #endif
  94. #define ABORT() kill(getpid(),SIGABRT);
  95.  
  96. /*
  97.  * fwrite1() should be a routine with the same calling sequence as fwrite(),
  98.  * but which outputs all of the bytes requested as a single stream (unlike
  99.  * fwrite() itself, which on some systems outputs several distinct records
  100.  * if the number_of_items parameter is >1).
  101.  */
  102. #define fwrite1 fwrite
  103.  
  104. #define Stat(fname,bufptr) stat((fname),(bufptr))
  105. #define Fstat(fd,bufptr)   fstat((fd),(bufptr))
  106. #define Fflush(fp)         fflush(fp)
  107. #define Mkdir(path,mode)   mkdir((path),(mode))
  108.  
  109. #ifndef PERL_SYS_INIT
  110. #ifdef PERL_SCO5
  111. /* this should be set in a hint file, not here */
  112. #  define PERL_SYS_INIT(c,v)    fpsetmask(0); MALLOC_INIT
  113. #else
  114. #  define PERL_SYS_INIT(c,v)    MALLOC_INIT
  115. #endif
  116. #endif
  117.  
  118. #ifndef PERL_SYS_TERM
  119. #define PERL_SYS_TERM()        MALLOC_TERM
  120. #endif
  121.  
  122. #define BIT_BUCKET "/dev/null"
  123.  
  124. #define dXSUB_SYS
  125.