GitHub Actions: Try MSVC builds with /std:c++17 and 20
[ACE_TAO.git] / ACE / ace / config-linux.h
blob954d61f091d1d219246458b4596eb477d79bf77d
1 // -*- C++ -*-
2 // The following configuration file is designed to work for Linux
3 // platforms using GNU C++.
5 #ifndef ACE_CONFIG_LINUX_H
6 #define ACE_CONFIG_LINUX_H
7 #include /**/ "ace/pre.h"
9 #if !defined (ACE_LINUX)
10 #define ACE_LINUX
11 #endif /* ACE_LINUX */
13 #if !defined (__ACE_INLINE__)
14 # define __ACE_INLINE__
15 #endif /* ! __ACE_INLINE__ */
17 #if !defined (ACE_PLATFORM_CONFIG)
18 #define ACE_PLATFORM_CONFIG config-linux.h
19 #endif
21 #include "ace/config-linux-common.h"
23 #define ACE_HAS_BYTESEX_H
25 #if (defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) >= 500)
26 # define ACE_HAS_PTHREADS_UNIX98_EXT
27 #endif /* _XOPEN_SOURCE - 0 >= 500 */
29 #if !defined (ACE_LACKS_LINUX_NPTL)
31 // Temporary fix because NPTL kernels do have shm_open but there is a problem
32 // with shm_open/shm_unlink pairing in ACE which needs to be fixed when I have time.
33 # if defined (ACE_HAS_SHM_OPEN)
34 # undef ACE_HAS_SHM_OPEN
35 # endif /* ACE_HAS_SHM_OPEN */
37 # if defined (ACE_USES_FIFO_SEM)
38 // Don't use this for Linux NPTL since this has complete
39 // POSIX semaphores which are more efficient
40 # undef ACE_USES_FIFO_SEM
41 # endif /* ACE_USES_FIFO_SEM */
43 # if defined (ACE_HAS_POSIX_SEM)
44 // Linux NPTL may not define the right POSIX macro
45 // but they have the actual runtime support for this stuff
46 # if !defined (ACE_HAS_POSIX_SEM_TIMEOUT) && (((_POSIX_C_SOURCE - 0) >= 200112L) || (_XOPEN_SOURCE >= 600))
47 # define ACE_HAS_POSIX_SEM_TIMEOUT
48 # endif /* !ACE_HAS_POSIX_SEM_TIMEOUT && (((_POSIX_C_SOURCE - 0) >= 200112L) || (_XOPEN_SOURCE >= 600)) */
49 # endif /* ACE_HAS_POSIX_SEM */
50 #endif /* !ACE_LACKS_LINUX_NPTL */
52 // AIO support pulls in the rt library, which pulls in the pthread
53 // library. Disable AIO in single-threaded builds.
54 #if defined (ACE_HAS_THREADS)
55 # define ACE_HAS_CLOCK_GETTIME
56 # define ACE_HAS_CLOCK_SETTIME
57 #else
58 # undef ACE_HAS_AIO_CALLS
59 #endif
61 // Then glibc/libc5 specific parts
63 #if defined(__GLIBC__) || defined (__INTEL_COMPILER)
64 # if !defined (__INTEL_COMPILER) && \
65 (__GLIBC__ < 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 3)
66 # define ACE_HAS_RUSAGE_WHO_ENUM enum __rusage_who
67 # define ACE_HAS_RLIMIT_RESOURCE_ENUM enum __rlimit_resource
68 # define ACE_LACKS_ISCTYPE
69 # endif
70 # define ACE_HAS_SOCKLEN_T
71 # define ACE_HAS_4_4BSD_SENDMSG_RECVMSG
73 // glibc defines both of these, used in OS_String.
74 # if defined (_GNU_SOURCE)
75 # define ACE_HAS_STRNLEN
76 # define ACE_HAS_WCSNLEN
78 // This is probably not a 100%-sure-fire check... Red Hat Linux 9
79 // and Enterprise Linux 3 and up have a new kernel that can send signals
80 // across threads. This was not possible prior because there was no real
81 // difference between a process and a thread. With this, the
82 // ACE_POSIX_SIG_Proactor is the only chance of getting asynch I/O working.
83 // There are restrictions, such as all socket operations being silently
84 // converted to synchronous by the kernel, that make aio a non-starter
85 // for most Linux platforms at this time. But we'll start to crawl...
86 # define ACE_POSIX_SIG_PROACTOR
87 # endif
89 // To avoid the strangeness with Linux's ::select (), which modifies
90 // its timeout argument, use ::poll () instead.
91 # define ACE_HAS_POLL
93 # define ACE_HAS_SIGINFO_T
94 # define ACE_LACKS_SIGINFO_H
95 # define ACE_HAS_UCONTEXT_T
96 # define ACE_HAS_SIGTIMEDWAIT
97 # define ACE_HAS_STRERROR_R
99 #else /* ! __GLIBC__ */
100 // Fixes a problem with some non-glibc versions of Linux...
101 # define ACE_LACKS_MADVISE
102 # define ACE_LACKS_MSG_ACCRIGHTS
103 #endif /* ! __GLIBC__ */
105 // Completely common part :-)
107 #define ACE_HAS_UALARM
109 #if (__GLIBC__ < 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 10)
110 // Although the scandir man page says otherwise, this setting is correct.
111 // The setting was fixed in 2.10, so do not use the hack after that.
112 # define ACE_SCANDIR_CMP_USES_CONST_VOIDPTR
113 #endif
115 // A conflict appears when including both <ucontext.h> and
116 // <sys/procfs.h> with recent glibc headers.
117 //#define ACE_HAS_PROC_FS
119 // Platform supports System V IPC (most versions of UNIX, but not Win32)
120 #define ACE_HAS_SYSV_IPC
122 // Compiler/platform defines a union semun for SysV shared memory.
123 #define ACE_HAS_SEMUN
125 #if defined (__powerpc__) && !defined (ACE_SIZEOF_LONG_DOUBLE)
126 // 32bit PowerPC Linux uses 128bit long double
127 # define ACE_SIZEOF_LONG_DOUBLE 16
128 #endif
130 #define ACE_LACKS_GETIPNODEBYADDR
131 #define ACE_LACKS_GETIPNODEBYNAME
133 #define ACE_HAS_ICMP_SUPPORT 1
135 #if defined (ACE_LACKS_NETWORKING)
136 # include "ace/config-posix-nonetworking.h"
137 #else
138 # define ACE_HAS_NETLINK
139 # define ACE_HAS_GETIFADDRS
140 #endif
142 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,8))
143 # define ACE_HAS_SCHED_GETAFFINITY 1
144 # define ACE_HAS_SCHED_SETAFFINITY 1
145 #endif
147 // This is ghastly, but as long as there are platforms supported
148 // which define the right POSIX macros but lack actual support
149 // we have no choice.
150 // RHEL4 fails (2.6.9) while RHEL5 works (2.6.18)
151 #if !defined (ACE_LACKS_CONDATTR_SETCLOCK)
152 # if (LINUX_VERSION_CODE < KERNEL_VERSION (2,6,18))
153 # define ACE_LACKS_CONDATTR_SETCLOCK
154 # endif
155 #endif
157 #define ACE_HAS_MNTENT
159 // To support UCLIBC
160 #if defined (__UCLIBC__)
162 # define ACE_LACKS_STROPTS_H
163 # define ACE_LACKS_GETLOADAVG
164 # define ACE_LACKS_NETDB_REENTRANT_FUNCTIONS
165 # define ACE_LACKS_PTHREAD_SETSTACK
166 # define ACE_LACKS_STRRECVFD
167 # define ACE_HAS_CPU_SET_T
169 # if defined (ACE_HAS_STRBUF_T)
170 # undef ACE_HAS_STRBUF_T
171 # endif /* ACE_HAS_STRBUF_T */
173 # if defined (ACE_HAS_PTHREAD_SETSTACK)
174 # undef ACE_HAS_PTHREAD_SETSTACK
175 # endif /* ACE_HAS_PTHREAD_SETSTACK */
177 # if defined (ACE_HAS_AIO_CALLS)
178 # undef ACE_HAS_AIO_CALLS
179 # endif /* ACE_HAS_AIO_CALLS */
181 # if defined (ACE_HAS_GETIFADDRS)
182 # undef ACE_HAS_GETIFADDRS
183 # endif /* ACE_HAS_GETIFADDRS */
185 # if defined (ACE_SCANDIR_CMP_USES_VOIDPTR)
186 # undef ACE_SCANDIR_CMP_USES_VOIDPTR
187 # endif /* ACE_SCANDIR_CMP_USES_VOIDPTR */
189 # if defined (ACE_SCANDIR_CMP_USES_CONST_VOIDPTR)
190 # undef ACE_SCANDIR_CMP_USES_CONST_VOIDPTR
191 # endif /* ACE_SCANDIR_CMP_USES_CONST_VOIDPTR */
193 # if defined (ACE_HAS_EXECINFO_H)
194 # undef ACE_HAS_EXECINFO_H
195 # endif /* ACE_HAS_EXECINFO_H */
197 # if defined(__GLIBC__)
198 # undef __GLIBC__
199 # endif /* __GLIBC__ */
201 # if defined(ACE_HAS_SEMUN)
202 # undef ACE_HAS_SEMUN
203 # endif /* ACE_HAS_SEMUN */
205 #endif /* __UCLIBC__ */
207 #include /**/ "ace/post.h"
209 #endif /* ACE_CONFIG_LINUX_H */