Also use Objects as part of an operation but as a result don't generate Any operation...
[ACE_TAO.git] / ACE / ace / config-mqx.h
blobda4c5b2ab3bd9a878176a6242ca2522c3fe2cd38
1 #ifndef CONFIG_MQX_H
2 #define CONFIG_MQX_H
4 // This macro is required in order to build the SOCK_Connector_Test
5 #define ACE_LACKS_GETHOSTENT
7 #if defined(ACE_MQX_DLIB_FULL)
8 # define MQX_SUPPRESS_FILE_DEF 1
9 # define MQX_SUPPRESS_STDIO_MACROS 1
10 #endif
12 #define MQX_STD_TIME_API 0
14 #include <time32.h>
15 #define _SIGNAL
17 #include <mfs.h>
18 #include <rtcs.h>
19 #include <mutex.h>
20 #include <fio.h>
22 // These headers do not have the proper guards for C++
23 extern "C" {
24 // Allowing p_time.h to be included causes conflicts
25 // with time.h
26 #define __p_time_h__
28 #include <sys_types.h>
29 #include <p_pthread.h>
30 #include <p_signal.h>
31 #include <p_semaphore.h>
34 #if MQX_STD_TIME_API == 0
35 # define ACE_LACKS_LOCALTIME_R
36 #endif
38 #if !defined (ACE_DEFAULT_MAP_SIZE)
39 # define ACE_DEFAULT_MAP_SIZE 64
40 #endif /* ACE_DEFAULT_MAP_SIZE */
42 #if !defined (ACE_MAXLOGMSGLEN)
43 # define ACE_MAXLOGMSGLEN 1024
44 #endif /* ACE_MAXLOGMSGLEN */
46 #if !defined (ACE_DEFAULT_ACCEPTOR_USE_SELECT)
47 # define ACE_DEFAULT_ACCEPTOR_USE_SELECT 0
48 #endif /* ACE_DEFAULT_ACCEPTOR_USE_SELECT */
50 #define ACE_CHDIR_EQUIVALENT MQX_Filesystem::inst().chdir
51 #define ACE_RMDIR_EQUIVALENT MQX_Filesystem::inst().rmdir
52 #define ACE_GETCWD_EQUIVALENT MQX_Filesystem::inst().getcwd
53 #define ACE_UNLINK_EQUIVALENT MQX_Filesystem::inst().unlink
54 #define ACE_MKDIR_EQUIVALENT MQX_Filesystem::inst().mkdir
55 #define ACE_RENAME_EQUIVALENT MQX_Filesystem::inst().rename
57 #define ACE_MQX
58 #define ACE_TEMPLATES_REQUIRE_SOURCE
59 #define ACE_PAGE_SIZE 4096
60 #define ACE_SOCKET_LEN uint16_t
61 #define ACE_SOCKOPT_LEN socklen_t
62 typedef int SOCKET;
64 #define ACE_UNUSED_ARG(X)
66 // Add a check for null pointer before calling free(). This is not
67 // completely necessary, but MQX will set a task error of MQX_INVALID_POINTER
68 // if we call free with a null pointer.
69 #define ACE_FREE_FUNC(X) if ((X) != 0) ::free(X)
71 #define ACE_USES_SOCKET_H
73 #define ACE_LACKS_SIGINFO_H
74 #define ACE_LACKS_NEW_H
75 #define ACE_LACKS_UNISTD_H
76 #define ACE_LACKS_FCNTL_H
77 #define ACE_LACKS_UCONTEXT_H
78 #define ACE_LACKS_SEARCH_H
79 #define ACE_LACKS_PWD_H
80 #define ACE_LACKS_PTHREAD_H
81 #define ACE_LACKS_SCHED_H
82 #define ACE_LACKS_SEMAPHORE_H
83 #define ACE_LACKS_STROPTS_H
84 #define ACE_LACKS_DLFCN_H
85 #define ACE_LACKS_NETDB_H
86 #define ACE_LACKS_DIRENT_H
87 #define ACE_LACKS_STRINGS_H
88 #define ACE_LACKS_SYSLOG_H
89 #define ACE_LACKS_POLL_H
90 #define ACE_LACKS_REGEX_H
92 #define ACE_LACKS_SYS_TYPES_H
93 #define ACE_LACKS_SYS_STAT_H
94 #define ACE_LACKS_SYS_PARAM_H
95 #define ACE_LACKS_SYS_TIME_H
96 #define ACE_LACKS_SYS_RESOURCE_H
97 #define ACE_LACKS_SYS_WAIT_H
98 #define ACE_LACKS_SYS_UTSNAME_H
99 #define ACE_LACKS_SYS_MMAN_H
100 #define ACE_LACKS_SYS_IPC_H
101 #define ACE_LACKS_SYS_SEM_H
102 #define ACE_LACKS_SYS_UIO_H
103 #define ACE_LACKS_SYS_SOCKET_H
104 #define ACE_LACKS_SYS_IOCTL_H
105 #define ACE_LACKS_SYS_SELECT_H
106 #define ACE_LACKS_SYS_UN_H
107 #define ACE_LACKS_SYS_MSG_H
108 #define ACE_LACKS_SYS_SHM_H
109 #define ACE_LACKS_SYS_SYSCTL_H
111 #define ACE_LACKS_NETINET_IN_H
112 #define ACE_LACKS_NETINET_TCP_H
113 #define ACE_LACKS_NET_IF_H
114 #define ACE_LACKS_ARPA_INET_H
116 #define ACE_HAS_THREADS
117 #define ACE_HAS_PTHREADS
118 #define ACE_LACKS_COND_T
119 #define ACE_LACKS_RWLOCK_T
120 #define ACE_MT_SAFE 1
121 #define ACE_LACKS_SIGPROCMASK
122 #define ACE_LACKS_CONDATTR
123 #define ACE_LACKS_PTHREAD_CLEANUP
124 #define ACE_HAS_SIGINFO_T
125 #define ACE_HAS_POSIX_SEM
126 #define ACE_HAS_POSIX_SEM_TIMEOUT
127 #define ACE_LACKS_PTHREAD_CANCEL
128 #define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES
129 #define ACE_HAS_THREAD_SPECIFIC_STORAGE
130 #define ACE_LACKS_NAMED_POSIX_SEM
131 #define ACE_DEFAULT_SEM_KEY { 1234 }
132 // MQX POSIX has this, but it doesn't appear to work
133 #define ACE_LACKS_SETINHERITSCHED
134 typedef pthread_mutex_t ACE_mutex_t;
135 typedef pthread_mutexattr_t ACE_mutexattr_t;
137 #if !defined(ACE_MQX_DLIB_FULL)
138 #define ACE_LACKS_FGETWC
139 #define ACE_LACKS_FGETWS
140 #define ACE_LACKS_FPUTWS
141 #define ACE_LACKS_FGETPOS
142 #define ACE_LACKS_FSETPOS
143 #define ACE_LACKS_FREOPEN
144 #define ACE_LACKS_FDOPEN
145 #define ACE_LACKS_FILENO
146 #define ACE_LACKS_LOCALECONV
148 #define BUFSIZ 512
150 #undef ungetc
151 #undef sscanf
152 #undef snprintf
153 #undef vsnprintf
154 #undef getchar
155 #undef putchar
156 #undef status
158 #define getc(X) _io_fgetc(X)
159 #define ungetc(X,Y) _io_fungetc(X,Y)
161 #ifdef fgetc
162 #undef fgetc
163 inline int fgetc(FILE* f) {
164 return _io_fgetc(f);
166 #endif
167 #ifdef fread
168 #undef fread
169 inline size_t fread(void* ptr, size_t so, size_t no,FILE* f) {
170 return (_io_read((f),(ptr),(so)*(no))/(so));
172 #endif
173 #ifdef fwrite
174 #undef fwrite
175 inline size_t fwrite(const void* ptr, size_t so, size_t no, FILE* f) {
176 return (_io_write((f),(void*)(ptr),(so)*(no))/(so));
178 #endif
179 #ifdef puts
180 #undef puts
181 #define def_puts
182 #endif
183 #ifdef getline
184 #undef getline
185 inline int getline(char* x, int y) {
186 return _io_fgetline(stdin, x, y);
188 #endif
189 #ifdef read
190 #undef read
191 inline int read(FILE* f, const void* b, int a) {
192 return _io_read(f, (void*)b, a);
194 #endif
195 #ifdef write
196 #undef write
197 inline int write(FILE* f, void* b, int a) {
198 return _io_write(f, b, a);
200 #endif
201 #ifdef printf
202 #undef printf
203 #define def_printf
204 #endif
205 #ifdef sprintf
206 #undef sprintf
207 #define def_sprintf
208 #endif
209 #ifdef fprintf
210 #undef fprintf
211 inline int fprintf(FILE* s, const char* f, ...) {
212 va_list argp;
213 va_start(argp, f);
214 const int r = _io_vfprintf(s, f, argp);
215 va_end (argp);
216 return r;
218 #endif
219 #ifdef vprintf
220 #undef vprintf
221 #define def_vprintf
222 #endif
223 #ifdef vsprintf
224 #undef vsprintf
225 #define def_vsprintf
226 #endif
227 #ifdef vfprintf
228 #undef vfprintf
229 inline int vfprintf(FILE* s, const char* f, va_list argp) {
230 return _io_vfprintf(s, f, argp);
232 #endif
233 #ifdef fclose
234 #undef fclose
235 inline int fclose(FILE* f) {
236 return _io_fclose(f);
238 #endif
239 #ifdef fflush
240 #undef fflush
241 inline int fflush(FILE* f) {
242 return _io_fflush(f);
244 #endif
245 #ifdef fgets
246 #undef fgets
247 inline char* fgets(char* b, int a, FILE* f) {
248 return _io_fgets(b, a, f);
250 #endif
251 #ifdef fputs
252 #undef fputs
253 inline int fputs(const char* s, FILE* f) {
254 return _io_fputs(s, f);
256 #endif
257 #ifdef fopen
258 #undef fopen
259 inline FILE* fopen(const char* f, const char* m) {
260 return _io_fopen(f, m);
262 #endif
263 #ifdef fseek
264 #undef fseek
265 inline int fseek(FILE* f, long o, int s) {
266 return _io_fseek(f, o, s);
268 #endif
269 #ifdef ftell
270 #undef ftell
271 inline int ftell(FILE* f) {
272 return _io_ftell(f);
274 #endif
275 #ifdef ioctl
276 #undef ioctl
277 inline int ioctl(FILE* f, unsigned int r, void* p)
279 return _io_ioctl(f, r, p);
281 #endif
283 #include <stdio.h>
285 #ifdef def_printf
286 #undef def_printf
287 inline int printf(const char* f, ...) {
288 va_list argp;
289 va_start(argp, f);
290 const int r = _io_vprintf(f, argp);
291 va_end (argp);
292 return r;
294 #endif
295 #ifdef def_sprintf
296 #undef def_sprintf
297 inline int sprintf(char* s, const char* f, ...) {
298 va_list argp;
299 va_start(argp, f);
300 const int r = _io_vsprintf(s, f, argp);
301 va_end (argp);
302 return r;
304 #endif
305 #ifdef def_vprintf
306 #undef def_vprintf
307 inline int vprintf(const char* f, va_list argp) {
308 return _io_vprintf(f, argp);
310 #endif
311 #ifdef def_vsprintf
312 #undef def_vsprintf
313 inline int vsprintf(char* s, const char* f, va_list argp) {
314 return _io_vsprintf(s, f, argp);
316 #endif
317 #ifdef def_puts
318 #undef def_puts
319 inline int puts(const char* str) {
320 return _io_fputs(str, stdout);
322 #endif
323 #endif
325 #define ACE_HAS_LINGER_MS
326 #define ACE_HAS_WCHAR
327 #define ACE_SIZEOF_WCHAR 4
328 #define ACE_HAS_SSIZE_T
329 #define ACE_HAS_SIG_ATOMIC_T
330 #define ACE_HAS_POSIX_TIME
331 #define ACE_HAS_SOCKLEN_T
332 #define ACE_HAS_DIRENT
334 #define ACE_NEW_THROWS_EXCEPTIONS
335 #define ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB
336 #define ACE_TEXT_WIN32_FIND_DATA MFS_SEARCH_DATA
338 #define ACE_LACKS_UNIX_SIGNALS
339 #define ACE_LACKS_SO_DONTROUTE
340 #define ACE_LACKS_WCSDUP
341 #define ACE_LACKS_WCSTOK
342 #define ACE_LACKS_ITOW
343 #define ACE_LACKS_WCSICMP
344 #define ACE_LACKS_WCSNICMP
345 #define ACE_LACKS_INET_NTOA
346 #define ACE_LACKS_RAND_R
347 #define ACE_LACKS_PUTENV
348 #define ACE_LACKS_PWD_FUNCTIONS
349 #define ACE_LACKS_SETSID
350 #define ACE_LACKS_SETGID
351 #define ACE_LACKS_GETEGID
352 #define ACE_LACKS_GETGID
353 #define ACE_LACKS_GETEUID
354 #define ACE_LACKS_SETEGID
355 #define ACE_LACKS_SETEUID
356 #define ACE_LACKS_SETREUID
357 #define ACE_LACKS_SETREGID
358 #define ACE_LACKS_SETUID
359 #define ACE_LACKS_GETUID
360 #define ACE_LACKS_GETPGID
361 #define ACE_LACKS_SETPGID
362 #define ACE_LACKS_GETPPID
363 #define ACE_LACKS_GETPID
364 #define ACE_LACKS_EXEC
365 #define ACE_LACKS_FORK
366 #define ACE_LACKS_GETOPT
367 #define ACE_LACKS_SBRK
368 #define ACE_LACKS_PIPE
369 #define ACE_DISABLE_NOTIFY_PIPE_DEFAULT 1
370 #define ACE_LACKS_ISATTY
371 #define ACE_LACKS_ALARM
372 #define ACE_LACKS_SYSCONF
373 #define ACE_LACKS_SWAB
374 #define ACE_LACKS_CADDR_T
375 #define ACE_LACKS_SETENV
376 #define ACE_LACKS_UNSETENV
377 #define ACE_LACKS_CUSERID
378 #define ACE_LACKS_MADVISE
379 #define ACE_LACKS_MMAP
380 #define ACE_LACKS_MPROTECT
381 #define ACE_LACKS_MSYNC
382 #define ACE_LACKS_MUNMAP
383 #define ACE_LACKS_STRPTIME
384 #define ACE_LACKS_GMTIME_R
385 #define ACE_LACKS_ASCTIME_R
386 #define ACE_LACKS_TZSET
387 #define ACE_LACKS_IOVEC
388 #define ACE_LACKS_ISASCII
389 #define ACE_LACKS_ISCTYPE
390 #define ACE_LACKS_READV
391 #define ACE_LACKS_WRITEV
392 #define ACE_LACKS_RECVMSG
393 #define ACE_LACKS_SENDMSG
394 #define ACE_LACKS_SOCKETPAIR
395 #define ACE_LACKS_GETHOSTBYADDR
396 #define ACE_LACKS_GETHOSTBYADDR_R
397 #define ACE_LACKS_GETHOSTBYNAME
398 #define ACE_LACKS_GETSERVBYNAME
399 #define ACE_LACKS_GETSERVBYNAME_R
400 #define ACE_LACKS_GAI_STRERROR
401 #define ACE_LACKS_GETPROTOBYNUMBER
402 #define ACE_LACKS_GETPROTOBYNUMBER_R
403 #define ACE_LACKS_GETPROTOBYNAME
404 #define ACE_LACKS_GETPROTOBYNAME_R
405 #define ACE_LACKS_STRUCT_DIR
406 #define ACE_LACKS_HOSTENT
407 #define ACE_LACKS_PROTOENT
408 #define ACE_LACKS_SERVENT
409 #define ACE_LACKS_RLIMIT
410 #define ACE_LACKS_WAIT
411 #define ACE_LACKS_WAITPID
412 #define ACE_LACKS_SIGEMPTYSET
413 #define ACE_LACKS_SIGADDSET
414 #define ACE_LACKS_IOSTREAM_TOTALLY
415 #define ACE_LACKS_ACE_IOSTREAM
416 #define ACE_LACKS_UNIX_SYSLOG
417 #define ACE_LACKS_UNAME
418 #define ACE_LACKS_IFCONF
419 #define ACE_LACKS_IFREQ
420 #define ACE_LACKS_STRRECVFD
421 #define ACE_MKDIR_LACKS_MODE
423 // POSIX
424 #define ACE_HAS_PTHREAD_SIGMASK_PROTOTYPE
425 #define ACE_LACKS_SEMBUF_T
426 #define ACE_LACKS_UNIX_DOMAIN_SOCKETS
427 #define ACE_LACKS_KILL
428 #define NSIG 64
429 #define FD_SETSIZE RTCSCFG_FD_SETSIZE
430 #define FD_SET RTCS_FD_SET
431 #define FD_CLR RTCS_FD_CLR
432 #define FD_ZERO RTCS_FD_ZERO
433 #define FD_ISSET RTCS_FD_ISSET
434 #define NFDBITS (sizeof (fd_mask) * 8)
435 typedef long fd_mask;
436 struct fd_set: public rtcs_fd_set {
437 fd_set()
438 : fds_bits(fd_array) {
440 uint32_t* fds_bits;
443 // File System Related
444 #define ACE_LACKS_MKTEMP
445 #define ACE_LACKS_MKSTEMP
446 #define ACE_LACKS_ACCESS
447 #define ACE_LACKS_REALPATH
448 #define ACE_LACKS_LSTAT
449 #define ACE_LACKS_MKFIFO
450 #define ACE_LACKS_UMASK
451 #define ACE_LACKS_DUP
452 #define ACE_LACKS_DUP2
453 #define ACE_LACKS_FSYNC
454 #define ACE_LACKS_FTRUNCATE
455 #define ACE_LACKS_READLINK
456 #define ACE_LACKS_TRUNCATE
457 #define ACE_LACKS_TEMPNAM
458 #define ACE_LACKS_FCNTL
459 #define ACE_LACKS_REWINDDIR
460 #define ACE_LACKS_OPENDIR
461 #define ACE_LACKS_READDIR
462 #define ACE_LACKS_SEEKDIR
463 #define ACE_LACKS_TELLDIR
464 #define ACE_LACKS_CLOSEDIR
465 #define ACE_LACKS_ALPHASORT
467 #define ACE_DEFINE_MISSING_ERRNOS
469 #define O_NDELAY 1
471 struct stat
473 long st_size;
474 long st_mtime;
475 long st_mode;
476 long st_nlink;
479 typedef unsigned int uid_t;
480 typedef unsigned int gid_t;
481 typedef long off_t;
482 typedef long loff_t;
483 typedef unsigned int mode_t;
484 typedef struct timespec timespec_t;
486 struct timeval
488 int tv_sec;
489 suseconds_t tv_usec;
492 #define MAXSYMLINKS 1
494 #define FIONBIO 0
496 #define S_IFMT 00170000
497 #define S_IFREG 00100000
498 #define S_IFDIR 00040000
499 #define S_IFCHR 00020000
500 #define ACE_LACKS_MODE_MASKS
502 #define IP_TTL 0
503 #define IP_TOS 0
505 #define ACE_IPPROTO_TCP SOL_TCP
506 #define TCP_NODELAY OPT_NOWAIT
508 #endif