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
12 #define MQX_STD_TIME_API 0
22 // These headers do not have the proper guards for C++
24 // Allowing p_time.h to be included causes conflicts
28 #include <sys_types.h>
29 #include <p_pthread.h>
31 #include <p_semaphore.h>
34 #if MQX_STD_TIME_API == 0
35 # define ACE_LACKS_LOCALTIME_R
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
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
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
158 #define getc(X) _io_fgetc(X)
159 #define ungetc(X,Y) _io_fungetc(X,Y)
163 inline int fgetc(FILE* f
) {
169 inline size_t fread(void* ptr
, size_t so
, size_t no
,FILE* f
) {
170 return (_io_read((f
),(ptr
),(so
)*(no
))/(so
));
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
));
185 inline int getline(char* x
, int y
) {
186 return _io_fgetline(stdin
, x
, y
);
191 inline int read(FILE* f
, const void* b
, int a
) {
192 return _io_read(f
, (void*)b
, a
);
197 inline int write(FILE* f
, void* b
, int a
) {
198 return _io_write(f
, b
, a
);
211 inline int fprintf(FILE* s
, const char* f
, ...) {
214 const int r
= _io_vfprintf(s
, f
, argp
);
229 inline int vfprintf(FILE* s
, const char* f
, va_list argp
) {
230 return _io_vfprintf(s
, f
, argp
);
235 inline int fclose(FILE* f
) {
236 return _io_fclose(f
);
241 inline int fflush(FILE* f
) {
242 return _io_fflush(f
);
247 inline char* fgets(char* b
, int a
, FILE* f
) {
248 return _io_fgets(b
, a
, f
);
253 inline int fputs(const char* s
, FILE* f
) {
254 return _io_fputs(s
, f
);
259 inline FILE* fopen(const char* f
, const char* m
) {
260 return _io_fopen(f
, m
);
265 inline int fseek(FILE* f
, long o
, int s
) {
266 return _io_fseek(f
, o
, s
);
271 inline int ftell(FILE* f
) {
277 inline int ioctl(FILE* f
, unsigned int r
, void* p
)
279 return _io_ioctl(f
, r
, p
);
287 inline int printf(const char* f
, ...) {
290 const int r
= _io_vprintf(f
, argp
);
297 inline int sprintf(char* s
, const char* f
, ...) {
300 const int r
= _io_vsprintf(s
, f
, argp
);
307 inline int vprintf(const char* f
, va_list argp
) {
308 return _io_vprintf(f
, argp
);
313 inline int vsprintf(char* s
, const char* f
, va_list argp
) {
314 return _io_vsprintf(s
, f
, argp
);
319 inline int puts(const char* str
) {
320 return _io_fputs(str
, stdout
);
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
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
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
{
438 : fds_bits(fd_array
) {
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
479 typedef unsigned int uid_t
;
480 typedef unsigned int gid_t
;
483 typedef unsigned int mode_t
;
484 typedef struct timespec timespec_t
;
492 #define MAXSYMLINKS 1
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
505 #define ACE_IPPROTO_TCP SOL_TCP
506 #define TCP_NODELAY OPT_NOWAIT