blob: aaed87ab4a9bcb271b88fe123f0fea2667026f20 (
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
|
// -*- C++ -*-
//=============================================================================
/**
* @file Default_Constants.h
*
* $Id$
*
* @author Douglas C. Schmidt <schmidt@cs.wustl.edu>
* @author Jesper S. M|ller<stophph@diku.dk>
* @author and a cast of thousands...
* @This one is split from the famous OS.h
*/
//=============================================================================
#ifndef ACE_DEFAULT_CONSTANTS_H
#define ACE_DEFAULT_CONSTANTS_H
#include "ace/pre.h"
// Included just keep compilers that see #pragma dierctive first
// happy.
#include "ace/config-all.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
// Define the default constants for ACE. Many of these are used for
// the ACE tests and applications. You can change these values by
// defining the macros in your config.h file.
# if !defined (ACE_DEFAULT_CLOSE_ALL_HANDLES)
# define ACE_DEFAULT_CLOSE_ALL_HANDLES 1
# endif /* ACE_DEFAULT_CLOSE_ALL_HANDLES */
// The maximum length for a fully qualified Internet name.
# if !defined(ACE_MAX_FULLY_QUALIFIED_NAME_LEN)
# define ACE_MAX_FULLY_QUALIFIED_NAME_LEN 256
# endif /* ACE_MAX_FULLY_QUALIFIED_NAME_LEN */
# if defined (ACE_HAS_4_4BSD_SENDMSG_RECVMSG)
// Control message size to pass a file descriptor.
# define ACE_BSD_CONTROL_MSG_LEN sizeof (struct cmsghdr) + sizeof (ACE_HANDLE)
# if defined (ACE_LACKS_CMSG_DATA_MACRO)
# if defined (ACE_LACKS_CMSG_DATA_MEMBER)
# define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1))
# else
# define CMSG_DATA(cmsg) ((cmsg)->cmsg_data)
# endif /* ACE_LACKS_CMSG_DATA_MEMBER */
# endif /* ACE_LACKS_CMSG_DATA_MACRO */
# endif /* ACE_HAS_4_4BSD_SENDMSG_RECVMSG */
#if !defined (ACE_DEFAULT_PAGEFILE_POOL_BASE)
#define ACE_DEFAULT_PAGEFILE_POOL_BASE (void *) 0
#endif /* ACE_DEFAULT_PAGEFILE_POOL_BASE */
#if !defined (ACE_DEFAULT_PAGEFILE_POOL_SIZE)
#define ACE_DEFAULT_PAGEFILE_POOL_SIZE (size_t) 0x01000000
#endif /* ACE_DEFAULT_PAGEFILE_POOL_SIZE */
#if !defined (ACE_DEFAULT_PAGEFILE_POOL_CHUNK)
#define ACE_DEFAULT_PAGEFILE_POOL_CHUNK (size_t) 0x00010000
#endif /* ACE_DEFAULT_PAGEFILE_POOL_CHUNK */
#if !defined (ACE_DEFAULT_PAGEFILE_POOL_NAME)
#define ACE_DEFAULT_PAGEFILE_POOL_NAME ACE_LIB_TEXT ("Default_ACE_Pagefile_Memory_Pool")
#endif /* ACE_DEFAULT_PAGEFILE_POOL_NAME */
#if !defined (ACE_DEFAULT_MESSAGE_BLOCK_PRIORITY)
#define ACE_DEFAULT_MESSAGE_BLOCK_PRIORITY 0
#endif /* ACE_DEFAULT_MESSAGE_BLOCK_PRIORITY */
#if !defined (ACE_DEFAULT_SERVICE_REPOSITORY_SIZE)
#define ACE_DEFAULT_SERVICE_REPOSITORY_SIZE 1024
#endif /* ACE_DEFAULT_SERVICE_REPOSITORY_SIZE */
#if !defined (ACE_REACTOR_NOTIFICATION_ARRAY_SIZE)
#define ACE_REACTOR_NOTIFICATION_ARRAY_SIZE 1024
#endif /* ACE_REACTOR_NOTIFICATION_ARRAY_SIZE */
# if !defined (ACE_DEFAULT_TIMEOUT)
# define ACE_DEFAULT_TIMEOUT 5
# endif /* ACE_DEFAULT_TIMEOUT */
# if !defined (ACE_DEFAULT_BACKLOG)
# define ACE_DEFAULT_BACKLOG 5
# endif /* ACE_DEFAULT_BACKLOG */
# if !defined (ACE_DEFAULT_THREADS)
# define ACE_DEFAULT_THREADS 1
# endif /* ACE_DEFAULT_THREADS */
// The following 3 defines are used in the IP multicast and broadcast tests.
# if !defined (ACE_DEFAULT_BROADCAST_PORT)
# define ACE_DEFAULT_BROADCAST_PORT 20000
# endif /* ACE_DEFAULT_BROADCAST_PORT */
# if !defined (ACE_DEFAULT_MULTICAST_PORT)
# define ACE_DEFAULT_MULTICAST_PORT 20001
# endif /* ACE_DEFAULT_MULTICAST_PORT */
# if !defined (ACE_DEFAULT_MULTICAST_ADDR)
// This address MUST be within the range for host group addresses:
// 224.0.0.0 to 239.255.255.255.
# define ACE_DEFAULT_MULTICAST_ADDR "224.9.9.2"
# endif /* ACE_DEFAULT_MULTICAST_ADDR */
// Default port number for HTTP.
# if !defined (ACE_DEFAULT_HTTP_SERVER_PORT)
# define ACE_DEFAULT_HTTP_SERVER_PORT 80
# endif /* ACE_DEFAULT_HTTP_SERVER_PORT */
// Used in many IPC_SAP tests
# if !defined (ACE_DEFAULT_SERVER_PORT)
# define ACE_DEFAULT_SERVER_PORT 20002
# endif /* ACE_DEFAULT_SERVER_PORT */
# if !defined (ACE_DEFAULT_HTTP_PORT)
# define ACE_DEFAULT_HTTP_PORT 80
# endif /* ACE_DEFAULT_HTTP_PORT */
# if !defined (ACE_DEFAULT_MAX_SOCKET_BUFSIZ)
# define ACE_DEFAULT_MAX_SOCKET_BUFSIZ 65536
# endif /* ACE_DEFAULT_MAX_SOCKET_BUFSIZ */
# if !defined (ACE_DEFAULT_SERVER_PORT_STR)
# define ACE_DEFAULT_SERVER_PORT_STR "20002"
# endif /* ACE_DEFAULT_SERVER_PORT_STR */
// Used for the Service_Directory test
# if !defined (ACE_DEFAULT_SERVICE_PORT)
# define ACE_DEFAULT_SERVICE_PORT 20003
# endif /* ACE_DEFAULT_SERVICE_PORT */
// Used for the ACE_Thread_Spawn test
# if !defined (ACE_DEFAULT_THR_PORT )
# define ACE_DEFAULT_THR_PORT 20004
# endif /* ACE_DEFAULT_THR_PORT */
// Used for <SOCK_Connect::connect> tests
# if !defined (ACE_DEFAULT_LOCAL_PORT)
# define ACE_DEFAULT_LOCAL_PORT 20005
# endif /* ACE_DEFAULT_LOCAL_PORT */
// Used for Connector tests
# if !defined (ACE_DEFAULT_LOCAL_PORT_STR)
# define ACE_DEFAULT_LOCAL_PORT_STR "20005"
# endif /* ACE_DEFAULT_LOCAL_PORT_STR */
// Used for the name server.
# if !defined (ACE_DEFAULT_NAME_SERVER_PORT)
# define ACE_DEFAULT_NAME_SERVER_PORT 20006
# endif /* ACE_DEFAULT_NAME_SERVER_PORT */
# if !defined (ACE_DEFAULT_NAME_SERVER_PORT_STR)
# define ACE_DEFAULT_NAME_SERVER_PORT_STR "20006"
# endif /* ACE_DEFAULT_NAME_SERVER_PORT_STR */
// Used for the token server.
# if !defined (ACE_DEFAULT_TOKEN_SERVER_PORT)
# define ACE_DEFAULT_TOKEN_SERVER_PORT 20007
# endif /* ACE_DEFAULT_TOKEN_SERVER_PORT */
# if !defined (ACE_DEFAULT_TOKEN_SERVER_PORT_STR)
# define ACE_DEFAULT_TOKEN_SERVER_PORT_STR "20007"
# endif /* ACE_DEFAULT_TOKEN_SERVER_PORT_STR */
// Used for the logging server.
# if !defined (ACE_DEFAULT_LOGGING_SERVER_PORT)
# define ACE_DEFAULT_LOGGING_SERVER_PORT 20008
# endif /* ACE_DEFAULT_LOGGING_SERVER_PORT */
# if !defined (ACE_DEFAULT_LOGGING_SERVER_PORT_STR)
# define ACE_DEFAULT_LOGGING_SERVER_PORT_STR "20008"
# endif /* ACE_DEFAULT_LOGGING_SERVER_PORT_STR */
// Used for the logging server.
# if !defined (ACE_DEFAULT_THR_LOGGING_SERVER_PORT)
# define ACE_DEFAULT_THR_LOGGING_SERVER_PORT 20008
# endif /* ACE_DEFAULT_THR_LOGGING_SERVER_PORT */
# if !defined (ACE_DEFAULT_THR_LOGGING_SERVER_PORT_STR)
# define ACE_DEFAULT_THR_LOGGING_SERVER_PORT_STR "20008"
# endif /* ACE_DEFAULT_THR_LOGGING_SERVER_PORT_STR */
// Used for the time server.
# if !defined (ACE_DEFAULT_TIME_SERVER_PORT)
# define ACE_DEFAULT_TIME_SERVER_PORT 20009
# endif /* ACE_DEFAULT_TIME_SERVER_PORT */
# if !defined (ACE_DEFAULT_TIME_SERVER_PORT_STR)
# define ACE_DEFAULT_TIME_SERVER_PORT_STR "20009"
# endif /* ACE_DEFAULT_TIME_SERVER_PORT_STR */
# if !defined (ACE_DEFAULT_TIME_SERVER_STR)
# define ACE_DEFAULT_TIME_SERVER_STR "ACE_TS_TIME"
# endif /* ACE_DEFAULT_TIME_SERVER_STR */
// Used by the FIFO tests and the Client_Logging_Handler netsvc.
# if !defined (ACE_DEFAULT_RENDEZVOUS)
# if defined (ACE_HAS_STREAM_PIPES)
# define ACE_DEFAULT_RENDEZVOUS ACE_LIB_TEXT("/tmp/fifo.ace")
# else
# define ACE_DEFAULT_RENDEZVOUS ACE_LIB_TEXT("localhost:20010")
# endif /* ACE_HAS_STREAM_PIPES */
# endif /* ACE_DEFAULT_RENDEZVOUS */
// Used for the UNIX syslog logging interface to ACE_Log_Msg.
# ifndef ACE_DEFAULT_SYSLOG_FACILITY
# define ACE_DEFAULT_SYSLOG_FACILITY LOG_USER
# endif /* ACE_DEFAULT_SYSLOG_FACILITY */
# if !defined (ACE_DEFAULT_LOGGER_KEY)
# if defined (ACE_HAS_STREAM_PIPES)
# define ACE_DEFAULT_LOGGER_KEY ACE_LIB_TEXT ("/tmp/server_daemon")
# else
# define ACE_DEFAULT_LOGGER_KEY ACE_LIB_TEXT ("localhost:20012")
# endif /* ACE_HAS_STREAM_PIPES */
# endif /* ACE_DEFAULT_LOGGER_KEY */
// The way to specify the local host for loopback IP. This is usually
// "localhost" but it may need changing on some platforms.
# if !defined (ACE_LOCALHOST)
# define ACE_LOCALHOST ACE_LIB_TEXT ("localhost")
# endif
# if !defined (ACE_DEFAULT_SERVER_HOST)
# define ACE_DEFAULT_SERVER_HOST ACE_LOCALHOST
# endif /* ACE_DEFAULT_SERVER_HOST */
// Default shared memory key
# if !defined (ACE_DEFAULT_SHM_KEY)
# define ACE_DEFAULT_SHM_KEY 1234
# endif /* ACE_DEFAULT_SHM_KEY */
// Default segment size used by SYSV shared memory (128 K)
# if !defined (ACE_DEFAULT_SEGMENT_SIZE)
# define ACE_DEFAULT_SEGMENT_SIZE 1024 * 128
# endif /* ACE_DEFAULT_SEGMENT_SIZE */
// Maximum number of SYSV shared memory segments
// (does anyone know how to figure out the right values?!)
# if !defined (ACE_DEFAULT_MAX_SEGMENTS)
# define ACE_DEFAULT_MAX_SEGMENTS 6
# endif /* ACE_DEFAULT_MAX_SEGMENTS */
// Name of the map that's stored in shared memory.
# if !defined (ACE_NAME_SERVER_MAP)
# define ACE_NAME_SERVER_MAP "Name Server Map"
# endif /* ACE_NAME_SERVER_MAP */
// Default file permissions.
# if !defined (ACE_DEFAULT_FILE_PERMS)
# if defined (ACE_WIN32)
# if defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 == 1)
# define ACE_DEFAULT_FILE_PERMS (FILE_SHARE_READ | FILE_SHARE_WRITE | \
FILE_SHARE_DELETE)
# else
# define ACE_DEFAULT_FILE_PERMS (FILE_SHARE_READ | FILE_SHARE_WRITE)
# endif /* ACE_HAS_WINNT4 */
# elif defined (VXWORKS)
# define ACE_DEFAULT_FILE_PERMS (S_IRUSR | S_IWUSR| S_IRGRP| S_IROTH)
# else
# define ACE_DEFAULT_FILE_PERMS 0644
# endif /* ACE_WIN32 */
# endif /* ACE_DEFAULT_FILE_PERMS */
// Default directory permissions.
# if !defined (ACE_DEFAULT_DIR_PERMS)
# define ACE_DEFAULT_DIR_PERMS 0755
# endif /* ACE_DEFAULT_DIR_PERMS */
// Default size of the ACE Reactor.
# if defined (FD_SETSIZE)
int const ACE_FD_SETSIZE = FD_SETSIZE;
# else
# define ACE_FD_SETSIZE FD_SETSIZE
# endif /* ACE_FD_SETSIZE */
# if !defined (ACE_DEFAULT_SELECT_REACTOR_SIZE)
# define ACE_DEFAULT_SELECT_REACTOR_SIZE ACE_FD_SETSIZE
# endif /* ACE_DEFAULT_SELECT_REACTOR_SIZE */
# if !defined (ACE_DEFAULT_TIMEPROBE_TABLE_SIZE)
# define ACE_DEFAULT_TIMEPROBE_TABLE_SIZE 8 * 1024
# endif /* ACE_DEFAULT_TIMEPROBE_TABLE_SIZE */
// Default size of the ACE Map_Manager.
# if !defined (ACE_DEFAULT_MAP_SIZE)
# define ACE_DEFAULT_MAP_SIZE 1024
# endif /* ACE_DEFAULT_MAP_SIZE */
// Defaults for ACE Timer Wheel
# if !defined (ACE_DEFAULT_TIMER_WHEEL_SIZE)
# define ACE_DEFAULT_TIMER_WHEEL_SIZE 1024
# endif /* ACE_DEFAULT_TIMER_WHEEL_SIZE */
# if !defined (ACE_DEFAULT_TIMER_WHEEL_RESOLUTION)
# define ACE_DEFAULT_TIMER_WHEEL_RESOLUTION 100
# endif /* ACE_DEFAULT_TIMER_WHEEL_RESOLUTION */
// Default size for ACE Timer Hash table
# if !defined (ACE_DEFAULT_TIMER_HASH_TABLE_SIZE)
# define ACE_DEFAULT_TIMER_HASH_TABLE_SIZE 1024
# endif /* ACE_DEFAULT_TIMER_HASH_TABLE_SIZE */
// Defaults for the ACE Free List
# if !defined (ACE_DEFAULT_FREE_LIST_PREALLOC)
# define ACE_DEFAULT_FREE_LIST_PREALLOC 0
# endif /* ACE_DEFAULT_FREE_LIST_PREALLOC */
# if !defined (ACE_DEFAULT_FREE_LIST_LWM)
# define ACE_DEFAULT_FREE_LIST_LWM 0
# endif /* ACE_DEFAULT_FREE_LIST_LWM */
# if !defined (ACE_DEFAULT_FREE_LIST_HWM)
# define ACE_DEFAULT_FREE_LIST_HWM 25000
# endif /* ACE_DEFAULT_FREE_LIST_HWM */
# if !defined (ACE_DEFAULT_FREE_LIST_INC)
# define ACE_DEFAULT_FREE_LIST_INC 100
# endif /* ACE_DEFAULT_FREE_LIST_INC */
# if !defined (ACE_UNIQUE_NAME_LEN)
# define ACE_UNIQUE_NAME_LEN 100
# endif /* ACE_UNIQUE_NAME_LEN */
# if !defined (ACE_MAX_DGRAM_SIZE)
// This is just a guess. 8k is the normal limit on
// most machines because that's what NFS expects.
# define ACE_MAX_DGRAM_SIZE 8192
# endif /* ACE_MAX_DGRAM_SIZE */
# if !defined (ACE_DEFAULT_ARGV_BUFSIZ)
# define ACE_DEFAULT_ARGV_BUFSIZ 1024 * 4
# endif /* ACE_DEFAULT_ARGV_BUFSIZ */
// A free list which create more elements when there aren't enough
// elements.
# define ACE_FREE_LIST_WITH_POOL 1
// A simple free list which doen't allocate/deallocate elements.
# define ACE_PURE_FREE_LIST 2
# if defined (ACE_WIN32)
#define ACE_MAX_USERID 32
// This is necessary to work around bugs with Win32 non-blocking
// connects...
# if !defined (ACE_NON_BLOCKING_BUG_DELAY)
# define ACE_NON_BLOCKING_BUG_DELAY 35000
# endif /* ACE_NON_BLOCKING_BUG_DELAY */
# else /* !ACE_WIN32 */
#define ACE_MAX_USERID L_cuserid
# endif /*ACE_WIN32*/
#include "ace/post.h"
#endif /*ACE_DEFAULT_CONSTANTS_H*/
|