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_PAGE_SIZE 4096
59 #define ACE_SOCKET_LEN uint16_t
60 #define ACE_SOCKOPT_LEN socklen_t
63 #define ACE_UNUSED_ARG(X)
65 // Add a check for null pointer before calling free(). This is not
66 // completely necessary, but MQX will set a task error of MQX_INVALID_POINTER
67 // if we call free with a null pointer.
68 #define ACE_FREE_FUNC(X) if ((X) != 0) ::free(X)
70 #define ACE_USES_SOCKET_H
72 #define ACE_LACKS_SIGINFO_H
73 #define ACE_LACKS_NEW_H
74 #define ACE_LACKS_UNISTD_H
75 #define ACE_LACKS_FCNTL_H
76 #define ACE_LACKS_UCONTEXT_H
77 #define ACE_LACKS_SEARCH_H
78 #define ACE_LACKS_PWD_H
79 #define ACE_LACKS_PTHREAD_H
80 #define ACE_LACKS_SCHED_H
81 #define ACE_LACKS_SEMAPHORE_H
82 #define ACE_LACKS_STROPTS_H
83 #define ACE_LACKS_DLFCN_H
84 #define ACE_LACKS_NETDB_H
85 #define ACE_LACKS_DIRENT_H
86 #define ACE_LACKS_STRINGS_H
87 #define ACE_LACKS_SYSLOG_H
88 #define ACE_LACKS_POLL_H
89 #define ACE_LACKS_REGEX_H
91 #define ACE_LACKS_SYS_TYPES_H
92 #define ACE_LACKS_SYS_STAT_H
93 #define ACE_LACKS_SYS_PARAM_H
94 #define ACE_LACKS_SYS_TIME_H
95 #define ACE_LACKS_SYS_RESOURCE_H
96 #define ACE_LACKS_SYS_WAIT_H
97 #define ACE_LACKS_SYS_UTSNAME_H
98 #define ACE_LACKS_SYS_MMAN_H
99 #define ACE_LACKS_SYS_IPC_H
100 #define ACE_LACKS_SYS_SEM_H
101 #define ACE_LACKS_SYS_UIO_H
102 #define ACE_LACKS_SYS_SOCKET_H
103 #define ACE_LACKS_SYS_IOCTL_H
104 #define ACE_LACKS_SYS_SELECT_H
105 #define ACE_LACKS_SYS_UN_H
106 #define ACE_LACKS_SYS_MSG_H
107 #define ACE_LACKS_SYS_SHM_H
108 #define ACE_LACKS_SYS_SYSCTL_H
110 #define ACE_LACKS_NETINET_IN_H
111 #define ACE_LACKS_NETINET_TCP_H
112 #define ACE_LACKS_NET_IF_H
113 #define ACE_LACKS_ARPA_INET_H
115 #define ACE_HAS_THREADS
116 #define ACE_HAS_PTHREADS
117 #define ACE_LACKS_COND_T
118 #define ACE_LACKS_RWLOCK_T
119 #define ACE_MT_SAFE 1
120 #define ACE_LACKS_SIGPROCMASK
121 #define ACE_LACKS_CONDATTR
122 #define ACE_LACKS_PTHREAD_CLEANUP
123 #define ACE_HAS_SIGINFO_T
124 #define ACE_HAS_POSIX_SEM
125 #define ACE_HAS_POSIX_SEM_TIMEOUT
126 #define ACE_LACKS_PTHREAD_CANCEL
127 #define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES
128 #define ACE_HAS_THREAD_SPECIFIC_STORAGE
129 #define ACE_LACKS_NAMED_POSIX_SEM
130 #define ACE_DEFAULT_SEM_KEY { 1234 }
131 // MQX POSIX has this, but it doesn't appear to work
132 #define ACE_LACKS_SETINHERITSCHED
133 typedef pthread_mutex_t ACE_mutex_t
;
134 typedef pthread_mutexattr_t ACE_mutexattr_t
;
136 #if !defined(ACE_MQX_DLIB_FULL)
137 #define ACE_LACKS_FGETWC
138 #define ACE_LACKS_FGETWS
139 #define ACE_LACKS_FPUTWS
140 #define ACE_LACKS_FGETPOS
141 #define ACE_LACKS_FSETPOS
142 #define ACE_LACKS_FREOPEN
143 #define ACE_LACKS_FDOPEN
144 #define ACE_LACKS_FILENO
145 #define ACE_LACKS_LOCALECONV
157 #define getc(X) _io_fgetc(X)
158 #define ungetc(X,Y) _io_fungetc(X,Y)
162 inline int fgetc(FILE* f
) {
168 inline size_t fread(void* ptr
, size_t so
, size_t no
,FILE* f
) {
169 return (_io_read((f
),(ptr
),(so
)*(no
))/(so
));
174 inline size_t fwrite(const void* ptr
, size_t so
, size_t no
, FILE* f
) {
175 return (_io_write((f
),(void*)(ptr
),(so
)*(no
))/(so
));
184 inline int getline(char* x
, int y
) {
185 return _io_fgetline(stdin
, x
, y
);
190 inline int read(FILE* f
, const void* b
, int a
) {
191 return _io_read(f
, (void*)b
, a
);
196 inline int write(FILE* f
, void* b
, int a
) {
197 return _io_write(f
, b
, a
);
210 inline int fprintf(FILE* s
, const char* f
, ...) {
213 const int r
= _io_vfprintf(s
, f
, argp
);
228 inline int vfprintf(FILE* s
, const char* f
, va_list argp
) {
229 return _io_vfprintf(s
, f
, argp
);
234 inline int fclose(FILE* f
) {
235 return _io_fclose(f
);
240 inline int fflush(FILE* f
) {
241 return _io_fflush(f
);
246 inline char* fgets(char* b
, int a
, FILE* f
) {
247 return _io_fgets(b
, a
, f
);
252 inline int fputs(const char* s
, FILE* f
) {
253 return _io_fputs(s
, f
);
258 inline FILE* fopen(const char* f
, const char* m
) {
259 return _io_fopen(f
, m
);
264 inline int fseek(FILE* f
, long o
, int s
) {
265 return _io_fseek(f
, o
, s
);
270 inline int ftell(FILE* f
) {
276 inline int ioctl(FILE* f
, unsigned int r
, void* p
)
278 return _io_ioctl(f
, r
, p
);
286 inline int printf(const char* f
, ...) {
289 const int r
= _io_vprintf(f
, argp
);
296 inline int sprintf(char* s
, const char* f
, ...) {
299 const int r
= _io_vsprintf(s
, f
, argp
);
306 inline int vprintf(const char* f
, va_list argp
) {
307 return _io_vprintf(f
, argp
);
312 inline int vsprintf(char* s
, const char* f
, va_list argp
) {
313 return _io_vsprintf(s
, f
, argp
);
318 inline int puts(const char* str
) {
319 return _io_fputs(str
, stdout
);
324 #define ACE_HAS_LINGER_MS
325 #define ACE_HAS_WCHAR
326 #define ACE_SIZEOF_WCHAR 4
327 #define ACE_HAS_SSIZE_T
328 #define ACE_HAS_SIG_ATOMIC_T
329 #define ACE_HAS_POSIX_TIME
330 #define ACE_HAS_SOCKLEN_T
331 #define ACE_HAS_DIRENT
333 #define ACE_TEXT_WIN32_FIND_DATA MFS_SEARCH_DATA
335 #define ACE_LACKS_UNIX_SIGNALS
336 #define ACE_LACKS_SO_DONTROUTE
337 #define ACE_LACKS_WCSDUP
338 #define ACE_LACKS_WCSTOK
339 #define ACE_LACKS_ITOW
340 #define ACE_LACKS_WCSICMP
341 #define ACE_LACKS_WCSNICMP
342 #define ACE_LACKS_INET_NTOA
343 #define ACE_LACKS_RAND_R
344 #define ACE_LACKS_PUTENV
345 #define ACE_LACKS_PWD_FUNCTIONS
346 #define ACE_LACKS_SETSID
347 #define ACE_LACKS_SETGID
348 #define ACE_LACKS_GETEGID
349 #define ACE_LACKS_GETGID
350 #define ACE_LACKS_GETEUID
351 #define ACE_LACKS_SETEGID
352 #define ACE_LACKS_SETEUID
353 #define ACE_LACKS_SETREUID
354 #define ACE_LACKS_SETREGID
355 #define ACE_LACKS_SETUID
356 #define ACE_LACKS_GETUID
357 #define ACE_LACKS_GETPGID
358 #define ACE_LACKS_SETPGID
359 #define ACE_LACKS_GETPPID
360 #define ACE_LACKS_GETPID
361 #define ACE_LACKS_EXEC
362 #define ACE_LACKS_FORK
363 #define ACE_LACKS_GETOPT
364 #define ACE_LACKS_SBRK
365 #define ACE_LACKS_PIPE
366 #define ACE_DISABLE_NOTIFY_PIPE_DEFAULT 1
367 #define ACE_LACKS_ISATTY
368 #define ACE_LACKS_ALARM
369 #define ACE_LACKS_SYSCONF
370 #define ACE_LACKS_SWAB
371 #define ACE_LACKS_CADDR_T
372 #define ACE_LACKS_SETENV
373 #define ACE_LACKS_UNSETENV
374 #define ACE_LACKS_CUSERID
375 #define ACE_LACKS_MADVISE
376 #define ACE_LACKS_MMAP
377 #define ACE_LACKS_MPROTECT
378 #define ACE_LACKS_MSYNC
379 #define ACE_LACKS_MUNMAP
380 #define ACE_LACKS_STRPTIME
381 #define ACE_LACKS_GMTIME_R
382 #define ACE_LACKS_ASCTIME_R
383 #define ACE_LACKS_TZSET
384 #define ACE_LACKS_IOVEC
385 #define ACE_LACKS_ISASCII
386 #define ACE_LACKS_ISCTYPE
387 #define ACE_LACKS_READV
388 #define ACE_LACKS_WRITEV
389 #define ACE_LACKS_RECVMSG
390 #define ACE_LACKS_SENDMSG
391 #define ACE_LACKS_SOCKETPAIR
392 #define ACE_LACKS_GETHOSTBYADDR
393 #define ACE_LACKS_GETHOSTBYADDR_R
394 #define ACE_LACKS_GETHOSTBYNAME
395 #define ACE_LACKS_GETSERVBYNAME
396 #define ACE_LACKS_GETSERVBYNAME_R
397 #define ACE_LACKS_GAI_STRERROR
398 #define ACE_LACKS_GETPROTOBYNUMBER
399 #define ACE_LACKS_GETPROTOBYNUMBER_R
400 #define ACE_LACKS_GETPROTOBYNAME
401 #define ACE_LACKS_GETPROTOBYNAME_R
402 #define ACE_LACKS_STRUCT_DIR
403 #define ACE_LACKS_HOSTENT
404 #define ACE_LACKS_PROTOENT
405 #define ACE_LACKS_SERVENT
406 #define ACE_LACKS_RLIMIT
407 #define ACE_LACKS_WAIT
408 #define ACE_LACKS_WAITPID
409 #define ACE_LACKS_SIGEMPTYSET
410 #define ACE_LACKS_SIGADDSET
411 #define ACE_LACKS_IOSTREAM_TOTALLY
412 #define ACE_LACKS_ACE_IOSTREAM
413 #define ACE_LACKS_UNIX_SYSLOG
414 #define ACE_LACKS_UNAME
415 #define ACE_LACKS_IFCONF
416 #define ACE_LACKS_IFREQ
417 #define ACE_LACKS_STRRECVFD
418 #define ACE_MKDIR_LACKS_MODE
421 #define ACE_LACKS_SEMBUF_T
422 #define ACE_LACKS_UNIX_DOMAIN_SOCKETS
423 #define ACE_LACKS_KILL
425 #define FD_SETSIZE RTCSCFG_FD_SETSIZE
426 #define FD_SET RTCS_FD_SET
427 #define FD_CLR RTCS_FD_CLR
428 #define FD_ZERO RTCS_FD_ZERO
429 #define FD_ISSET RTCS_FD_ISSET
430 #define NFDBITS (sizeof (fd_mask) * 8)
431 typedef long fd_mask
;
432 struct fd_set
: public rtcs_fd_set
{
434 : fds_bits(fd_array
) {
439 // File System Related
440 #define ACE_LACKS_MKTEMP
441 #define ACE_LACKS_MKSTEMP
442 #define ACE_LACKS_ACCESS
443 #define ACE_LACKS_REALPATH
444 #define ACE_LACKS_LSTAT
445 #define ACE_LACKS_MKFIFO
446 #define ACE_LACKS_UMASK
447 #define ACE_LACKS_DUP
448 #define ACE_LACKS_DUP2
449 #define ACE_LACKS_FSYNC
450 #define ACE_LACKS_FTRUNCATE
451 #define ACE_LACKS_READLINK
452 #define ACE_LACKS_TRUNCATE
453 #define ACE_LACKS_TEMPNAM
454 #define ACE_LACKS_FCNTL
455 #define ACE_LACKS_REWINDDIR
456 #define ACE_LACKS_OPENDIR
457 #define ACE_LACKS_READDIR
458 #define ACE_LACKS_SEEKDIR
459 #define ACE_LACKS_TELLDIR
460 #define ACE_LACKS_CLOSEDIR
461 #define ACE_LACKS_ALPHASORT
463 #define ACE_DEFINE_MISSING_ERRNOS
475 typedef unsigned int uid_t
;
476 typedef unsigned int gid_t
;
479 typedef unsigned int mode_t
;
480 typedef struct timespec timespec_t
;
488 #define MAXSYMLINKS 1
492 #define S_IFMT 00170000
493 #define S_IFREG 00100000
494 #define S_IFDIR 00040000
495 #define S_IFCHR 00020000
496 #define ACE_LACKS_MODE_MASKS
501 #define ACE_IPPROTO_TCP SOL_TCP
502 #define TCP_NODELAY OPT_NOWAIT