From 19972d265bb5fab4209f4bee21ecabb89bb2c832 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Fri, 27 Oct 2023 10:39:01 +0200 Subject: [PATCH 1/5] Updates for QNX 7.1 * ACE/ace/config-qnx.h: --- ACE/ace/config-qnx.h | 30 ++++-------------------------- 1 file changed, 4 insertions(+), 26 deletions(-) diff --git a/ACE/ace/config-qnx.h b/ACE/ace/config-qnx.h index 64c5e9f280e6f..fdcda8df5681d 100644 --- a/ACE/ace/config-qnx.h +++ b/ACE/ace/config-qnx.h @@ -25,19 +25,6 @@ #include "ace/config-g++-common.h" -// /usr/nto/include/float.h defines -// FLT_MAX_EXP 127 -// DBL_MAX_EXP 1023 -// ace expects 128 & 1024 respectively -// to set the following macros in ace/Basic_Types.h -// These macros are: -#define ACE_SIZEOF_DOUBLE 8 -#define ACE_SIZEOF_FLOAT 4 - -// At least qnx 6.3.2 uses a void return for unsetenv -// This assumes that older versions do too. -#define ACE_HAS_VOID_UNSETENV - ///////////////////////////////////////////////////////////////// // Definition of the features that are available. // @@ -113,18 +100,14 @@ // // ACE_LACKS Section ///////////////////////////////////////////////////////////////// -#define ACE_LACKS_CONST_TIMESPEC_PTR +//#define ACE_LACKS_CONST_TIMESPEC_PTR #define ACE_LACKS_LINEBUFFERED_STREAMBUF #define ACE_LACKS_MADVISE // Multicast_Tests reports for NTO 621 frames from unsubscribed groups #define ACE_LACKS_PERFECT_MULTICAST_FILTERING 1 -#define ACE_LACKS_RWLOCK_T -#define ACE_LACKS_SO_SNDBUF -#define ACE_LACKS_SO_RCVBUF #define ACE_LACKS_STREAM_MODULES #define ACE_LACKS_STROPTS_H #define ACE_LACKS_STRRECVFD -#define ACE_LACKS_SYSCALL #define ACE_LACKS_SYSV_SHMEM #define ACE_LACKS_SYS_SHM_H #define ACE_LACKS_TIMESPEC_T @@ -162,13 +145,6 @@ #define ACE_SIZEOF_WCHAR 4 -// No prototypes -#define ACE_LACKS_ITOW -#define ACE_LACKS_WCSICMP -#define ACE_LACKS_WCSNICMP -#define ACE_LACKS_WCSDUP -#define ACE_LACKS_STD_WSTRING - #if defined(ACE_MT_SAFE) && (ACE_MT_SAFE != 0) # define ACE_HAS_THREADS # define ACE_HAS_PTHREADS @@ -177,7 +153,6 @@ # define ACE_HAS_PTHREAD_GETCONCURRENCY #endif /* ACE_MT_SAFE */ - // The default value of FD_SETSIZE is 32, but actually x86 NTO // supports by default at least 1000 descriptors in fd_set. #if defined( FD_SETSIZE ) @@ -185,5 +160,8 @@ #endif #define FD_SETSIZE 1000 +#define ACE_SSIZE_T_FORMAT_SPECIFIER_ASCII "%ld" +#define ACE_SIZE_T_FORMAT_SPECIFIER_ASCII "%lu" + #include /**/ "ace/post.h" #endif /* ACE_CONFIG_QNX_H */ From 5413f3b3d622dab07f46171fd86b7654ab684f1c Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Fri, 27 Oct 2023 11:17:48 +0200 Subject: [PATCH 2/5] We don't need several defines anymore with QNX 7.1 * ACE/ace/config-qnx.h: --- ACE/ace/config-qnx.h | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/ACE/ace/config-qnx.h b/ACE/ace/config-qnx.h index fdcda8df5681d..d855c6124620d 100644 --- a/ACE/ace/config-qnx.h +++ b/ACE/ace/config-qnx.h @@ -13,8 +13,6 @@ # error "Could not detect QNX version from macro _NTO_VERSION" #endif -#define _POSIX_C_SOURCE 199506 - // The following defines the Neutrino compiler. // gcc should know to call g++ as necessary #ifdef __GNUC__ @@ -100,7 +98,6 @@ // // ACE_LACKS Section ///////////////////////////////////////////////////////////////// -//#define ACE_LACKS_CONST_TIMESPEC_PTR #define ACE_LACKS_LINEBUFFERED_STREAMBUF #define ACE_LACKS_MADVISE // Multicast_Tests reports for NTO 621 frames from unsubscribed groups @@ -131,6 +128,20 @@ # define ACE_HAS_XPG4_MULTIBYTE_CHAR 1 #endif +#if _NTO_VERSION < 710 +# define ACE_LACKS_CONST_TIMESPEC_PTR +# define ACE_LACKS_RWLOCK_T +# define ACE_LACKS_SO_SNDBUF +# define ACE_LACKS_SO_RCVBUF +# define ACE_LACKS_SYSCALL +# define ACE_LACKS_ITOW +# define ACE_LACKS_WCSICMP +# define ACE_LACKS_WCSNICMP +# define ACE_LACKS_WCSDUP +# define ACE_LACKS_STD_WSTRING + +#endif + #define ACE_LACKS_ISCTYPE #define ACE_LACKS_RLIMIT // QNX rlimit syscalls don't work properly with ACE. From 4c57b10a4a13235df38deab47bb054e5e238e08e Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Fri, 27 Oct 2023 11:21:05 +0200 Subject: [PATCH 3/5] More cleanup * ACE/ace/config-qnx.h: --- ACE/ace/config-qnx.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ACE/ace/config-qnx.h b/ACE/ace/config-qnx.h index d855c6124620d..33dce4ae3b754 100644 --- a/ACE/ace/config-qnx.h +++ b/ACE/ace/config-qnx.h @@ -139,7 +139,15 @@ # define ACE_LACKS_WCSNICMP # define ACE_LACKS_WCSDUP # define ACE_LACKS_STD_WSTRING - +// /usr/nto/include/float.h defines +// FLT_MAX_EXP 127 +// DBL_MAX_EXP 1023 +// ace expects 128 & 1024 respectively +// to set the following macros in ace/Basic_Types.h +// These macros are: +# define ACE_SIZEOF_DOUBLE 8 +# define ACE_SIZEOF_FLOAT 4 +# define _POSIX_C_SOURCE 199506 #endif #define ACE_LACKS_ISCTYPE From d7cf8b9108027afea673c901cd106c1f208e141b Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Fri, 27 Oct 2023 11:22:23 +0200 Subject: [PATCH 4/5] Mention QNX * ACE/NEWS: --- ACE/NEWS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ACE/NEWS b/ACE/NEWS index b42d6906b4ee4..de21476cbe91e 100644 --- a/ACE/NEWS +++ b/ACE/NEWS @@ -10,6 +10,8 @@ USER VISIBLE CHANGES BETWEEN ACE-7.1.1 and ACE-7.1.2 . Add c++std which can be used in the platform_macros.GNU to set the C++ revision to be used (results in -std= flag) +. Improve support for QNX 7.1 + USER VISIBLE CHANGES BETWEEN ACE-7.1.0 and ACE-7.1.1 ==================================================== From 9a2c01c0c06b3402b7ed4ae44fa300673ee9473b Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Fri, 27 Oct 2023 11:30:55 +0200 Subject: [PATCH 5/5] Cleanup support for ancient QNX versions * ACE/ace/config-qnx.h: * ACE/ace/os_include/sys/os_select.h: --- ACE/ace/config-qnx.h | 16 +++------------- ACE/ace/os_include/sys/os_select.h | 6 ------ 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/ACE/ace/config-qnx.h b/ACE/ace/config-qnx.h index 33dce4ae3b754..58b90847c0049 100644 --- a/ACE/ace/config-qnx.h +++ b/ACE/ace/config-qnx.h @@ -114,19 +114,9 @@ #define ACE_HAS_SYSCTL #define ACE_HAS_SIGACTION_CONSTP2 1 #define ACE_LACKS_PTHREAD_SCOPE_PROCESS - -#if _NTO_VERSION < 650 -# define ACE_LACKS_NFDBITS -# define ACE_LACKS_FD_MASK -# define ACE_LACKS_SYS_MSG_H -# define ACE_LACKS_ALPHASORT -# define ACE_LACKS_STRPTIME -# define ACE_LACKS_POLL_H -#else -# define ACE_HAS_POLL 1 -# define ACE_HAS_WCHAR 1 -# define ACE_HAS_XPG4_MULTIBYTE_CHAR 1 -#endif +#define ACE_HAS_POLL 1 +#define ACE_HAS_WCHAR 1 +#define ACE_HAS_XPG4_MULTIBYTE_CHAR 1 #if _NTO_VERSION < 710 # define ACE_LACKS_CONST_TIMESPEC_PTR diff --git a/ACE/ace/os_include/sys/os_select.h b/ACE/ace/os_include/sys/os_select.h index c9888613f5d92..957a3c808f303 100644 --- a/ACE/ace/os_include/sys/os_select.h +++ b/ACE/ace/os_include/sys/os_select.h @@ -40,15 +40,9 @@ extern "C" { #endif /* __cplusplus */ -#if defined (ACE_LACKS_FD_MASK) - typedef long fd_mask; -#endif /* ACE_LACKS_FD_MASK */ - #if defined (ACE_WIN32) // This will help until we figure out everything: # define NFDBITS 32 /* only used in unused functions... */ -#elif defined (ACE_LACKS_NFDBITS) -# define NFDBITS (sizeof(fd_mask) * NBBY) /* bits per mask */ #endif /* ACE_WIN32 */ #ifdef __cplusplus