home *** CD-ROM | disk | FTP | other *** search
/ Programming with VisualAge for Java / IBMVJAVA.ISO / icswin95 / httpdw32.z / systems.h < prev    next >
C/C++ Source or Header  |  1997-04-07  |  3KB  |  149 lines

  1. /* NETSCAPE SEZ:
  2.  * Copyright (c) 1994, 1995.  Netscape Communications Corporation.  All
  3.  * rights reserved.
  4.  *
  5.  * Use of this software is governed by the terms of the license agreement for
  6.  * the Netscape Communications or Netscape Comemrce Server between the
  7.  * parties.
  8.  */
  9.  
  10. /* ------------------------------------------------------------------------ */
  11.  
  12. /*
  13.  * systems.h: Lists of defines for systems
  14.  *
  15.  * This sets what general flavor the system is (UNIX, etc.),
  16.  * and defines what extra functions your particular system needs.
  17.  */
  18.  
  19. #ifndef NS_SYSTEMS_H
  20. #define NS_SYSTEMS_H
  21.  
  22. #include <string.h>
  23.  
  24. #define DAEMON_ANY
  25. #define DAEMON_LISTEN_SIZE 128
  26. #ifndef MCC_ADMSERV
  27. #define DAEMON_STATS
  28. #endif
  29.  
  30. /* Linux is not currently supported */
  31. #if defined(SOLARIS)
  32.  
  33. #define FILE_UNIX
  34. #define XP_UNIX
  35. #undef FILE_STDIO
  36. #define NET_SOCKETS
  37. /* #define FILE_UNIX_MMAP
  38.    #define FILE_MMAP_FLAGS MAP_PRIVATE
  39.    #define DAEMON_UNIX_MOBRULE
  40.    #define DAEMON_NEEDS_SEMAPHORE
  41.  
  42.    We don't bother with these
  43.  */
  44. #undef BSD_SIGNALS
  45. #define BSD_RLIMIT
  46. #define NEED_CRYPT_H
  47. #define AUTH_DBM
  48. /* The Solaris routines return ENOSPC when too many semaphores are SEM_UNDO. */
  49. #define SEM_FLOCK
  50. #define DLL_CAPABLE
  51. #define DLL_DLOPEN
  52.  
  53. #define ZERO(ptr,len) memset(ptr,0,len)
  54.  
  55. #elif defined(AIX) || defined(_OE_)
  56.  
  57. #define FILE_UNIX
  58. #define XP_UNIX
  59. #undef FILE_STDIO
  60. #undef DAEMON_UNIX_FORK
  61. #undef DAEMON_UNIX_POOL
  62. #define NET_SOCKETS
  63. /*
  64.   #define FILE_UNIX_MMAP
  65.   #define FILE_MMAP_FLAGS MAP_PRIVATE
  66.   #define DAEMON_UNIX_MOBRULE
  67.   #define DAEMON_NEEDS_SEMAPHORE
  68.  
  69.   We don't bother with these
  70. */
  71. #undef BSD_SIGNALS
  72. #define BSD_RLIMIT
  73. #undef NEED_CRYPT_H
  74. #define AUTH_DBM
  75. #define SEM_FLOCK
  76. #define ZERO(ptr,len) memset(ptr,0,len)
  77. #define DLL_CAPABLE
  78. #define DLL_DLOPEN
  79.  
  80. #elif defined(HPUX)
  81.  
  82. #define FILE_UNIX
  83. #define XP_UNIX
  84. #undef FILE_STDIO
  85. #define NET_SOCKETS
  86. /*
  87.   #define FILE_UNIX_MMAP
  88.   #define FILE_MMAP_FLAGS MAP_PRIVATE
  89.   #define DAEMON_UNIX_MOBRULE
  90.   #define DAEMON_NEEDS_SEMAPHORE
  91.  
  92.   We don't bother with these
  93. */
  94. #undef BSD_SIGNALS
  95. #undef BSD_RLIMIT
  96. #undef NEED_CRYPT_H
  97. #define AUTH_DBM
  98. #define SEM_FLOCK
  99. #define ZERO(ptr,len) memset(ptr,0,len)
  100. #define DLL_CAPABLE
  101. #define DLL_HPSHL
  102.  
  103. #elif defined (WIN32)      /* Windows NT */
  104.  
  105. #include <wtypes.h>
  106. #include <winbase.h>
  107.  
  108. typedef void* PASSWD;
  109.  
  110. #define FILE_WIN32
  111. #define NET_SOCKETS
  112. #define NET_WINSOCK
  113. #define DAEMON_WIN32
  114. #undef AUTH_DBM
  115. #define ZERO(ptr, len) ZeroMemory(ptr, len)
  116. #define SEM_WIN32
  117. #define DLL_CAPABLE
  118. #define DLL_WIN32
  119. #define NO_NODELOCK /* aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaagh */
  120.  
  121. /* The stat call under NT doesn't define these macros */
  122. #define S_ISDIR(mode)   ((mode&S_IFMT) == S_IFDIR)
  123. #define S_ISREG(mode)   ((mode&S_IFMT) == S_IFREG)
  124.  
  125. #define strcasecmp util_strcasecmp
  126. #define strncasecmp util_strncasecmp
  127. int util_strcasecmp(const char *s1, const char *s2);
  128. int util_strncasecmp(const char *s1, const char *s2, int n);
  129.  
  130. #elif defined(OS2)
  131.  
  132. #define FILE_OS2
  133. #define NET_SOCKETS
  134. #define DAEMON_OS2
  135. #define ZERO(ptr, len) memset(ptr,0,len)
  136. #define SEM_OS2
  137. #define DLL_CAPABLE
  138. #define DLL_OS2
  139.  
  140. /* The stat call under OS2 doesn't define these macros */
  141. #define S_ISDIR(mode)   ((mode&S_IFMT) == S_IFDIR)
  142. #define S_ISREG(mode)   ((mode&S_IFMT) == S_IFREG)
  143.  
  144. #endif
  145.  
  146.  
  147. #endif /* NS_SYSTEMS_H */
  148.  
  149.