diff options
author | Björn-Egil Dahlberg <[email protected]> | 2012-11-27 16:39:27 +0100 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2012-11-27 16:39:27 +0100 |
commit | 72f4349d634a8bbf8de5a50ac4535eb8ee157b6c (patch) | |
tree | 5702d60694fffcb93d3de7414153baaf404c1786 /erts/lib_src/common/erl_misc_utils.c | |
parent | 24ad798b11b93360649f93c85fcff87b18db4c6b (diff) | |
parent | 2aeaadaf0b908cbec7f0501458eca65ebaa7b33b (diff) | |
download | otp-72f4349d634a8bbf8de5a50ac4535eb8ee157b6c.tar.gz otp-72f4349d634a8bbf8de5a50ac4535eb8ee157b6c.tar.bz2 otp-72f4349d634a8bbf8de5a50ac4535eb8ee157b6c.zip |
Merge branch 'egil/darwin-fixes'
* egil/darwin-fixes:
erl_interface: Avoid redefinition of ALIGNBYTES
erts: Fix '#ifdef' for unused static functions
erts: Remove forgotten vxworks includes
hipe: Cast offsetof to int in hipe_arch_print_pcb
Diffstat (limited to 'erts/lib_src/common/erl_misc_utils.c')
-rw-r--r-- | erts/lib_src/common/erl_misc_utils.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/erts/lib_src/common/erl_misc_utils.c b/erts/lib_src/common/erl_misc_utils.c index 3b123063fa..1b49f69581 100644 --- a/erts/lib_src/common/erl_misc_utils.c +++ b/erts/lib_src/common/erl_misc_utils.c @@ -28,8 +28,6 @@ #include "erl_misc_utils.h" #if defined(__WIN32__) -#elif defined(VXWORKS) -# include <selectLib.h> #else /* UNIX */ # include <stdio.h> # include <sys/types.h> @@ -124,6 +122,12 @@ #include <sys/sysctl.h> #endif +/* Simplify include for static functions */ + +#if defined(__linux__) || defined(HAVE_KSTAT) || defined(__WIN32__) || defined(__FreeBSD__) +# define ERTS_CPU_TOPOLOGY_ENABLED (1) +#endif + static int read_topology(erts_cpu_info_t *cpuinfo); #if defined(ERTS_HAVE_MISC_UTIL_AFFINITY_MASK__) @@ -669,6 +673,7 @@ erts_unbind_from_cpu_str(char *str) } +#if defined(ERTS_CPU_TOPOLOGY_ENABLED) static int pn_cmp(const void *vx, const void *vy) { @@ -759,6 +764,7 @@ adjust_processor_nodes(erts_cpu_info_t *cpuinfo, int no_nodes) } } } +#endif #ifdef __linux__ |