summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2021-01-05 13:13:28 +0100
committerGitHub <noreply@github.com>2021-01-05 13:13:28 +0100
commit2ba2740f8e5a1ff0cbe2f580426a77ad762894d4 (patch)
tree4b5afd56591084542515a39efa4782a28e90af23
parent9b9a0f15f1fea6f7af36f20f1a3925a87d5e6799 (diff)
parent30477fe4b5ec8b09c163189e4cbb62fd185a689f (diff)
downloadATCD-2ba2740f8e5a1ff0cbe2f580426a77ad762894d4.tar.gz
Merge branch 'master' into jwi-ACE_HAS_WORKING_EXPLICIT_TEMPLATE_DESTRUCTOR
-rw-r--r--ACE/ACE-INSTALL.html137
-rw-r--r--ACE/NEWS27
-rw-r--r--ACE/ace/OS_NS_stdlib.h6
-rw-r--r--ACE/ace/README6
-rw-r--r--ACE/ace/config-android.h118
-rw-r--r--ACE/ace/config-kfreebsd.h147
-rw-r--r--ACE/ace/config-win32-msvc-14.h1
-rw-r--r--ACE/bin/MakeProjectCreator/config/acedefaults.mpb4
-rw-r--r--ACE/include/makeinclude/platform_android.GNU193
-rw-r--r--ACE/include/makeinclude/platform_clang_common.GNU94
-rw-r--r--ACE/include/makeinclude/platform_g++_common.GNU106
-rw-r--r--ACE/include/makeinclude/platform_gcc_clang_common.GNU107
-rw-r--r--ACE/include/makeinclude/platform_linux.GNU23
-rw-r--r--ACE/include/makeinclude/platform_linux_common.GNU23
-rw-r--r--ACE/include/makeinclude/rules.lib.GNU20
-rw-r--r--ACE/include/makeinclude/wrapper_macros.GNU2
-rw-r--r--ACE/tests/Semaphore_Test.cpp3
-rw-r--r--TAO/DevGuideExamples/RTCORBA/README2
-rw-r--r--TAO/DevGuideExamples/RTCORBA/common.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_constant/constant_ch.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_constant/constant_cs.cpp16
-rw-r--r--TAO/orbsvcs/LoadBalancer/LoadManager.cpp8
-rw-r--r--TAO/orbsvcs/LoadBalancer/LoadMonitor.cpp4
-rw-r--r--TAO/orbsvcs/orbsvcs/LoadBalancing/LB_CPU_Load_Average_Monitor.cpp7
-rw-r--r--TAO/orbsvcs/orbsvcs/LoadBalancing/LB_CPU_Utilization_Monitor.cpp3
-rw-r--r--TAO/tests/Time_Policy/main.cpp2
26 files changed, 360 insertions, 703 deletions
diff --git a/ACE/ACE-INSTALL.html b/ACE/ACE-INSTALL.html
index 13bcad42f95..45d215f7528 100644
--- a/ACE/ACE-INSTALL.html
+++ b/ACE/ACE-INSTALL.html
@@ -1626,8 +1626,8 @@ symbols are necessary when you want to debug your code.</p>
<h2><a name="android">Building and Installing ACE on Android</a></h2>
<ul>
- <li><a href="#android-toolchain">Generating a Toolchain</a></li>
- <li><a href="#android-oldndks">Using Older NDKs</a></li>
+ <li><a href="#android-target">Choosing the Target</a></li>
+ <li><a href="#android-toolchain">Generating a Toolchain (Optional)</a></li>
<li><a href="#android-building">Building</a></li>
<li><a href="#android-install">Installing ACE on Android</a></li>
<li><a href="#android-logging">Logging</a></li>
@@ -1637,13 +1637,16 @@ symbols are necessary when you want to debug your code.</p>
<p>ACE can be built for Android by using the <a
href="https://developer.android.com/ndk/">Android Native Development Kit
(NDK)</a>. This is different than the standard way of writing Android
-applications in Java which run the on Android Runtime or the older Dalvik
-Virtual Machine. Applications built using the NDK are native Linux applications
-written in C or C++ specifically compiled to run on Android systems. In
-addition, applications built using the NDK have access to Android-specific APIs
-much like the ones available to Java-based Android applications.
+applications in Java which run the on the Android Runtime or the older Dalvik
+Virtual Machine. Applications and libraries built using the NDK are native
+Linux applications written in C or C++ specifically compiled to run on Android
+systems and libraries can be included in normal Android apps. In addition,
+applications and libraries built using the NDK have access to Android-specific
+APIs much like the ones available to Java-based Android applications.
</p>
+<p><b>NOTE: ACE requires NDK r18 or later. Building with the NDK directly requires NDK r19 or later.</b></p>
+
<div class="boxed">
<p><b>Windows Users:</b> These instructions are written for a Unix based
platform like Linux, but can also be used on Windows. If you are using an
@@ -1658,11 +1661,17 @@ addition to the Windows version of the Android NDK, you will also need
<a href="https://www.msys2.org">MSYS2 for Unix utilities that ACE needs</a>.
</div>
-<h3><a name="android-toolchain">Generating a Toolchain</a></h3>
+After downloading the NDK, you will have to decide on what target you want to
+build for, which is covered in the next section, then decide if you want to
+build directly using the NDK or using
+<a href="#android-toolchain">a generated standalone toolchain</a>. Generating a
+toolchain is optional and only really makes sense if you're building for just
+one architecture/API level pair and don't need to keep the entire NDK around.
+
+<h3><a name="android-toolchain">Choosing the Target</a></h3>
-<p>To build ACE for Android you need to download the NDK and generate a
-toolchain for the specific Android target you want. The specific target is
-defined by two things:</p>
+<p>To build ACE for Android you need to know the specific Android target you
+want. The specific target is defined by two things:</p>
<dl class="indent">
<dt>- The minimal API level to target.</dt>
@@ -1677,14 +1686,14 @@ defined by two things:</p>
although support for MIPS has been dropped from the NDK. <a
href="https://developer.android.com/ndk/guides/abis">This is the official
documentation on the ABIs</a>. These are the ABIs that ACE supports at the
- time of writing and must be passed to ACE as <code>ANDROID_ABI</code>:
+ time of writing and must be passed to ACE as <code>android_abi</code>:
<!-- Check to see if any architectures have been added or removed. If so
update this list and the table below as well-->
- <dl>
+ <dl id="android_abis">
<dt><code>armeabi-v7a</code></dt>
- <dd>32-bit ARM, The default ABI for both the NDK and ACE.</dd>
- <dt><code>armeabi-v7a-with-neon</code></dt>
- <dd><code>armeabi-v7a</code> with NEON extensions enabled.</dd>
+ <dd>32-bit ARM. Builds with NEON extensions enabled by default. Include
+ <code>android_neon := 0</code> in your <code>platform_macros.GNU</code>
+ if you want to support processors without NEON support.</dd>
<dt><code>arm64-v8a</code></dt>
<dd>64-bit ARM, Sometimes referred to as <code>aarch64</code>.</dd>
<dt><code>x86</code></dt>
@@ -1695,15 +1704,16 @@ defined by two things:</p>
<p><b>
It should be noted that starting in August 2019, the Google Play
Store will require new apps to have 64-bit libraries if they have native
- libraries. 32-bit native libraries will still be supported but they must also
- have 64-bit libraries. Look up any restrictions that may affect
- apps you want to publish on the Play Store, including minimum API
- level.
+ libraries. 32-bit native libraries will still be supported but apps must
+ also have 64-bit libraries. Look up any restrictions that may affect apps
+ you want to publish on the Play Store, including targeted API level
+ requirements.
</b></p>
</dd>
</li>
</dl>
+<h3><a name="android-toolchain">Generating a Toolchain (Optional)</a></h3>
<p>To generate a toolchain, one use must use
<code>build/tools/make_standalone_toolchain.py</code> in the NDK. A destination must be
@@ -1715,10 +1725,11 @@ toolchain targeting 32-bit ARM Android 7.0 "Nougat" (API Level 24) and later: </
<p><code>$TOOLCHAIN/bin</code> must be in your <code>$PATH</code> when building ACE and
applications using ACE.</p>
-<p>This table shows how the <code>ANDROID_ABI</code> variable and the <code>--arch</code> argument correlate:</p>
-<table class="indent">
+<p>This table shows how the <code>android_abi</code> variable and the
+<code>--arch</code> argument correlate:</p>
+<table class="indent" id="android_abi_toolchain_table">
<tr>
- <th><code>ANDROID_ABI</code></th>
+ <th><code>android_abi</code></th>
<th><code>--arch</code></th>
</tr>
<tr>
@@ -1726,10 +1737,6 @@ applications using ACE.</p>
<td><code>arm</code></td>
</tr>
<tr>
- <td><code>armeabi-v7a-with-neon</code></td>
- <td><code>arm</code></td>
- </tr>
- <tr>
<td><code>arm64-v8a</code></td>
<td><code>arm64</code></td>
</tr>
@@ -1763,64 +1770,6 @@ utilities must be in <code>%PATH%</code> when cross compiling ACE. The default
location for these would be <code>C:\msys64\usr\bin</code>.
</div>
-<!-- Remove this section if these NDKs can be considered not supported anymore -->
-<h3><a name="android-oldndks">Using Older NDKs</a></h3>
-
-<p><b>Skip this section if using NDK r18 or later.</b></p>
-
-<p>
-It is <b>highly recommended</b> to use the latest NDK available assuming
-that it works with ACE. It is possible to use NDKs older than r18, but these
-have caveats:
-</p>
-<ul>
- <li>
- In NDK r16, a file called <code>ndk-version.h</code> was added that
- contains the version of the NDK. If using an earlier NDK, you <b>must</b>
- define the macros <code>__NDK_MAJOR__</code> and <code>__NDK_MINOR__</code>
- in <code>ace/config.h</code> before
- <code>#include "ace/config-android.h"</code>.
- The scheme works like this:
- <table class="indent" style="margin-top: .5em; margin-bottom: .5em;">
- <tr>
- <th>Revision</th>
- <th><code>__NDK_MAJOR__</code></th>
- <th><code>__NDK_MINOR__</code></th>
- </tr>
- <tr>
- <td>r16</td>
- <td>16</td>
- <td>0</td>
- </tr>
- <tr>
- <td>r16a</td>
- <td>16</td>
- <td>1</td>
- </tr>
- <tr>
- <td>r16b</td>
- <td>16</td>
- <td>2</td>
- </tr>
- </table>
- </li>
- <li>
- As of NDK r18, the only compiler that comes with the NDK is clang and by
- default the build system assumes that clang is available and will use it.
- However there was a transitional period between r12 and r17 where GCC and
- clang both exist in the NDK. In some cases GCC should be used if linking
- errors occur with these NDKs (For example missing references to
- <code>stderr</code>). To let the build system decide between them, set
- <code>android_force_clang:=0</code> in
- <code>include/makeinclude/platform_macros.GNU</code> before including
- <code>platform_android.GNU</code>. <b>This should be set for NDKs before r15.</b>
- </li>
- <li>
- There are probably unknown conflicts, especially in the minor revisions
- before the last minor revision of a NDK revision.
- </li>
-</ul>
-
<h3><a name="android-building">Building</a></h3>
<ul>
@@ -1841,10 +1790,15 @@ have caveats:
<li>Create <code>include/makeinclude/platform_macros.GNU</code>:
<ul>
<li>
- Set <code>ANDROID_ABI</code> to one of the options above. This
- must match the toolchain <code>--arch</code> argument used according
- to the table above.
+ Set <code>android_abi</code> to one of
+ <a href="#android_abis">the options above</a>.
+ If using a standalone toolchain this must match the
+ <code>--arch</code> argument used according
+ to <a href="#android_abi_toolchain_table">the table above</a>.
</li>
+ <li>If using the NDK directly, set <code>android_ndk</code> to the
+ location of the extracted NDK and <code>android_api</code> to the API
+ level desired.</li>
<li>Set options for debug and optimization options as desired.</li>
<li>If you want to compile static, add <code>static_libs_only:=1</code></li>
<li>Must include <code>include $(ACE_ROOT)/include/makeinclude/platform_android.GNU</code>.</li>
@@ -1857,10 +1811,11 @@ have caveats:
</li>
</li>
<li>Generate makefiles (if necessary).</li>
- <li>Build with GNU make. Make sure you have <code>$TOOLCHAIN/bin</code> in
- your <code>$PATH</code>.
+ <li>Build with GNU make. If using a standalone toolchain, make sure you
+ have <code>$TOOLCHAIN/bin</code> in your <code>$PATH</code>.
<div class="boxed indent"><p>
- <b>Windows Users:</b> Make sure you have <code>%TOOLCHAIN%\bin</code>
+ <b>Windows Users:</b> If using a standalone toolchain,
+ Make sure you have <code>%TOOLCHAIN%\bin</code>
and MSYS2's <code>bin</code> in your <code>%PATH%</code> when building.
If you are cross compiling TAO you will also need a preprocessor for
<code>tao_idl</code> available (See Windows note above).</p>
diff --git a/ACE/NEWS b/ACE/NEWS
index d2bb45b137d..5406504f6d0 100644
--- a/ACE/NEWS
+++ b/ACE/NEWS
@@ -23,6 +23,33 @@ USER VISIBLE CHANGES BETWEEN ACE-6.5.12 and ACE-7.0.0
. New Latest_ACE7TAO3_ branches which can be used to always checkout the
latest ACE7/TAO3 micro/minor release
+. Android Support:
+
+ . `gnuace` no longer supports Android NDKs before r18. This means only clang
+ is now supported when building for Android.
+
+ . Support for building with the Android NDK r19 or later directly instead of
+ having to use a generated standalone toolchain. See `ACE-INSTALL.html` for
+ details. Using a standalone toolchain is still supported.
+
+ . Made it easier to use `gnuace`-built libraries in as imported libraries in
+ CMake-based Android Studio native projects.
+
+ . Removed support for old `ANDROID_ARCH` make variable. Replaced
+ `ANDROID_ABI` with `android_abi`, but kept the former as an alias of the
+ later for compatibility. Also will no longer default to 32-bit ARM, so
+ `android_abi` or `ANDROID_ABI` must be defined.
+
+ . As recommend by Google, building with neon support is now the default when
+ `android_abi` is `armeabi-v7a`. If support for these processors without
+ NEON extensions is needed, put `androind_neon := 0` in
+ `platform_macros.GNU`.
+
+ . As recommend by Google, `gnuace` will start using LLD, the LLVM linker,
+ instead of the default GNU linkers. If the NDK being used doesn't default
+ to LLD and you want to use the GNU linkers, put `androind_set_lld := 0` in
+ `platform_macros.GNU`.
+
USER VISIBLE CHANGES BETWEEN ACE-6.5.11 and ACE-6.5.12
======================================================
diff --git a/ACE/ace/OS_NS_stdlib.h b/ACE/ace/OS_NS_stdlib.h
index 0b682b7485f..4e0e4442eeb 100644
--- a/ACE/ace/OS_NS_stdlib.h
+++ b/ACE/ace/OS_NS_stdlib.h
@@ -100,10 +100,10 @@ namespace ACE_OS {
*/
//@{
ACE_NAMESPACE_INLINE_FUNCTION
- void _exit (int status = 0) ACE_GCC_NO_RETURN;
+ void _exit [[noreturn]] (int status = 0);
ACE_NAMESPACE_INLINE_FUNCTION
- void abort () ACE_GCC_NO_RETURN;
+ void abort [[noreturn]] ();
/**
* Register an at exit hook. The @a name can be used to analyze shutdown
@@ -180,7 +180,7 @@ namespace ACE_OS {
void *calloc (size_t elements, size_t sizeof_elements);
extern ACE_Export
- void exit (int status = 0) ACE_GCC_NO_RETURN;
+ void exit [[noreturn]] (int status = 0);
extern ACE_Export
void free (void *);
diff --git a/ACE/ace/README b/ACE/ace/README
index 8f5ba36d9e0..98f7f7aa5d6 100644
--- a/ACE/ace/README
+++ b/ACE/ace/README
@@ -140,12 +140,6 @@ ACE_HAS_ALT_CUSERID Use ACE's alternate cuserid()
undefined and that the
geteuid() system call exists.
ACE_HAS_DINKUM_STL Using the Dinkum STL library
-ACE_HAS_HEADER_ALLOCATED_CLASS_STATIC_CONST_INT_STOREAGE
- Non-C++ Compliant compilers that automatically
- provide storage for class static const int
- when their declaration is seen. I.e. they object
- to explicit definitions being seen in the .cpp
- file.
ACE_DEFAULT_THREAD_KEYS Number of TSS keys, with
ACE_HAS_TSS_EMULATION _only_.
Defaults to 64.
diff --git a/ACE/ace/config-android.h b/ACE/ace/config-android.h
index d3d89f39d5b..ea367836baf 100644
--- a/ACE/ace/config-android.h
+++ b/ACE/ace/config-android.h
@@ -10,13 +10,8 @@
// There is a large number of combinations of these two that can lead to
// problems.
-// Location of the __ANDROID_API__ define
-// #include $NDK_ROOT/sysroot/usr/include/android/api-level.h
-#include "android/api-level.h"
-
-#if !defined (__ANDROID_API__)
-# error __ANDROID_API__ must be defined
-#endif
+#include <android/ndk-version.h>
+#include <android/api-level.h>
#define ACE_ANDROID
#define ACE_PLATFORM_CONFIG config-android.h
@@ -26,94 +21,40 @@
/*
* Android NDK Revision Macros
*
- * Revsions Scheme Work Like This:
- * Revision | __NDK_MAJOR__ | __NDK_MINOR__
- * r16 | 16 | 0
- * r16b | 16 | 1
- * r16c | 16 | 2
+ * Revisions Scheme Work Like This:
+ * Revision | __NDK_MAJOR__ | __NDK_MINOR__ | __NDK__BETA__
+ * r16 | 16 | 0 | 0
+ * r16b | 16 | 1 | 0
+ * r16c | 16 | 2 | 0
+ * r22-beta1| 22 | 0 | 1
*
- * After r16, NDK version macros are defined in android/ndk-version.h Before
- * that they must be defined in platform_macros.GNU before the include of
- * platform_android.GNU.
+ * __NDK_BETA__ is starts at 1 and increments until release when it is 0.
*/
-#define ACE_ANDROID_NDK_AT_LEAST(MAJ, MIN) \
- (__NDK_MAJOR__ > (MAJ) || (__NDK_MAJOR__ == (MAJ) && __NDK_MINOR__ >= (MIN)))
-
-#define ACE_ANDROID_NDK_EXACTLY(MAJ, MIN) \
- (__NDK_MAJOR__ == (MAJ) && __NDK_MINOR__ == (MIN))
-
-#define ACE_ANDROID_NDK_LESS_THAN(MAJ, MIN) \
- (__NDK_MAJOR__ < (MAJ) || (__NDK_MAJOR__ == (MAJ) && __NDK_MINOR__ < (MIN)))
-
-#ifdef ACE_ANDROID_NDK_HAS_NDK_VERSION_H
-# include "android/ndk-version.h"
-#else
-# ifndef __NDK_MAJOR__
-# error ndk-version.h is missing, __NDK_MAJOR__ for Android NDK must be defined!
-# endif
-# ifndef __NDK_MINOR__
-# error ndk-version.h is missing, __NDK_MINOR__ for Android NDK must be defined!
-# endif
-#endif
+#define ACE_ANDROID_NDK_AT_LEAST(MAJ, MIN, BET) (\
+ (__NDK_MAJOR__ > (MAJ)) || \
+ (__NDK_MAJOR__ == (MAJ) && __NDK_MINOR__ >= (MIN)) || \
+ (__NDK_MAJOR__ == (MAJ) && __NDK_MINOR__ == (MIN) && \
+ (__NDK_BETA__ == 0 || __NDK_BETA__ >= (BET)) \
+ ) \
+)
-// ucontext.h and clock_settime() were added in r10c
-#if ACE_ANDROID_NDK_AT_LEAST(10, 2)
-# define ACE_HAS_UCONTEXT_T
-# define ACE_HAS_CLOCK_SETTIME
-#else
-# define ACE_LACKS_UCONTEXT_H
-#endif
+#define ACE_ANDROID_NDK_EXACTLY(MAJ, MIN, BET) \
+ (__NDK_MAJOR__ == (MAJ) && __NDK_MINOR__ == (MIN) && __NDK_BETA__ == (BETA))
-// NDK has these by r12b
-#if ACE_ANDROID_NDK_LESS_THAN(12, 1)
-# define ACE_LACKS_GETHOSTENT
-# define ACE_LACKS_LOCALECONV
-# define ACE_LACKS_WCHAR_STD_NAMESPACE
-// Used in tests/Sequence_Unit_Tests/string_sequence_tester.hpp
-# define TAO_LACKS_WCHAR_CXX_STDLIB
-#endif
+#define ACE_ANDROID_NDK_LESS_THAN(MAJ, MIN, BET) \
+ !ACE_ANDROID_NDK_AT_LEAST((MAJ), (MIN), (BET))
-#if ACE_ANDROID_NDK_LESS_THAN(12, 1) || __ANDROID_API__ < 18
+#if __ANDROID_API__ < 18
# define ACE_LACKS_LOG2
#endif
-#if ACE_ANDROID_NDK_LESS_THAN(12, 1) || __ANDROID_API__ < 21
+#if __ANDROID_API__ < 21
# define ACE_LACKS_SEARCH_H
# define ACE_LACKS_SYS_SEM_H
# define ACE_LACKS_SEMBUF_T
# define ACE_LACKS_SYS_MSG_H
# define ACE_LACKS_SYS_SHM_H
# define ACE_LACKS_SYSV_SHMEM
-#else
-# define ACE_HAS_SEMUN
-#endif
-
-#if ACE_ANDROID_NDK_LESS_THAN(15, 0) && __ANDROID_API__ < 21
-// NOTE: The && is correct, SYS_GETTID is present in API 16 in r15 onwards
-# ifdef ACE_HAS_GETTID
-# undef ACE_HAS_GETTID
-# endif
-#endif
-
-// NDK has telldir() and seekdir() by 15c
-#if ACE_ANDROID_NDK_LESS_THAN(15, 2) || __ANDROID_API__ < 23
-# define ACE_LACKS_TELLDIR
-# define ACE_LACKS_SEEKDIR
-#endif
-
-// strbuf was added by r16
-#if ACE_ANDROID_NDK_LESS_THAN(16, 0)
-# ifdef ACE_HAS_STRBUF_T
-# undef ACE_HAS_STRBUF_T
-# endif
-#endif
-
-// fd_mask was added in r17c
-#if ACE_ANDROID_NDK_LESS_THAN(17, 2)
-# define ACE_LACKS_FD_MASK
-#endif
-
-#if __ANDROID_API__ < 21
# define ACE_LACKS_RAND_R
# define ACE_LACKS_WCSTOLL
# define ACE_LACKS_WCSTOULL
@@ -121,13 +62,16 @@
# ifdef ACE_HAS_EVENT_POLL
# undef ACE_HAS_EVENT_POLL
# endif
+#else
+# define ACE_HAS_SEMUN
#endif
-#if ACE_ANDROID_NDK_LESS_THAN(15, 0)
-# define ACE_LACKS_STRUCT_IF_NAMEINDEX
+#if __ANDROID_API__ < 23
+# define ACE_LACKS_TELLDIR
+# define ACE_LACKS_SEEKDIR
#endif
-#if ACE_ANDROID_NDK_LESS_THAN(15, 0) || __ANDROID_API__ < 24
+#if __ANDROID_API__ < 24
# define ACE_LACKS_IF_NAMEINDEX
#endif
@@ -137,9 +81,9 @@
# define ACE_LACKS_ENDHOSTENT
#endif
-#if !defined(ACE_HAS_GLIBC_2_2_3) && (ACE_ANDROID_NDK_AT_LEAST(15, 0) || __ANDROID_API__ >= 21)
-# define ACE_HAS_CPU_SET_T
-#endif
+#define ACE_HAS_UCONTEXT_T
+#define ACE_HAS_CLOCK_SETTIME
+#define ACE_HAS_CPU_SET_T
// system errorno is a volatile int
#define ACE_HAS_VOLATILE_ERRNO
diff --git a/ACE/ace/config-kfreebsd.h b/ACE/ace/config-kfreebsd.h
index 1c043cf0cf5..20aea58c9a0 100644
--- a/ACE/ace/config-kfreebsd.h
+++ b/ACE/ace/config-kfreebsd.h
@@ -403,33 +403,6 @@
/* Compile using multi-thread libraries */
#define ACE_MT_SAFE 1
-/* Size of the native "double" type */
-#define ACE_SIZEOF_DOUBLE 8
-
-/* Size of the native "float" type */
-#define ACE_SIZEOF_FLOAT 4
-
-/* Size of the native "int" type */
-#define ACE_SIZEOF_INT 4
-
-/* Size of the native "long" type */
-#define ACE_SIZEOF_LONG 4
-
-/* Size of the native "long double" type */
-#define ACE_SIZEOF_LONG_DOUBLE 12
-
-/* Size of the native "long long" type */
-#define ACE_SIZEOF_LONG_LONG 8
-
-/* Size of the native "short" type */
-#define ACE_SIZEOF_SHORT 2
-
-/* Size of the native "pointer to void" type */
-#define ACE_SIZEOF_VOID_P 4
-
-/* Size of the native "wchar_t" type */
-#define ACE_SIZEOF_WCHAR 4
-
/* Enable IPv6 support on platforms that don't have IPv6 turned on by default
*/
#define ACE_USES_IPV4_IPV6_MIGRATION 1
@@ -437,126 +410,6 @@
/* Platform has its standard C++ library in the namespace std. */
#define ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB 1
-/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
- */
-#define HAVE_DIRENT_H 1
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#define HAVE_DLFCN_H 1
-
-/* Define to 1 if you have the <fstream> header file. */
-#define HAVE_FSTREAM 1
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#define HAVE_INTTYPES_H 1
-
-/* Define to 1 if you have the <iomanip> header file. */
-#define HAVE_IOMANIP 1
-
-/* Define to 1 if you have the <ios> header file. */
-#define HAVE_IOS 1
-
-/* Define to 1 if you have the <iostream> header file. */
-#define HAVE_IOSTREAM 1
-
-/* Define to 1 if you have the <iostream.h> header file. */
-/* #undef HAVE_IOSTREAM_H */
-
-/* Define to 1 if you have the <istream> header file. */
-#define HAVE_ISTREAM 1
-
-/* Define to 1 if you have the <memory.h> header file. */
-#define HAVE_MEMORY_H 1
-
-/* Define to 1 if you have the <ostream> header file. */
-#define HAVE_OSTREAM 1
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#define HAVE_STDINT_H 1
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H 1
-
-/* Define to 1 if you have the <streambuf> header file. */
-#define HAVE_STREAMBUF 1
-
-/* Define to 1 if you have the `strftime' function. */
-#define HAVE_STRFTIME 1
-
-/* Define to 1 if you have the <strings.h> header file. */
-#define HAVE_STRINGS_H 1
-
-/* Define to 1 if you have the <string.h> header file. */
-#define HAVE_STRING_H 1
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#define HAVE_SYS_STAT_H 1
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#define HAVE_SYS_TYPES_H 1
-
-/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
-#define HAVE_SYS_WAIT_H 1
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#define HAVE_UNISTD_H 1
-
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
- */
-#define LT_OBJDIR ".libs/"
-
-/* Define to the address where bug reports for this package should be sent. */
-#define PACKAGE_BUGREPORT "ace-bugs@list.isis.vanderbilt.edu"
-
-/* Define to the full name of this package. */
-#define PACKAGE_NAME "ACE"
-
-/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "ACE 5.6.3"
-
-/* Define to the one symbol short name of this package. */
-#define PACKAGE_TARNAME "ace"
-
-/* Define to the home page for this package. */
-#define PACKAGE_URL ""
-
-/* Define to the version of this package. */
-#define PACKAGE_VERSION "5.6.3"
-
-/* The size of `double', as computed by sizeof. */
-#define SIZEOF_DOUBLE 8
-
-/* The size of `float', as computed by sizeof. */
-#define SIZEOF_FLOAT 4
-
-/* The size of `int', as computed by sizeof. */
-#define SIZEOF_INT 4
-
-/* The size of `long', as computed by sizeof. */
-#define SIZEOF_LONG 4
-
-/* The size of `long double', as computed by sizeof. */
-#define SIZEOF_LONG_DOUBLE 12
-
-/* The size of `long long', as computed by sizeof. */
-#define SIZEOF_LONG_LONG 8
-
-/* The size of `short', as computed by sizeof. */
-#define SIZEOF_SHORT 2
-
-/* The size of `signed char', as computed by sizeof. */
-#define SIZEOF_SIGNED_CHAR 1
-
-/* The size of `void *', as computed by sizeof. */
-#define SIZEOF_VOID_P 4
-
-/* The size of `wchar_t', as computed by sizeof. */
-#define SIZEOF_WCHAR_T 4
-
-/* Define to 1 if you have the ANSI C header files. */
-#define STDC_HEADERS 1
-
-
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
#if defined AC_APPLE_UNIVERSAL_BUILD
diff --git a/ACE/ace/config-win32-msvc-14.h b/ACE/ace/config-win32-msvc-14.h
index 5815263e7f5..a18c62f7eda 100644
--- a/ACE/ace/config-win32-msvc-14.h
+++ b/ACE/ace/config-win32-msvc-14.h
@@ -41,7 +41,6 @@
#endif
#define ACE_HAS_ITOA
-#define ACE_HAS_HEADER_ALLOCATED_CLASS_STATIC_CONST_INT_STOREAGE
#define ACE_ITOA_EQUIVALENT ::_itoa
#define ACE_STRCASECMP_EQUIVALENT ::_stricmp
diff --git a/ACE/bin/MakeProjectCreator/config/acedefaults.mpb b/ACE/bin/MakeProjectCreator/config/acedefaults.mpb
index ab81e499e20..1da54d702f4 100644
--- a/ACE/bin/MakeProjectCreator/config/acedefaults.mpb
+++ b/ACE/bin/MakeProjectCreator/config/acedefaults.mpb
@@ -24,6 +24,10 @@ project: ipv6, vc_warnings, build_files, test_files, svc_conf_files, ace_unicode
release::macros += ACE_NDEBUG ACE_USE_RCSID=0
}
+ // Link To Android Logging Library for Log_Msg_Android_Logcat
+ specific(gnuace) {
+ linkflags += $(if $(android_abi),-llog)
+ }
}
feature(ace_inline) {
diff --git a/ACE/include/makeinclude/platform_android.GNU b/ACE/include/makeinclude/platform_android.GNU
index fd3525162b2..0ca79c47a28 100644
--- a/ACE/include/makeinclude/platform_android.GNU
+++ b/ACE/include/makeinclude/platform_android.GNU
@@ -2,6 +2,9 @@
# This file allows ACE and applications using ACE GNU Makefiles to be built for
# Android by cross compiling on Linux.
+#
+# See here for latest documentation on how to invoke the NDK:
+# https://android.googlesource.com/platform/ndk/+/master/docs/BuildSystemMaintainers.md
# We always include config-android.h on Android platforms.
ACE_PLATFORM_CONFIG ?= config-android.h
@@ -12,155 +15,122 @@ include $(ACE_ROOT)/include/makeinclude/platform_linux_common.GNU
# as of NDK r6 inlining is required
inline ?= 1
-# as of API level 16 executables can be linked as Position Independent Executables
-# as of API level 21 PIE is mandatory
-PIE ?= -pie
-
#No rwho on Android
rwho = 0
-# Android Studio does not seem to recognize so files with versions
-versioned_so ?= 0
-
-# Only try to use clang, unless this is set to 0, then try to use g++
-android_force_clang ?= 1
+# Android Studio does not seem to recognize so files with versions, but if
+# trying to add gnuace-built libraries as imported libraries in CMake in a
+# Android Studio project, at runtime apparently the Android loader needs the
+# SONAME be set to the filename or else it was fail trying to load the so file
+# path from the host computer.
+versioned_so = 3
# This section deals with selecting the architecture/compiler
# As of writing information on ABIs can be found at https://developer.android.com/ndk/guides/abis
-ifndef ANDROID_ABI
- ifdef ANDROID_ARCH # Handle Possiblity of ANDROID_ARCH being passed
- ifeq ($(ANDROID_ARCH),arm)
- ANDROID_ABI := armeabi-v7a
- else
- ANDROID_ABI := $(ANDROID_ARCH)
- endif
- else # Else default to ARMv7
- ANDROID_ABI := armeabi-v7a
+# Make sure android_abi or ANDROID_ABI are defined and they are the same.
+ifndef android_abi
+ ifdef ANDROID_ABI
+ android_abi := $(ANDROID_ABI)
+ else
+ $(error android_abi or ANDROID_ABI must be defined)
endif
+else
+ ANDROID_ABI := $(android_abi)
endif
# Alias neon
-ifeq ($(ANDROID_ABI), neon)
- ANDROID_ABI := armeabi-v7a-with-neon
+ifeq ($(android_abi), neon)
+ android_abi := armeabi-v7a-with-neon
endif
-android_neon ?= 0
-ifeq ($(ANDROID_ABI),armeabi-v7a-with-neon)
- ANDROID_ABI := armeabi-v7a
+android_neon ?= 1
+ifeq ($(android_abi),armeabi-v7a-with-neon)
+ android_abi := armeabi-v7a
android_neon := 1
endif
-# NDK says -Wl,--fix-cortex-a8 is required for working around a CPU bug
-# in some Cortex-A8 implementations
-
-ifeq ($(ANDROID_ABI),armeabi-v7a)
- CROSS_COMPILE := arm-linux-androideabi-
- FLAGS_C_CC += -march=armv7-a -mfloat-abi=softfp
+ifeq ($(android_abi),armeabi-v7a)
+ CROSS_COMPILE := armv7a-linux-androideabi
ifeq ($(android_neon),1)
FLAGS_C_CC += -mfpu=neon
else
FLAGS_C_CC += -mfpu=vfpv3-d16
endif
- LDFLAGS += -march=armv7-a -Wl,--fix-cortex-a8
-endif
-ifeq ($(ANDROID_ABI),arm64-v8a)
- CROSS_COMPILE := aarch64-linux-android-
- FLAGS_C_CC += -march=armv8-a
- LDFLAGS += -march=armv8-a
-endif
+else ifeq ($(android_abi),arm64-v8a)
+ CROSS_COMPILE := aarch64-linux-android
-ifeq ($(ANDROID_ABI),x86)
- CROSS_COMPILE := i686-linux-android-
-endif
+else ifeq ($(android_abi),x86)
+ CROSS_COMPILE := i686-linux-android
-ifeq ($(ANDROID_ABI),x86_64)
- CROSS_COMPILE := x86_64-linux-android-
+else ifeq ($(android_abi),x86_64)
+ CROSS_COMPILE := x86_64-linux-android
endif
ifndef CROSS_COMPILE
- $(error ANDROID_ABI passed (set to: $(ANDROID_ABI)) is not valid)
+ $(error android_abi $(android_abi) is not valid)
endif
-# Export so child processes can use tools from the same toolchain.
-export CROSS_COMPILE
-
-ifeq ($(android_force_clang),0)
- # Determine if the g++ compiler is GCC or Clang.
- # There are at least 3 assumptions being made here:
- # - There is a g++ command to get the version from
- # - Clang will have "clang" in the version string
- # - If g++ is actually clang, then we can replace that with clang++
- gplusplus_version = $(shell $(CROSS_COMPILE)g++$(CROSS_COMPILE_SUFFIX) --version)
- actually_is_clang := $(strip $(findstring clang,$(gplusplus_version)))
-else
- ifeq ($(android_force_clang),1)
- actually_is_clang := 1
- else
- $(error Invalid value for android_force_clang: $(android_force_clang))
+ifdef android_ndk
+ ifndef android_api
+ $(error android_ndk also requires defining android_api)
endif
-endif
-FLAGS_C_CC += -W -Wall -Wpointer-arith
-ifeq ($(threads),1)
- CPPFLAGS += -D_REENTRANT $(PLATFORM_AIO_SUPPORT)
-endif # threads
-
-# Use -pipes by default
-pipes ?= 1
+ android_ndk_tools ?= $(wildcard $(android_ndk)/toolchains/llvm/prebuilt/*/bin)
+ ifndef android_ndk_tool_prefix
+ android_ndk_tool_prefix := $(CROSS_COMPILE)$(android_api)-
+ endif
-# DT_RUNPATH is preferred over DT_RPATH, but the linker will only use it when
-# this extra flag option (enable-new-dtags) is present
-LD_RPATH_FLAGS += -Wl,--enable-new-dtags
-
-# Rely on _GNU_SOURCE to set these defaults defined in /usr/include/features.h
-# instead of setting them directly here (older versions of gcc don't set it
-# for you): _SVID_SOURCE _BSD_SOURCE _POSIX_SOURCE _POSIX_C_SOURCE=199506L, ...
-CPPFLAGS += -D_GNU_SOURCE
-
-DCFLAGS += -ggdb
-DCCFLAGS += -ggdb
-DLD = $(CXX)
-LD = $(CXX) $(PIE)
-
-ifndef actually_is_clang
- # make sure to add the required libs for RTTI and exceptions (libsupc++)
- # and a shared STL lib (libgnustl_shared by default)
- static_libs_only ?=
- ANDROID_STL_DLL ?= gnustl_shared
- LIBS += -ldl -lsupc++
- ifneq ($(static_libs_only),1)
- LIBS += -l$(ANDROID_STL_DLL)
+ # We don't want this being used again except to signal that this is a
+ # cross-compile build. If it is then the resulting command probably won't
+ # exist and cause an error.
+ CROSS_COMPILE := THIS_VALUE_SHOULD_NOT_BE_USED
+
+ # Ignore value of CROSS_COMPILE because ar doesn't match clang like in
+ # platform_clang_common.GNU.
+ override_cross_compile = 1
+ CC = $(android_ndk_tools)/$(android_ndk_tool_prefix)clang
+ CXX = $(android_ndk_tools)/$(android_ndk_tool_prefix)clang++
+ AR = $(android_ndk_tools)/llvm-ar
+
+else # Standalone Toolchain
+ CROSS_COMPILE := $(CROSS_COMPILE)-
+
+ ifeq ($(android_abi),armeabi-v7a)
+ # According to Google the armv7a-linux-androideabi- prefix should be
+ # preferred because it produces more efficient code. However if it doesn't
+ # exist since we're using an older NDK we have to fallback to
+ # arm-linux-androideabi-. This isn't a problem when directly using the NDK
+ # because the NDKs we support for that have armv7a-* clangs.
+ ifeq (,$(shell command -v $(CROSS_COMPILE)clang $(ACE_NUL_STDERR)))
+ CROSS_COMPILE := arm-linux-androideabi-
+ endif
endif
-endif
-ifeq ($(optimize),1)
- SOFLAGS += -Wl,-O3
+ # Export so child processes can use tools from the same toolchain.
+ export CROSS_COMPILE
endif
-SOFLAGS += $(CPPFLAGS) -shared
-SOBUILD = $(COMPILE.cc) $(PIC) -o $(VSHDIR)$*.so $<; \
- $(SOLINK.cc) -o $@ $(LDFLAGS) $(VSHDIR)$*.o
-PRELIB = @true
-
-ifdef actually_is_clang
- include $(ACE_ROOT)/include/makeinclude/platform_clang_common.GNU
-else
- include $(ACE_ROOT)/include/makeinclude/platform_g++_common.GNU
-endif
+ifeq ($(threads),1)
+ CPPFLAGS += -D_REENTRANT
+ ifdef PLATFORM_AIO_SUPPORT
+ CPPFLAGS += $(PLATFORM_AIO_SUPPORT)
+ endif
+endif # threads
-ifeq ($(shell echo '\#include "android/ndk-version.h"' | $(CXX) -E - > /dev/null 2>&1; echo $$?), 0)
- CPPFLAGS += -DACE_ANDROID_NDK_HAS_NDK_VERSION_H
-endif
+# Use -pipes by default
+pipes ?= 1
-ifdef __NDK_MAJOR__
- CPPFLAGS += -D__NDK_MAJOR__=$(__NDK_MAJOR__)
+# Use LLD, the LLVM linker as recommended by Google
+android_set_lld ?= 1
+ifeq ($(android_set_lld),1)
+ # The other two arguments are explained by
+ # https://android.googlesource.com/platform/ndk/+/master/docs/BuildSystemMaintainers.md#additional-required-arguments
+ LDFLAGS += -fuse-ld=lld -Wl,--build-id=sha1 -Wl,--no-rosegment
endif
-ifdef __NDK_MINOR__
- CPPFLAGS += -D__NDK_MINOR__=$(__NDK_MINOR__)
-endif
+include $(ACE_ROOT)/include/makeinclude/platform_clang_common.GNU
OCFLAGS ?= -O3
OCCFLAGS ?= -O3
@@ -175,14 +145,11 @@ ifeq ($(ssl),1)
PLATFORM_SSL_LDFLAGS += --exclude-libs libcrypto.a,libssl.a
endif
-# Link To Android Logging Library for Log_Msg_Android_Logcat
-LIBS += -llog
-
# link step to avoid 'command line too long' error on Windows
ifeq ($(OS), Windows_NT)
SHOBJS_FILE = $(VSHDIR)$(MAKEFILE)_object_list.tmp
CLEANUP_OBJS += $(SHOBJS_FILE)
- define SHLIBBUILD
+ define SHLIBBUILD
$(file >$(SHOBJS_FILE), $^)
$(SHR_FILTER) $(SOLINK.cc) $(SO_OUTPUT_FLAG) $@ @$(SHOBJS_FILE) $(LDFLAGS) $(ACE_SHLIBS) $(LIBS)
endef
diff --git a/ACE/include/makeinclude/platform_clang_common.GNU b/ACE/include/makeinclude/platform_clang_common.GNU
index b89b32297cf..b9c77141d68 100644
--- a/ACE/include/makeinclude/platform_clang_common.GNU
+++ b/ACE/include/makeinclude/platform_clang_common.GNU
@@ -6,9 +6,12 @@ CCFLAGS += -fdelayed-template-parsing
ifneq ($(CROSS_COMPILE),)
CROSS-COMPILE = 1
# Build using the cross-tools
- CC = ${CROSS_COMPILE}clang${CROSS_COMPILE_SUFFIX}
- CXX = ${CROSS_COMPILE}clang++${CROSS_COMPILE_SUFFIX}
- AR = ${CROSS_COMPILE}ar${CROSS_COMPILE_SUFFIX}
+ override_cross_compile ?= 0
+ ifeq ($(override_cross_compile),0)
+ CC = ${CROSS_COMPILE}clang${CROSS_COMPILE_SUFFIX}
+ CXX = ${CROSS_COMPILE}clang++${CROSS_COMPILE_SUFFIX}
+ AR = ${CROSS_COMPILE}ar${CROSS_COMPILE_SUFFIX}
+ endif
# Cross-linker requires this for linked in shared libs that depend
# themselves on other shared libs (not directly linked in)
LDFLAGS += -Wl,-rpath-link,$(ACE_ROOT)/lib
@@ -20,17 +23,12 @@ ifneq ($(CROSS_COMPILE),)
TAO_IDL3_TO_IDL2_DEP = $(TAO_IDL3_TO_IDL2)
TAO_IDL3_TO_XMI = $(HOST_ROOT)/bin/tao_idl3_to_xmi
TAO_IDL3_TO_XMI_DEP = $(TAO_IDL3_TO_XMI)
- # make sure to use the target compiler, not the cross-compiler
+ # make sure to use the host compiler, not the cross-compiler
# as preprocessor for the cross-compiled idl tools
TAO_IDL_PREPROCESSOR = clang
endif
endif
-ifeq ($(openmp),1)
-FLAGS_C_CC += -fopenmp
-LDFLAGS += -fopenmp
-endif
-
ifeq ($(CXX),insure)
# insure does not pass through the -dumpversion option.
CXX_FOR_VERSION_TEST ?= g++
@@ -40,32 +38,7 @@ endif
CXX_VERSION := $(shell $(CXX_FOR_VERSION_TEST) -dumpversion)
-# If no option has been specified, set templates to automatic
-# version of the compiler.
-#
-templates ?= automatic
-
-# The correct flags to pass to the linker for ELF dynamic shared library
-# versioning.
-# If the platform file didn't already set versioned_so, default to 1.
-versioned_so ?= 1
-with_ld ?=
-ifeq ($(versioned_so),1)
- ifeq ($(with_ld),hpux)
- SOFLAGS += -Wl,+h -Wl,$(SONAME)
- else
- ifeq ($(with_ld),aix)
- # What to do here???
- else
- SOFLAGS += -Wl,-h -Wl,$(SONAME)
- endif
- endif
-endif
-
-static_libs_only ?=
-
CXX_FULL_VERSION := $(shell $(CXX_FOR_VERSION_TEST) --version)
-gcc_template_instantiation_visibility ?= 0
# Only modify LDFLAGS if DLD has been set.
ifneq ($(DLD),)
@@ -86,54 +59,5 @@ ifeq ($(no_strict_aliasing), 1)
CCFLAGS += -fno-strict-aliasing
endif
-ifeq ($(c++11),1)
- CCFLAGS += -std=c++11
-endif # c++11
-
-ifeq ($(shared_libs), 1)
- ifneq ($(static_libs_only), 1)
- # Add all symbols to the dynamic symbol table. Needed to enable
- # dynamic_cast<> for shared libraries. (see
- # http://gcc.gnu.org/faq.html#dso)
-
- ifeq ($(GNU_LD),1)
- # Make sure this version of ld supports the -E option.
- ifneq ($(mingw32),1)
- LD_EXPORT_DEFINED := $(shell sh -c '$(LD_FOR_VERSION_TEST) -E 2>&1 | egrep -i "(option|flag)" /dev/null; echo $$?')
- else
- LD_EXPORT_DEFINED := $(shell $(LD_FOR_VERSION_TEST) -E 2>&1 | grep -c -i -e '(option|flag)')
- ifeq ($(LD_EXPORT_DEFINED),0)
- LD_EXPORT_DEFINED:=1
- else
- LD_EXPORT_DEFINED:=0
- endif
- endif # mingw32
- ifeq ($(LD_EXPORT_DEFINED),1)
- LDFLAGS += -Wl,-E
- endif # LD_EXPORT_DEFINED = 1
- endif # GNU ld
-
- # Take advantage of G++ (>= 4.x) visibility attributes to generate
- # improved shared library binaries.
- ifneq ($(no_hidden_visibility),1)
- CCFLAGS += -fvisibility=hidden -fvisibility-inlines-hidden
- ifeq ($(gcc_template_instantiation_visibility),1)
- CCFLAGS += -DACE_GCC_HAS_TEMPLATE_INSTANTIATION_VISIBILITY_ATTRS=1
- endif # gcc_template_instantiation_visibility
- else
- CPPFLAGS += -DACE_HAS_CUSTOM_EXPORT_MACROS=0
- endif # no_hidden_visibility
- else
- # Explicitly disable G++ (>= 4.x) visibility attributes since
- # they are only meant for use when building shared libraries.
- no_hidden_visibility = 1
- CPPFLAGS += -DACE_HAS_CUSTOM_EXPORT_MACROS=0
- endif # static_libs_only
-else
- # Explicitly disable G++ (>= 4.x) visibility attributes since
- # they are only meant for use when building shared libraries.
- no_hidden_visibility = 1
- CPPFLAGS += -DACE_HAS_CUSTOM_EXPORT_MACROS=0
-endif # shared_libs
-
-FLAGS_C_CC += -W -Wall
+# Things Clang has in common with GCC
+include $(ACE_ROOT)/include/makeinclude/platform_gcc_clang_common.GNU
diff --git a/ACE/include/makeinclude/platform_g++_common.GNU b/ACE/include/makeinclude/platform_g++_common.GNU
index 6afda33beab..3401d2f35c6 100644
--- a/ACE/include/makeinclude/platform_g++_common.GNU
+++ b/ACE/include/makeinclude/platform_g++_common.GNU
@@ -1,10 +1,5 @@
# -*- Makefile -*-
-ifeq ($(openmp),1)
-FLAGS_C_CC += -fopenmp
-LDFLAGS += -fopenmp
-endif
-
ifeq ($(insure),1)
CC = insure
CXX = insure
@@ -26,7 +21,7 @@ else
TAO_IDL3_TO_IDL2_DEP = $(TAO_IDL3_TO_IDL2)
TAO_IDL3_TO_XMI = $(HOST_ROOT)/bin/tao_idl3_to_xmi
TAO_IDL3_TO_XMI_DEP = $(TAO_IDL3_TO_XMI)
- # make sure to use the target compiler, not the cross-compiler
+ # make sure to use the host compiler, not the cross-compiler
# as preprocessor for the cross-compiled idl tools
TAO_IDL_PREPROCESSOR = gcc
endif
@@ -86,52 +81,7 @@ ifeq ($(findstring $(CXX_MAJOR_VERSION),4),$(CXX_MAJOR_VERSION))
c++11 ?= 1
endif
-ifeq ($(c++20),1)
- CCFLAGS += -std=c++20
-else
- ifeq ($(c++17),1)
- CCFLAGS += -std=c++17
- else
- ifeq ($(c++14),1)
- CCFLAGS += -std=c++14
- else
- ifeq ($(c++11),1)
- CCFLAGS += -std=c++11
- endif # c++11
- endif # c++14
- endif #c++17
-endif #c++20
-
-# If no option has been specified, set templates to automatic
-# version of the compiler.
-#
-templates ?= automatic
-
-# The correct flags to pass to the linker for ELF dynamic shared library
-# versioning.
-# If the platform file didn't already set versioned_so, default to 1.
-versioned_so ?= 1
-with_ld ?=
-ifneq ($(versioned_so),0)
- ifeq ($(with_ld),hpux)
- SOFLAGS += -Wl,+h -Wl,$(SONAME)
- else
- ifeq ($(with_ld),aix)
- # What to do here???
- else
- SOFLAGS += -Wl,-h -Wl,$(SONAME)
- endif
- endif
-endif
-
-ifeq ($(versioned_so),2)
- FLAGS_C_CC += -DACE_VERSIONED_SO=2
-endif
-
-static_libs_only ?=
-
CXX_FULL_VERSION := $(shell $(CXX_FOR_VERSION_TEST) --version)
-gcc_template_instantiation_visibility ?= 0
# Only modify LDFLAGS if DLD has been set.
ifneq ($(DLD),)
@@ -148,10 +98,6 @@ ifneq ($(DLD),)
endif # mingw32
endif # DLD
-ifeq ($(GNU_LD),1)
- STATIC_LINK_FLAG ?= -static
-endif # GNU_LD
-
ifeq ($(no-optimize-sibling-calls), 1)
FLAGS_C_CC += -fno-optimize-sibling-calls
endif
@@ -170,52 +116,6 @@ else
endif
endif
-ifeq ($(shared_libs), 1)
- ifneq ($(static_libs_only), 1)
- # Add all symbols to the dynamic symbol table. Needed to enable
- # dynamic_cast<> for shared libraries. (see
- # http://gcc.gnu.org/faq.html#dso)
-
- ifeq ($(GNU_LD),1)
- # Make sure this version of ld supports the -E option.
- ifneq ($(mingw32),1)
- LD_EXPORT_DEFINED := $(shell sh -c '$(LD_FOR_VERSION_TEST) -E 2>&1 | egrep -i "(option|flag)" /dev/null; echo $$?')
- else
- LD_EXPORT_DEFINED := $(shell $(LD_FOR_VERSION_TEST) -E 2>&1 | grep -c -i -e '(option|flag)')
- ifeq ($(LD_EXPORT_DEFINED),0)
- LD_EXPORT_DEFINED:=1
- else
- LD_EXPORT_DEFINED:=0
- endif
- endif # mingw32
- ifeq ($(LD_EXPORT_DEFINED),1)
- LDFLAGS += -Wl,-E
- endif # LD_EXPORT_DEFINED = 1
- endif # GNU ld
-
- # Take advantage of g++ visibility attributes to generate
- # improved shared library binaries.
- ifneq ($(no_hidden_visibility),1)
- CCFLAGS += -fvisibility=hidden -fvisibility-inlines-hidden
- ifeq ($(gcc_template_instantiation_visibility),1)
- CCFLAGS += -DACE_GCC_HAS_TEMPLATE_INSTANTIATION_VISIBILITY_ATTRS=1
- endif # gcc_template_instantiation_visibility
- else
- CPPFLAGS += -DACE_HAS_CUSTOM_EXPORT_MACROS=0
- endif # no_hidden_visibility
- else
- # Explicitly disable g++ visibility attributes since
- # they are only meant for use when building shared libraries.
- no_hidden_visibility = 1
- CPPFLAGS += -DACE_HAS_CUSTOM_EXPORT_MACROS=0
- endif # static_libs_only
-else
- # Explicitly disable g++ visibility attributes since
- # they are only meant for use when building shared libraries.
- no_hidden_visibility = 1
- CPPFLAGS += -DACE_HAS_CUSTOM_EXPORT_MACROS=0
-endif # shared_libs
-
minimaltoc ?= 0
ifeq ($(minimaltoc),1)
FLAGS_C_CC += -mminimal-toc
@@ -235,5 +135,5 @@ endif
pipes ?= 1
-FLAGS_C_CC += -Wall -W -Wpointer-arith
-CCFLAGS += -Wnon-virtual-dtor
+# Things GCC has in common with Clang
+include $(ACE_ROOT)/include/makeinclude/platform_gcc_clang_common.GNU
diff --git a/ACE/include/makeinclude/platform_gcc_clang_common.GNU b/ACE/include/makeinclude/platform_gcc_clang_common.GNU
new file mode 100644
index 00000000000..ac70c620b61
--- /dev/null
+++ b/ACE/include/makeinclude/platform_gcc_clang_common.GNU
@@ -0,0 +1,107 @@
+# Shared Logic for GCC and Clang
+
+FLAGS_C_CC += -Wall -Wextra -Wpointer-arith
+CCFLAGS += -Wnon-virtual-dtor
+
+# Suppress "Creating *.a" Message
+ARFLAGS += -c
+
+gcc_template_instantiation_visibility ?= 0
+ifeq ($(shared_libs), 1)
+ ifneq ($(static_libs_only), 1)
+ # Add all symbols to the dynamic symbol table. Needed to enable
+ # dynamic_cast<> for shared libraries. (see
+ # http://gcc.gnu.org/faq.html#dso)
+
+ ifeq ($(GNU_LD),1)
+ # Make sure this version of ld supports the -E option.
+ ifneq ($(mingw32),1)
+ LD_EXPORT_DEFINED := $(shell sh -c '$(LD_FOR_VERSION_TEST) -E 2>&1 | egrep -i "(option|flag)" /dev/null; echo $$?')
+ else
+ LD_EXPORT_DEFINED := $(shell $(LD_FOR_VERSION_TEST) -E 2>&1 | grep -c -i -e '(option|flag)')
+ ifeq ($(LD_EXPORT_DEFINED),0)
+ LD_EXPORT_DEFINED:=1
+ else
+ LD_EXPORT_DEFINED:=0
+ endif
+ endif # mingw32
+ ifeq ($(LD_EXPORT_DEFINED),1)
+ LDFLAGS += -Wl,-E
+ endif # LD_EXPORT_DEFINED = 1
+ endif # GNU ld
+
+ # Take advantage of g++ visibility attributes to generate
+ # improved shared library binaries.
+ ifneq ($(no_hidden_visibility),1)
+ CCFLAGS += -fvisibility=hidden -fvisibility-inlines-hidden
+ ifeq ($(gcc_template_instantiation_visibility),1)
+ CCFLAGS += -DACE_GCC_HAS_TEMPLATE_INSTANTIATION_VISIBILITY_ATTRS=1
+ endif # gcc_template_instantiation_visibility
+ else
+ CPPFLAGS += -DACE_HAS_CUSTOM_EXPORT_MACROS=0
+ endif # no_hidden_visibility
+ else
+ # Explicitly disable g++ visibility attributes since
+ # they are only meant for use when building shared libraries.
+ no_hidden_visibility = 1
+ CPPFLAGS += -DACE_HAS_CUSTOM_EXPORT_MACROS=0
+ endif # static_libs_only
+else
+ # Explicitly disable g++ visibility attributes since
+ # they are only meant for use when building shared libraries.
+ no_hidden_visibility = 1
+ CPPFLAGS += -DACE_HAS_CUSTOM_EXPORT_MACROS=0
+endif # shared_libs
+
+ifeq ($(c++20),1)
+ CCFLAGS += -std=c++20
+else
+ ifeq ($(c++17),1)
+ CCFLAGS += -std=c++17
+ else
+ ifeq ($(c++14),1)
+ CCFLAGS += -std=c++14
+ else
+ ifeq ($(c++11),1)
+ CCFLAGS += -std=c++11
+ endif # c++11
+ endif # c++14
+ endif #c++17
+endif #c++20
+
+# If no option has been specified, set templates to automatic
+# version of the compiler.
+#
+templates ?= automatic
+
+# The correct flags to pass to the linker for ELF dynamic shared library
+# versioning.
+# If the platform file didn't already set versioned_so, default to 1.
+versioned_so ?= 1
+with_ld ?=
+ifneq ($(versioned_so),0)
+ ifeq ($(with_ld),hpux)
+ SOFLAGS += -Wl,+h -Wl,$(SONAME)
+ else
+ ifeq ($(with_ld),aix)
+ # What to do here???
+ else
+ SOFLAGS += -Wl,-h -Wl,$(SONAME)
+ endif
+ endif
+endif
+
+ifeq ($(versioned_so),2)
+ FLAGS_C_CC += -DACE_VERSIONED_SO=2
+endif
+
+static_libs_only ?=
+
+ifeq ($(GNU_LD),1)
+ STATIC_LINK_FLAG ?= -static
+endif # GNU_LD
+
+ifeq ($(openmp),1)
+ FLAGS_C_CC += -fopenmp
+ LDFLAGS += -fopenmp
+endif
diff --git a/ACE/include/makeinclude/platform_linux.GNU b/ACE/include/makeinclude/platform_linux.GNU
index 52d4a5bfc54..850bab81bed 100644
--- a/ACE/include/makeinclude/platform_linux.GNU
+++ b/ACE/include/makeinclude/platform_linux.GNU
@@ -43,20 +43,6 @@ ifeq ($(buildbits),64)
LDFLAGS += -m64
endif
-# DT_RUNPATH is preferred over DT_RPATH, but the linker will only use it when
-# this extra flag option (enable-new-dtags) is present
-LD_RPATH_FLAGS += -Wl,--enable-new-dtags
-
-# Rely on _GNU_SOURCE to set these defaults defined in /usr/include/features.h
-# instead of setting them directly here (older versions of gcc don't set it
-# for you): _SVID_SOURCE _BSD_SOURCE _POSIX_SOURCE _POSIX_C_SOURCE=199506L, ...
-CPPFLAGS += -D_GNU_SOURCE
-
-DCFLAGS += -ggdb
-DCCFLAGS += -ggdb
-DLD = $(CXX)
-LD = $(CXX)
-
ifeq ($(dynamic_loader),0)
CPPFLAGS += -DACE_HAS_DYNAMIC_LINKING=0
else
@@ -69,19 +55,10 @@ ifeq ($(threads),1)
LIBS += -lrt
endif
-ifeq ($(optimize),1)
- SOFLAGS += -Wl,-O3
-endif
-
ifeq ($(static_stdlibs),1)
LDFLAGS += -static-libgcc -static-libstdc++
endif
-SOFLAGS += -shared
-SOBUILD = $(COMPILE.cc) $(PIC) -o $(VSHDIR)$*.so $<; \
- $(SOLINK.cc) -o $@ $(LDFLAGS) $(VSHDIR)$*.o
-PRELIB = @true
-
# Test for template instantiation, add to SOFLAGS if SONAME set,
# add -E to LDFLAGS if using GNU ld
#
diff --git a/ACE/include/makeinclude/platform_linux_common.GNU b/ACE/include/makeinclude/platform_linux_common.GNU
index 11329332c25..eb5a129c0ba 100644
--- a/ACE/include/makeinclude/platform_linux_common.GNU
+++ b/ACE/include/makeinclude/platform_linux_common.GNU
@@ -129,3 +129,26 @@ ifeq ($(threads),1)
PRELIB = @true
endif # ! PRELIB
endif
+
+# DT_RUNPATH is preferred over DT_RPATH, but the linker will only use it when
+# this extra flag option (enable-new-dtags) is present
+LD_RPATH_FLAGS += -Wl,--enable-new-dtags
+
+# Rely on _GNU_SOURCE to set these defaults defined in /usr/include/features.h
+# instead of setting them directly here (older versions of gcc don't set it
+# for you): _SVID_SOURCE _BSD_SOURCE _POSIX_SOURCE _POSIX_C_SOURCE=199506L, ...
+CPPFLAGS += -D_GNU_SOURCE
+
+DCFLAGS += -ggdb
+DCCFLAGS += -ggdb
+DLD = $(CXX)
+LD = $(CXX)
+
+ifeq ($(optimize),1)
+ SOFLAGS += -Wl,-O3
+endif
+
+SOFLAGS += -shared
+SOBUILD = $(COMPILE.cc) $(PIC) -o $(VSHDIR)$*.so $<; \
+ $(SOLINK.cc) -o $@ $(LDFLAGS) $(VSHDIR)$*.o
+PRELIB = @true
diff --git a/ACE/include/makeinclude/rules.lib.GNU b/ACE/include/makeinclude/rules.lib.GNU
index 94868ff0d87..1a84f3d92cd 100644
--- a/ACE/include/makeinclude/rules.lib.GNU
+++ b/ACE/include/makeinclude/rules.lib.GNU
@@ -1,6 +1,6 @@
# -*- Makefile -*-
#----------------------------------------------------------------------------
-#
+#
#
# Build libraries (i.e., contain no binary executables)
# GNU version
@@ -22,12 +22,12 @@ ifneq ($(versioned_so),0)
ifeq ($(SOVERSION),)
ifeq ($(versioned_so),1)
SOVERSION = .$(GNUACE_PROJECT_VERSION)
+ else ifeq ($(versioned_so),2)
+ SOVERSION = -$(GNUACE_PROJECT_VERSION)
+ else ifeq ($(versioned_so),3)
+ # Nothing
else
- ifeq ($(versioned_so),2)
- SOVERSION = -$(GNUACE_PROJECT_VERSION)
- else
- $(error unknown value for versioned_so: $(versioned_so))
- endif
+ $(error unknown value for versioned_so: $(versioned_so))
endif
endif # SOVERSION
@@ -36,10 +36,10 @@ ifneq ($(versioned_so),0)
ifeq ($(SONAME),)
ifeq ($(versioned_so),1)
SONAME = $(SHLIB)$(SOVERSION)
- else
- ifeq ($(versioned_so),2)
- SONAME = $(patsubst %.$(SOEXT),%,$(SHLIB))$(SOVERSION).$(SOEXT)
- endif
+ else ifeq ($(versioned_so),2)
+ SONAME = $(patsubst %.$(SOEXT),%,$(SHLIB))$(SOVERSION).$(SOEXT)
+ else ifeq ($(versioned_so),3)
+ SONAME = $(SHLIB)
endif
endif # SONAME
endif # versioned_so
diff --git a/ACE/include/makeinclude/wrapper_macros.GNU b/ACE/include/makeinclude/wrapper_macros.GNU
index 0966a023d0e..fc5535535dc 100644
--- a/ACE/include/makeinclude/wrapper_macros.GNU
+++ b/ACE/include/makeinclude/wrapper_macros.GNU
@@ -82,6 +82,8 @@
# the version will be appended to the name but *before* the
# $(SOEXT) - it should have a lead '-' - else it defaults to
# -ACE_MAJOR.ACE_MINOR.ACE_MICRO.
+# If versioned_so is 3, then set the SONAME, but without a
+# version.
# wfmo Build with wfmo support (Win32 only)
# winregistry Build with windows registry support (Win32 only)
# winnt Build WinNT-specific projects (Win32 only)
diff --git a/ACE/tests/Semaphore_Test.cpp b/ACE/tests/Semaphore_Test.cpp
index a2f240e4185..1308cb7ecdb 100644
--- a/ACE/tests/Semaphore_Test.cpp
+++ b/ACE/tests/Semaphore_Test.cpp
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#include "test_config.h"
#include "ace/Thread_Semaphore.h"
#include "ace/Thread.h"
@@ -20,8 +19,6 @@
#include "ace/OS_NS_time.h"
#include "ace/OS_NS_unistd.h"
-
-
// msec that times are allowed to differ before test fails.
#if defined (ACE_HAS_HI_RES_TIMER) || defined (ACE_HAS_AIX_HI_RES_TIMER) || \
defined (ACE_HAS_PENTIUM) || defined (ACE_HAS_ALPHA_TIMER) || \
diff --git a/TAO/DevGuideExamples/RTCORBA/README b/TAO/DevGuideExamples/RTCORBA/README
index 732b4100d9c..691e6c30d07 100644
--- a/TAO/DevGuideExamples/RTCORBA/README
+++ b/TAO/DevGuideExamples/RTCORBA/README
@@ -1,5 +1,3 @@
-
-
DevGuideExamples/RTCORBA/README
This directory contains an RTCORBA example illustrating a simple client and
diff --git a/TAO/DevGuideExamples/RTCORBA/common.cpp b/TAO/DevGuideExamples/RTCORBA/common.cpp
index 4f5a17ce962..1446635a6bf 100644
--- a/TAO/DevGuideExamples/RTCORBA/common.cpp
+++ b/TAO/DevGuideExamples/RTCORBA/common.cpp
@@ -3,7 +3,7 @@
CORBA::ULong
get_total_lanes()
{
-#if defined (linux)
+#if defined (ACE_LINUX)
return 1;
#elif defined (ACE_CONFIG_WIN32_H)
return 3;
diff --git a/TAO/TAO_IDL/be/be_visitor_constant/constant_ch.cpp b/TAO/TAO_IDL/be/be_visitor_constant/constant_ch.cpp
index ef25afde9ca..091a149ef13 100644
--- a/TAO/TAO_IDL/be/be_visitor_constant/constant_ch.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_constant/constant_ch.cpp
@@ -109,7 +109,7 @@ be_visitor_constant_ch::visit_constant (be_constant *node)
}
// If this is true, can't generate inline constants.
- bool forbidden_in_class = (snt != AST_Decl::NT_root
+ bool const forbidden_in_class = (snt != AST_Decl::NT_root
&& snt != AST_Decl::NT_module
&& (etype == AST_Expression::EV_string
|| etype == AST_Expression::EV_wstring
diff --git a/TAO/TAO_IDL/be/be_visitor_constant/constant_cs.cpp b/TAO/TAO_IDL/be/be_visitor_constant/constant_cs.cpp
index 1db7973d95f..d8d063c3aa0 100644
--- a/TAO/TAO_IDL/be/be_visitor_constant/constant_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_constant/constant_cs.cpp
@@ -36,12 +36,12 @@ be_visitor_constant_cs::visit_constant (be_constant *node)
&& snt != AST_Decl::NT_module);
if (be_global->gen_inline_constants () && !in_class)
{
- // No storeage is required in the source file for these
+ // No storage is required in the source file for these
return 0;
}
AST_Expression::ExprType etype = node->et ();
- bool forbidden_in_class = (in_class
+ bool const forbidden_in_class = (in_class
&& (etype == AST_Expression::EV_string
|| etype == AST_Expression::EV_wstring
|| etype == AST_Expression::EV_float
@@ -54,13 +54,6 @@ be_visitor_constant_cs::visit_constant (be_constant *node)
<< "// " << __FILE__ << ":" << __LINE__;
*os << be_nl_2;
- if (be_global->gen_inline_constants () && !forbidden_in_class)
- {
- // Some compilers (especially Microsoft) always define storage
- // when the initialiser is given, therefore the header has already
- // done this (which is non-C++ complient by the way).
- *os << "#ifndef ACE_HAS_HEADER_ALLOCATED_CLASS_STATIC_CONST_INT_STOREAGE" << be_nl << " ";
- }
*os << "const ";
if (node->et () == AST_Expression::EV_enum)
@@ -81,11 +74,6 @@ be_visitor_constant_cs::visit_constant (be_constant *node)
}
*os << ";";
- if (be_global->gen_inline_constants () && !forbidden_in_class)
- {
- *os << be_nl << "#endif // ifndef ACE_HAS_HEADER_ALLOCATED_CLASS_STATIC_CONST_INT_STOREAGE";
- }
-
node->cli_stub_gen (true);
return 0;
}
diff --git a/TAO/orbsvcs/LoadBalancer/LoadManager.cpp b/TAO/orbsvcs/LoadBalancer/LoadManager.cpp
index 85fb39b8d56..e881aca54dd 100644
--- a/TAO/orbsvcs/LoadBalancer/LoadManager.cpp
+++ b/TAO/orbsvcs/LoadBalancer/LoadManager.cpp
@@ -8,9 +8,9 @@
#include "tao/IORTable/IORTable.h"
-#if defined (linux) && defined (ACE_HAS_THREADS)
+#if defined (ACE_LINUX) && defined (ACE_HAS_THREADS)
# include "ace/Signal.h"
-#endif /* linux && ACE_HAS_THREADS */
+#endif /* ACE_LINUX && ACE_HAS_THREADS */
static const ACE_TCHAR *lm_ior_file = ACE_TEXT("lm.ior");
static int ping_timeout_milliseconds = 2000;
@@ -83,7 +83,7 @@ parse_args (int argc,
}
}
-#if defined (linux) && defined (ACE_HAS_THREADS)
+#if defined (ACE_LINUX) && defined (ACE_HAS_THREADS)
// Only the main thread can handle signals in Linux. Run the
// LoadManager in thread other than main().
extern "C"
@@ -210,7 +210,7 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[])
ACE_OS::fprintf (lm_ior, "%s", str.in ());
ACE_OS::fclose (lm_ior);
-#if defined (linux) && defined (ACE_HAS_THREADS)
+#if defined (ACE_LINUX) && defined (ACE_HAS_THREADS)
if (ACE_Thread_Manager::instance ()->spawn (::TAO_LB_run_load_manager,
orb.in ()) == -1)
{
diff --git a/TAO/orbsvcs/LoadBalancer/LoadMonitor.cpp b/TAO/orbsvcs/LoadBalancer/LoadMonitor.cpp
index 6cbeb210467..bfca8a4d5bf 100644
--- a/TAO/orbsvcs/LoadBalancer/LoadMonitor.cpp
+++ b/TAO/orbsvcs/LoadBalancer/LoadMonitor.cpp
@@ -98,7 +98,7 @@ parse_args (int argc, ACE_TCHAR *argv[])
}
}
-#if defined (linux) && defined (ACE_HAS_THREADS)
+#if defined (ACE_LINUX) && defined (ACE_HAS_THREADS)
// Only the main thread can handle signals in Linux. Run the
// LoadManager in thread other than main().
extern "C"
@@ -278,7 +278,7 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[])
reactor,
timer_id);
-#if defined (linux) && defined (ACE_HAS_THREADS)
+#if defined (ACE_LINUX) && defined (ACE_HAS_THREADS)
if (ACE_Thread_Manager::instance ()->spawn (::TAO_LB_run_load_monitor,
orb.in ()) == -1)
{
diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_CPU_Load_Average_Monitor.cpp b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_CPU_Load_Average_Monitor.cpp
index 184f5c13129..a0cebd7da5a 100644
--- a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_CPU_Load_Average_Monitor.cpp
+++ b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_CPU_Load_Average_Monitor.cpp
@@ -107,7 +107,7 @@ TAO_LB_CPU_Load_Average_Monitor::loads ()
load = ((system_ll - idle_ll) * 100 / system_ll) / sys_info.dwNumberOfProcessors;
}
-#elif defined (linux) || defined (sun)
+#elif defined (ACE_LINUX) || defined (sun)
// Only bother getting the load average over the last minute.
//
@@ -115,7 +115,7 @@ TAO_LB_CPU_Load_Average_Monitor::loads ()
// last 5 and 15 minutes can be used instead.
double loadavg[1];
-# if defined (linux) \
+# if defined (ACE_LINUX) \
&& ((defined (__GLIBC__) && defined (__GLIBC_MINOR__) \
&& __GLIBC__ == 2 && __GLIBC_MINOR__ < 2) \
|| (!defined (_BSD_SOURCE) && !defined (_GNU_SOURCE)))
@@ -217,8 +217,7 @@ TAO_LB_CPU_Load_Average_Monitor::loads ()
#endif
-#if defined (linux) || defined (sun) || defined (__hpux) || defined(__NetBSD__) || defined (__APPLE__)
-
+#if defined (ACE_LINUX) || defined (sun) || defined (__hpux) || defined(__NetBSD__) || defined (__APPLE__)
CosLoadBalancing::LoadList * tmp = 0;
ACE_NEW_THROW_EX (tmp,
CosLoadBalancing::LoadList (1),
diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_CPU_Utilization_Monitor.cpp b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_CPU_Utilization_Monitor.cpp
index 140d1fd5f2d..4dc1ecb2214 100644
--- a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_CPU_Utilization_Monitor.cpp
+++ b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_CPU_Utilization_Monitor.cpp
@@ -124,8 +124,7 @@ TAO_LB_CPU_Utilization_Monitor::loads ()
{
CORBA::Float load = 0;
-#if defined (linux) || defined (sun)
-
+#if defined (ACE_LINUX) || defined (sun)
double load_double = calc_cpu_loading ();
load = load_double;
diff --git a/TAO/tests/Time_Policy/main.cpp b/TAO/tests/Time_Policy/main.cpp
index c1dc6aa9d1a..b53b5df8a02 100644
--- a/TAO/tests/Time_Policy/main.cpp
+++ b/TAO/tests/Time_Policy/main.cpp
@@ -25,7 +25,7 @@
defined (ACE_WIN32) || \
(defined (ghs) && defined (ACE_HAS_PENTIUM)) || \
((defined (__GNUG__) || defined (__INTEL_COMPILER)) && !defined(ACE_VXWORKS) && defined (ACE_HAS_PENTIUM)) || \
- (defined (linux) && defined (ACE_HAS_ALPHA_TIMER)) || \
+ (defined (ACE_LINUX) && defined (ACE_HAS_ALPHA_TIMER)) || \
(defined (ACE_HAS_POWERPC_TIMER) && (defined (ghs) || defined (__GNUG__))) || \
(defined (ACE_HAS_CLOCK_GETTIME) && defined (ACE_HAS_CLOCK_GETTIME_MONOTONIC)))