home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programming with VisualAge for Java
/
IBMVJAVA.ISO
/
icswinnt
/
httpdw32.z
/
systems.h
< prev
next >
Wrap
C/C++ Source or Header
|
1997-03-12
|
3KB
|
149 lines
/* NETSCAPE SEZ:
* Copyright (c) 1994, 1995. Netscape Communications Corporation. All
* rights reserved.
*
* Use of this software is governed by the terms of the license agreement for
* the Netscape Communications or Netscape Comemrce Server between the
* parties.
*/
/* ------------------------------------------------------------------------ */
/*
* systems.h: Lists of defines for systems
*
* This sets what general flavor the system is (UNIX, etc.),
* and defines what extra functions your particular system needs.
*/
#ifndef NS_SYSTEMS_H
#define NS_SYSTEMS_H
#include <string.h>
#define DAEMON_ANY
#define DAEMON_LISTEN_SIZE 128
#ifndef MCC_ADMSERV
#define DAEMON_STATS
#endif
/* Linux is not currently supported */
#if defined(SOLARIS)
#define FILE_UNIX
#define XP_UNIX
#undef FILE_STDIO
#define NET_SOCKETS
/* #define FILE_UNIX_MMAP
#define FILE_MMAP_FLAGS MAP_PRIVATE
#define DAEMON_UNIX_MOBRULE
#define DAEMON_NEEDS_SEMAPHORE
We don't bother with these
*/
#undef BSD_SIGNALS
#define BSD_RLIMIT
#define NEED_CRYPT_H
#define AUTH_DBM
/* The Solaris routines return ENOSPC when too many semaphores are SEM_UNDO. */
#define SEM_FLOCK
#define DLL_CAPABLE
#define DLL_DLOPEN
#define ZERO(ptr,len) memset(ptr,0,len)
#elif defined(AIX) || defined(_OE_)
#define FILE_UNIX
#define XP_UNIX
#undef FILE_STDIO
#undef DAEMON_UNIX_FORK
#undef DAEMON_UNIX_POOL
#define NET_SOCKETS
/*
#define FILE_UNIX_MMAP
#define FILE_MMAP_FLAGS MAP_PRIVATE
#define DAEMON_UNIX_MOBRULE
#define DAEMON_NEEDS_SEMAPHORE
We don't bother with these
*/
#undef BSD_SIGNALS
#define BSD_RLIMIT
#undef NEED_CRYPT_H
#define AUTH_DBM
#define SEM_FLOCK
#define ZERO(ptr,len) memset(ptr,0,len)
#define DLL_CAPABLE
#define DLL_DLOPEN
#elif defined(HPUX)
#define FILE_UNIX
#define XP_UNIX
#undef FILE_STDIO
#define NET_SOCKETS
/*
#define FILE_UNIX_MMAP
#define FILE_MMAP_FLAGS MAP_PRIVATE
#define DAEMON_UNIX_MOBRULE
#define DAEMON_NEEDS_SEMAPHORE
We don't bother with these
*/
#undef BSD_SIGNALS
#undef BSD_RLIMIT
#undef NEED_CRYPT_H
#define AUTH_DBM
#define SEM_FLOCK
#define ZERO(ptr,len) memset(ptr,0,len)
#define DLL_CAPABLE
#define DLL_HPSHL
#elif defined (WIN32) /* Windows NT */
#include <wtypes.h>
#include <winbase.h>
typedef void* PASSWD;
#define FILE_WIN32
#define NET_SOCKETS
#define NET_WINSOCK
#define DAEMON_WIN32
#undef AUTH_DBM
#define ZERO(ptr, len) ZeroMemory(ptr, len)
#define SEM_WIN32
#define DLL_CAPABLE
#define DLL_WIN32
#define NO_NODELOCK /* aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaagh */
/* The stat call under NT doesn't define these macros */
#define S_ISDIR(mode) ((mode&S_IFMT) == S_IFDIR)
#define S_ISREG(mode) ((mode&S_IFMT) == S_IFREG)
#define strcasecmp util_strcasecmp
#define strncasecmp util_strncasecmp
int util_strcasecmp(const char *s1, const char *s2);
int util_strncasecmp(const char *s1, const char *s2, int n);
#elif defined(OS2)
#define FILE_OS2
#define NET_SOCKETS
#define DAEMON_OS2
#define ZERO(ptr, len) memset(ptr,0,len)
#define SEM_OS2
#define DLL_CAPABLE
#define DLL_OS2
/* The stat call under OS2 doesn't define these macros */
#define S_ISDIR(mode) ((mode&S_IFMT) == S_IFDIR)
#define S_ISREG(mode) ((mode&S_IFMT) == S_IFREG)
#endif
#endif /* NS_SYSTEMS_H */