summaryrefslogtreecommitdiff
path: root/ACE/ace/os_include
diff options
context:
space:
mode:
authorChad Elliott <elliottc@objectcomputing.com>2019-06-06 09:15:02 -0500
committerChad Elliott <elliottc@objectcomputing.com>2019-06-06 09:15:02 -0500
commit4c69b74225cf6d9479caa7a31ab38fa6d70ad669 (patch)
treed2d2f9fb0d357c58063bc310c2c82d4f200b9321 /ACE/ace/os_include
parenta580273d5fc7a820ab23b1aa40faf23e97063000 (diff)
downloadATCD-4c69b74225cf6d9479caa7a31ab38fa6d70ad669.tar.gz
- Use ACE_OS::send and ACE_OS::recv on MQX, instead of write and read.
- Added static casts where pid_t is assumed to be an int. - Use configurable macro for the "use_select" parameter. - MQX does not follow conventional standards when it comes to HTONS and NTOHS and must be configured accordingly. - Modified ACE_Handle_Set so that the use of fd_array is not conditional upon ACE_WIN32. It is now enabled through ACE_HANDLE_SET_USES_FD_ARRAY. - Implement UNIX File IO Functions for MQX in MQX_Filesystem.* - Use the existing implementation to simulate condition variables. - Use emulation for diropen on MQX as is done for Windows. - Convert from MQX error to standard error number. - Use _mqx_exit in ACE_OS::_exit for MQX. - Added a nop in ACE_OS::ioctl for MQX. - Added a definition of ACE_TMAIN for MQX so that MQX is initialized and RTCS and the MQX Filesystem code is initialized before calling ace_main_i(). - Fixed a compile error in SOCK_Dgram.cpp introduced months ago. - Use struct initialization to avoid using the l_linger member directly. - Modified ACE_Select_Reactor_Base to use a hash map for handle storage based on ACE_SELECT_REACTOR_BASE_USES_HASH_MAP instead of ACE_WIN32. - Added the IAR compiler to define ACE_NOTREACHED(a) as empty. - Made ACE_IPPROTO_TCP conditionally defined. - Added error values required for ACE. - Skip the wide-character strtok test if ACE_LACKS_WCSTOK is defined in ACE/tests/OS_Test.cpp. - Added the ability to compile tests so that they output to stderr instead of a file.
Diffstat (limited to 'ACE/ace/os_include')
-rw-r--r--ACE/ace/os_include/netinet/os_in.h2
-rw-r--r--ACE/ace/os_include/os_dirent.h2
-rw-r--r--ACE/ace/os_include/os_errno.h48
-rw-r--r--ACE/ace/os_include/os_pthread.h2
-rw-r--r--ACE/ace/os_include/os_unistd.h12
-rw-r--r--ACE/ace/os_include/sys/os_socket.h6
6 files changed, 66 insertions, 6 deletions
diff --git a/ACE/ace/os_include/netinet/os_in.h b/ACE/ace/os_include/netinet/os_in.h
index 4c82df46183..f71e757532b 100644
--- a/ACE/ace/os_include/netinet/os_in.h
+++ b/ACE/ace/os_include/netinet/os_in.h
@@ -43,7 +43,7 @@ extern "C"
# if defined (ACE_HAS_PHARLAP_RT)
# define ACE_IPPROTO_TCP SOL_SOCKET
-# else
+# elif !defined (ACE_IPPROTO_TCP)
# define ACE_IPPROTO_TCP IPPROTO_TCP
# endif /* ACE_HAS_PHARLAP_RT */
diff --git a/ACE/ace/os_include/os_dirent.h b/ACE/ace/os_include/os_dirent.h
index b5ce357e866..650fb402d96 100644
--- a/ACE/ace/os_include/os_dirent.h
+++ b/ACE/ace/os_include/os_dirent.h
@@ -64,8 +64,10 @@ struct ACE_DIR {
/// The name of the directory we are looking into
ACE_TCHAR *directory_name_;
+#if !defined (ACE_MQX)
/// Remember the handle between calls.
HANDLE current_handle_;
+#endif
/// The struct for the results
ACE_DIRENT *dirent_;
diff --git a/ACE/ace/os_include/os_errno.h b/ACE/ace/os_include/os_errno.h
index c083e7407ee..d132d73882c 100644
--- a/ACE/ace/os_include/os_errno.h
+++ b/ACE/ace/os_include/os_errno.h
@@ -31,6 +31,10 @@
#include /**/ <errnoLib.h>
#endif /* ACE_VXWORKS */
+#ifndef ACE_CUSTOM_ERRNO_BASE
+# define ACE_CUSTOM_ERRNO_BASE 1000
+#endif
+
// Place all additions (especially function declarations) within extern "C" {}
#ifdef __cplusplus
extern "C"
@@ -281,7 +285,7 @@ extern "C"
void herror (const char *str);
#endif /* ACE_HAS_H_ERRNO */
-#if defined (ACE_LACKS_ERRNO_H)
+#if defined (ACE_LACKS_ERRNO_H) || defined (ACE_DEFINE_MISSING_ERRNOS)
# if !defined (EPERM)
# define EPERM 1
# endif /* EPERM */
@@ -378,7 +382,7 @@ void herror (const char *str);
# if !defined (ERANGE)
# define ERANGE 34
# endif /* ERANGE */
-# if !defined (EDEADLK)
+# if !defined (EDEADLK) && !defined (ACE_MQX) // Conflicts with EILSEQ
# define EDEADLK 36
# endif /* EDEADLK */
# if !defined (ENAMETOOLONG)
@@ -393,7 +397,38 @@ void herror (const char *str);
# if !defined (ENOTEMPTY)
# define ENOTEMPTY 41
# endif /* ENOTEMPTY */
-#endif /* ACE_LACKS_ERRNO_H */
+# ifndef ETIME
+# define ETIME 62
+# endif
+# ifndef ECOMM
+# define ECOMM 70
+# endif
+# ifndef EAFNOSUPPORT
+# define EAFNOSUPPORT 97
+# endif
+# ifndef EADDRIUNSE
+# define EADDRINUSE 98
+# endif
+# ifndef ENETUNREACH
+# define ENETUNREACH 101
+# endif
+# ifndef ECONNRESET
+# define ECONNRESET 104
+# endif
+# ifndef ENOBUFS
+# define ENOBUFS 105
+# endif
+# ifndef EISCONN
+# define EISCONN 106
+# endif
+# ifndef ECONNREFUSED
+# define ECONNREFUSED 111
+# endif
+# ifndef EINPROGRESS
+# define EINPROGRESS 115
+# endif
+
+#endif /* ACE_DEFINE_MISSING_ERRNOS */
#if defined (ACE_LACKS_T_ERRNO)
extern int t_errno;
@@ -425,7 +460,7 @@ extern int t_errno;
#endif /* ECOMM */
#if !defined (EDEADLK)
-# define EDEADLK 1000 /* Some large number.... */
+# define EDEADLK (ACE_CUSTOM_ERRNO_BASE) + 1
#endif /* !EDEADLK */
#if !defined (ENXIO) /* Needed in SOCK_Dgram_Mcast */
@@ -452,6 +487,11 @@ extern int t_errno;
#define ESHUTDOWN ECANCELED
#endif
+#ifdef ACE_MQX
+# define EWOULDBLOCK EAGAIN
+# define ELOOP (ACE_CUSTOM_ERRNO_BASE) + 2
+#endif
+
#ifdef __cplusplus
}
#endif /* __cplusplus */
diff --git a/ACE/ace/os_include/os_pthread.h b/ACE/ace/os_include/os_pthread.h
index 6b2582b21c8..5693cb880e2 100644
--- a/ACE/ace/os_include/os_pthread.h
+++ b/ACE/ace/os_include/os_pthread.h
@@ -292,7 +292,7 @@
# define THR_EXPLICIT_SCHED 0x00800000
# define THR_SCHED_IO 0x01000000
-# if !defined (ACE_HAS_STHREADS)
+# if !defined (ACE_HAS_STHREADS) && !defined (ACE_MQX)
# if !defined (ACE_HAS_POSIX_SEM) && !defined (ACE_USES_FIFO_SEM)
// This needs to be moved out of here.
diff --git a/ACE/ace/os_include/os_unistd.h b/ACE/ace/os_include/os_unistd.h
index 942a40c431f..55235d30398 100644
--- a/ACE/ace/os_include/os_unistd.h
+++ b/ACE/ace/os_include/os_unistd.h
@@ -51,6 +51,18 @@
# include /**/ <hostLib.h>
#endif /* ACE_VXWORKS */
+#ifdef ACE_MQX
+# if !defined (STDIN_FILENO) && defined (_LLIO_STDIN)
+# define STDIN_FILENO (_LLIO_STDIN)
+# endif
+# if !defined (STDOUT_FILENO) && defined (_LLIO_STDOUT)
+# define STDOUT_FILENO (_LLIO_STDOUT)
+# endif
+# if !defined (STDERR_FILENO) && defined (_LLIO_STDERR)
+# define STDERR_FILENO (_LLIO_STDERR)
+# endif
+#endif
+
// Place all additions (especially function declarations) within extern "C" {}
#ifdef __cplusplus
extern "C"
diff --git a/ACE/ace/os_include/sys/os_socket.h b/ACE/ace/os_include/sys/os_socket.h
index 19b0eadb7cf..dbdba632729 100644
--- a/ACE/ace/os_include/sys/os_socket.h
+++ b/ACE/ace/os_include/sys/os_socket.h
@@ -28,6 +28,10 @@
# include /**/ <sys/socket.h>
#endif /* !ACE_LACKS_SYS_SOCKET_H */
+#if defined (ACE_USES_SOCKET_H)
+# include /**/ <socket.h>
+#endif /* ACE_USES_SOCKET_H */
+
#if defined (ACE_USES_SOCKLIB_H)
# include /**/ <sockLib.h>
#endif /* ACE_USES_SOCKLIB_H */
@@ -215,6 +219,7 @@ extern "C"
#define ACE_HAS_SOCK_BUF_SIZE_MAX_VALUE SSIZE_MAX
#endif /* ACE_HAS_SOCK_BUF_SIZE_MAX_VALUE */
+#if !defined (ACE_SOCKET_LEN)
#if defined (ACE_HAS_SOCKLEN_T)
# if defined (__hpux)
/*
@@ -240,6 +245,7 @@ typedef size_t ACE_SOCKET_LEN;
#else
typedef int ACE_SOCKET_LEN;
#endif /* ACE_HAS_SIZET_SOCKET_LEN */
+#endif /* ACE_SOCKET_LEN */
#if defined (ACE_HAS_NETLINK)
# include /**/ <asm/types.h>