diff options
author | elliott_c <ocielliottc@users.noreply.github.com> | 2003-04-22 18:55:30 +0000 |
---|---|---|
committer | elliott_c <ocielliottc@users.noreply.github.com> | 2003-04-22 18:55:30 +0000 |
commit | 5dbda4cbe83f7f0b1be421f1efe864c0ea109283 (patch) | |
tree | e20b53110a3f7f9ee8e7d259b7f86823a06f2c10 /TAO | |
parent | b0f5147b139a54ac350dac80f2a9b5f92112d666 (diff) | |
download | ATCD-5dbda4cbe83f7f0b1be421f1efe864c0ea109283.tar.gz |
ChangeLogTag: Tue Apr 22 13:51:45 2003 Chad Elliott <elliott_c@ociweb.com>
Diffstat (limited to 'TAO')
-rw-r--r-- | TAO/ChangeLog | 7 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/LoadBalancing/LB_CPU_Monitor.cpp | 10 |
2 files changed, 14 insertions, 3 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index 17451d9d391..edaac50a538 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,10 @@ +Tue Apr 22 13:51:45 2003 Chad Elliott <elliott_c@ociweb.com> + + * orbsvcs/orbsvcs/LoadBalancing/LB_CPU_Monitor.cpp: + + Only #include <sys/loadavg.h> if ACE_HAS_SYS_LOADAVG_H is defined. + It only exists with SunOS 5.7 and later. + Tue Apr 22 14:26:31 2003 Irfan Pyarali <irfan@oomworks.com> * tao\RTPortableServer\RT_Servant_Dispatcher.cpp: diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_CPU_Monitor.cpp b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_CPU_Monitor.cpp index c61a4969310..32e3cbf1e52 100644 --- a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_CPU_Monitor.cpp +++ b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_CPU_Monitor.cpp @@ -1,8 +1,8 @@ #include "LB_CPU_Monitor.h" -#ifdef sun -# include <sys/loadavg.h> -#endif /* sun */ +#if defined (ACE_HAS_SYS_LOADAVG_H) +# include <sys/loadavg.h> +#endif /* ACE_HAS_SYS_LOADAVG_H */ ACE_RCSID (LoadBalancing, @@ -130,7 +130,11 @@ TAO_LB_CPU_Monitor::loads (ACE_ENV_SINGLE_ARG_DECL) # else +# if defined (ACE_HAS_SYS_LOADAVG_H) const int samples = ::getloadavg (loadavg, 1); +# else + const int samples = 0; +# endif /* ACE_HAS_SYS_LOADAVG_H */ # endif /* linux && ((__GLIBC__ == 2 && __GLIBC_MINOR__ < 2) |