diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2020-12-30 18:39:37 +0100 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2020-12-30 18:39:37 +0100 |
commit | b2a6ad2ea01ad9ed8e654d158b6486fefdb6936a (patch) | |
tree | 0685635093f03673d7faef4f2794334802e27317 | |
parent | a46852de783998ac9c3384fdb55277ef3906cf15 (diff) | |
download | ATCD-b2a6ad2ea01ad9ed8e654d158b6486fefdb6936a.tar.gz |
Instead of checking for the linux define use ACE_LINUX, the first doesn't seem to be set on RHEL75
* TAO/DevGuideExamples/RTCORBA/README:
* TAO/DevGuideExamples/RTCORBA/common.cpp:
* TAO/orbsvcs/LoadBalancer/LoadManager.cpp:
* TAO/orbsvcs/LoadBalancer/LoadMonitor.cpp:
* TAO/orbsvcs/orbsvcs/LoadBalancing/LB_CPU_Load_Average_Monitor.cpp:
* TAO/orbsvcs/orbsvcs/LoadBalancing/LB_CPU_Utilization_Monitor.cpp:
* TAO/tests/Time_Policy/main.cpp:
-rw-r--r-- | TAO/DevGuideExamples/RTCORBA/README | 2 | ||||
-rw-r--r-- | TAO/DevGuideExamples/RTCORBA/common.cpp | 2 | ||||
-rw-r--r-- | TAO/orbsvcs/LoadBalancer/LoadManager.cpp | 8 | ||||
-rw-r--r-- | TAO/orbsvcs/LoadBalancer/LoadMonitor.cpp | 4 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/LoadBalancing/LB_CPU_Load_Average_Monitor.cpp | 7 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/LoadBalancing/LB_CPU_Utilization_Monitor.cpp | 3 | ||||
-rw-r--r-- | TAO/tests/Time_Policy/main.cpp | 2 |
7 files changed, 12 insertions, 16 deletions
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/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))) |