home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / info-service / gopher / Unix / gopher+1.2b4 / object / compatible.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-04-15  |  3.8 KB  |  161 lines

  1. /********************************************************************
  2.  * lindner
  3.  * 3.2
  4.  * 1993/04/15 21:36:33
  5.  * /home/mudhoney/GopherSrc/CVS/gopher+/object/compatible.h,v
  6.  * Exp
  7.  *
  8.  * Paul Lindner, University of Minnesota CIS.
  9.  *
  10.  * Copyright 1991, 1992 by the Regents of the University of Minnesota
  11.  * see the file "Copyright" in the distribution for conditions of use.
  12.  *********************************************************************
  13.  * MODULE: compatible.h
  14.  * Header file to make things compatible and define stuff in compatible.c
  15.  *********************************************************************
  16.  * Revision History:
  17.  * compatible.h,v
  18.  * Revision 3.2  1993/04/15  21:36:33  lindner
  19.  * Emulation of geteuid calls for HPs
  20.  *
  21.  * Revision 3.1.1.1  1993/02/11  18:03:05  lindner
  22.  * Gopher+1.2beta release
  23.  *
  24.  * Revision 1.7  1993/01/14  21:58:02  lindner
  25.  * Added #define that makes compatible compile fine under UCX
  26.  *
  27.  * Revision 1.6  1993/01/11  19:56:20  lindner
  28.  * Fixed prototype for strcasecmp
  29.  *
  30.  * Revision 1.5  1993/01/09  02:25:57  lindner
  31.  * Added definition for SIG_ERR for systems that don't have it.
  32.  *
  33.  * Revision 1.4  1993/01/08  23:17:20  lindner
  34.  * Added more mods for VMS.
  35.  *
  36.  * Revision 1.3  1993/01/06  23:09:44  lindner
  37.  * Added definition for AIX370 for strdup()
  38.  *
  39.  * Revision 1.2  1992/12/31  04:42:02  lindner
  40.  * Changes for VMS, new switch NO_STRCASECMP
  41.  *
  42.  * Revision 1.1  1992/12/10  23:27:52  lindner
  43.  * gopher 1.1 release
  44.  *
  45.  *
  46.  *********************************************************************/
  47. /*
  48.  * Protoize a little 
  49.  */
  50.  
  51. #ifndef compatible_h_
  52. #define compatible_h_
  53.  
  54. /******************** for SIG_ERR **/
  55. #ifndef SIG_ERR
  56. #  ifdef __STDC__
  57. #    define SIG_ERR         ((void (*) (int))-1)
  58. #  else
  59. #    define SIG_ERR         ((void (*) ())-1)
  60. #  endif        /* __STDC__ */
  61. #endif        /* SIG_ERR */
  62.  
  63.  
  64.  
  65. /******************** for strstr() **/
  66.  
  67. #if defined(NOSTRSTR) || (defined(mips) && !defined(ultrix)) || defined(sequent) || defined(n16) || defined(sony_news)
  68. #undef  NOSTRSTR
  69. #define NOSTRSTR
  70. char *strstr();
  71. #endif
  72.  
  73. /******************** for tempnam() **/
  74.  
  75. #if defined(__convex__) || defined(NeXT) || defined(sequent) || defined(VMS) || defined(NO_TEMPNAM)
  76. #undef  NO_TEMPNAM
  77. #define NO_TEMPNAM
  78. char *tempnam();
  79. #endif
  80.  
  81. /******************************** for strdup() **/
  82.  
  83. #if defined(mips) || defined(ultrix) || defined(NeXT) || defined(sony_news) || defined(sequent) || defined (VMS) || defined(_AUX_SOURCE) || defined(_AIX370) || defined(NO_STRDUP) 
  84. #undef  NO_STRDUP
  85. #define NO_STRDUP
  86. char *strdup();
  87. #endif
  88.  
  89. /********************** For bzero()/bcopy() etc */
  90.  
  91. #if defined(USG) || defined(NO_BZERO) || defined(_SEQUENT_) || defined(VMS)
  92.  
  93. #define bzero(a,b)   memset(a,'\0',b)
  94. #define bcopy(a,b,c) memcpy(b,a,c)
  95.      
  96. #endif
  97.  
  98. /********************* For getwd() */
  99.  
  100. #if defined(M_XENIX) || defined(hpux) || defined(USG) || defined(NO_GETWD)
  101. # define getwd(a) getcwd(a,sizeof(a))
  102. #endif
  103.  
  104. /********************* For tzset() */
  105.  
  106. #if defined(NO_TZSET) || defined(sequent)
  107. #undef  NO_TZSET
  108. #define NO_TZSET
  109. void tzset();
  110. #endif
  111.  
  112. /******************** For strcasecmp() */
  113.  
  114. #if defined(NO_STRCASECMP) || defined(VMS) 
  115. #  undef NO_STRCASECMP
  116. #  define NO_STRCASECMP
  117. int strcasecmp();
  118. #endif
  119.  
  120. /******************** For geteuid() */
  121.  
  122. #if defined(NO_SETEUID) || defined (__hpux)
  123. # undef   NO_SETEUID
  124. # define  NO_SETEUID
  125.  
  126.  
  127. #define seteuid(x) setresuid(-1,x,-1)
  128. #define setguid(x) setresgid(-1,x,-1)  
  129.  
  130. #endif
  131.  
  132.  
  133. /********************* For VMS */
  134.  
  135. #if defined(VMS)
  136. #  define popen(a,b) fopen(a,b)
  137. #  define pclose(a)  fclose(a)
  138. #  define unlink delete
  139.  
  140. #  define fopen fopen_VMSopt
  141.    FILE *fopen_VMSopt();
  142. #  define open open_VMSopt
  143.    int open_VMSopt();
  144.  
  145. #  if defined(UCX)
  146. #    define closenet close
  147. #  endif
  148.  
  149. #else
  150.    /* non-VMS systems don't need a special netclose either */
  151. #  define closenet close
  152.  
  153. #endif  /** VMS **/
  154.  
  155. #endif  /* compatible_h_ */
  156.  
  157.  
  158.  
  159.  
  160.  
  161.