home *** CD-ROM | disk | FTP | other *** search
/ Internet Publisher's Toolbox 2.0 / Internet Publisher's Toolbox.iso / internet / ntserver / wtsource / ustubs.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-02-16  |  2.5 KB  |  110 lines

  1. /* WIDE AREA INFORMATION SERVER SOFTWARE:
  2.    No guarantees or restrictions.  See the readme file for the full standard
  3.    disclaimer.  
  4.   
  5.    4.14.90  Harry Morris, morris@think.com
  6.    7.24.90      added include of sys/types
  7. */
  8.  
  9. /* Copyright (c) CNIDR (see ../COPYRIGHT) */
  10.  
  11.  
  12. /*----------------------------------------------------------------------*/
  13. /* definitions that non-ansi (aka sun) C doesn't provide */
  14.  
  15. #ifndef USTUBS_H
  16. #define USTUBS_H
  17.  
  18. #include "cdialect.h"
  19.  
  20. #ifndef  ANSI_LIKE
  21.  
  22. #include <sys/types.h>
  23.  
  24. #ifdef M_XENIX
  25. #include <string.h>
  26. #endif /* ndef M_XENIX */
  27.  
  28. #ifndef size_t
  29. #ifndef M_XENIX
  30. #define size_t  unsigned long
  31. #endif /* ndf M_XENIX */
  32. #endif /* ndef size_t */
  33.  
  34. #ifndef ANSI_LIKE
  35. #ifndef M_XENIX
  36. #define time_t long
  37. #endif /* ndef M_XENIX */
  38. #endif /* ndef ANSI_LIKE */
  39.  
  40. /* #if defined(K_AND_R) && !defined(__STDC__) */  /* this might be too general, but it is needed on vaxen */
  41. #if defined(K_AND_R)  /* this might be too general, but it is needed on vaxen */
  42. #define void char
  43. #endif /* ndef K_AND_R */
  44.  
  45. #ifdef __cplusplus
  46. /* declare these as C style functions */
  47. extern "C"
  48.     {
  49. #endif /* def __cplusplus */
  50.  
  51. char *strstr _AP((char *src, char *sub));
  52.  
  53. #ifdef SYSV
  54. char *getwd _AP((char *pathname));
  55. #define rename(f1,f2) {link((f1),(f2)); unlink((f1)); }
  56. #endif /* defu SYSV */
  57.  
  58. #if !(defined(NeXT) || defined(Mach))
  59. #ifndef M_XENIX
  60. #ifndef cstar
  61. #ifndef __osf__
  62. char* malloc _AP((size_t size));
  63. char* calloc _AP((size_t nelem,size_t elsize));
  64. void free _AP((char* ptr));
  65. char* realloc _AP((char* ptr,size_t size));
  66. #endif /* ndef __osf__ */
  67. #ifndef mips
  68. #ifndef hpux
  69. #ifndef vax
  70. #ifndef __osf__
  71. char* memcpy _AP((char* s1,char* s2,size_t c));
  72. void* memmove _AP((void* s1,void* s2,size_t n));
  73. #endif /* ndef __osf__ */
  74. #endif /* ndef vax */
  75. #endif /* ndef hpux */
  76. #endif /* ndef mips */
  77. char *strcat _AP((char *s1, char *s2));
  78. #endif /* ndef cstar */
  79. #endif /* ndef M_XENIX */
  80. #endif /* not NeXT or Mach */
  81.  
  82. long atol _AP((char *s));
  83.  
  84. #ifdef __cplusplus
  85.     }
  86. #endif /* def __cplusplus */
  87.  
  88. #else /* def ANSI_LIKE */
  89.  
  90. #ifdef __GNUC__ /* we are ansi like, are we gcc? */
  91.  
  92. #ifdef __cplusplus
  93. /* declare these as C style functions */
  94. extern "C"
  95.     {
  96. #endif /* def __cplusplus */
  97. /*void* memmove _AP((void* s1,void* s2,size_t n));*/
  98. #ifdef __cplusplus
  99.     }
  100. #endif /* def __cplusplus */
  101.  
  102. #endif /* ifdef __GNUC__ */
  103.  
  104. #endif /* else ndef ANSI_LIKE */
  105.  
  106. /*----------------------------------------------------------------------*/
  107.  
  108. #endif /* ndef USTUBS_H */
  109.  
  110.