summaryrefslogtreecommitdiff
path: root/ACE/apps/JAWS/clients/WebSTONE/src/nsapi-includes/base/systems.h
blob: fbdf805a2cf65700bef4a622209166d5b01b81c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
/*
 * 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 SYSTEMS_H
#define 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 */
#ifdef ACE_LINUX

#define FILE_UNIX
#undef FILE_STDIO
#undef DAEMON_UNIX_FORK
#undef DAEMON_UNIX_POOL
#define DAEMON_UNIX_MOBRULE
#undef DAEMON_STATS
#define BSD_FLOCK
#define BSD_RLIMIT
#define NET_SOCKETS
#define FILE_UNIX_MMAP
#define FILE_MMAP_FLAGS (MAP_FILE | MAP_PRIVATE)
#undef BSD_SIGNALS

#undef NEED_CRYPT_PROTO
#undef AUTH_DBM
#define SEM_FLOCK


#define ZERO(ptr,len) memset(ptr,0,len)

#elif defined(BSDI)

#define FILE_UNIX
#define DAEMON_UNIX_MOBRULE
#define BSD_FLOCK
#define BSD_RLIMIT
#define NET_SOCKETS
#define FILE_UNIX_MMAP
#define FILE_MMAP_FLAGS (MAP_FILE | MAP_PRIVATE)
#define BSD_SIGNALS
#define BSD_TIME
#define BSD_MAIL
#undef NEED_CRYPT_PROTO
#define AUTH_DBM
#define SEM_FLOCK

#define ZERO(ptr,len) memset(ptr,0,len)

#elif defined(SUNOS4)

#define BSD_SIGNALS
#define BSD_TIME
#define BSD_MAIL
#define BSD_FLOCK
#define BSD_RLIMIT
#define FILE_UNIX
#undef FILE_STDIO
#define DAEMON_UNIX_MOBRULE
#define NET_SOCKETS
#define FILE_UNIX_MMAP
#define FILE_MMAP_FLAGS MAP_PRIVATE
#undef NEED_CRYPT_H
#define NEED_CRYPT_PROTO
#define AUTH_DBM
#define SEM_FLOCK
#define ZERO(ptr,len) memset(ptr,0,len)
#define DLL_CAPABLE
#define DLL_DLOPEN

#elif defined(OSF1)

#undef BSD_SIGNALS
#define BSD_TIME
#define BSD_FLOCK
#define BSD_RLIMIT
#define FILE_UNIX
#undef FILE_STDIO
#define DAEMON_UNIX_MOBRULE
#define DAEMON_NEEDS_SEMAPHORE
#define NET_SOCKETS
#define FILE_UNIX_MMAP
#define FILE_MMAP_FLAGS MAP_PRIVATE
#define AUTH_DBM
#define SEM_FLOCK
#define ZERO(ptr,len) memset(ptr,0,len)
#define DLL_CAPABLE
#define DLL_DLOPEN

#else      /* 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);
#endif  /* Windows NT */

#endif