aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2012-11-27 16:39:27 +0100
committerBjörn-Egil Dahlberg <[email protected]>2012-11-27 16:39:27 +0100
commit72f4349d634a8bbf8de5a50ac4535eb8ee157b6c (patch)
tree5702d60694fffcb93d3de7414153baaf404c1786 /erts
parent24ad798b11b93360649f93c85fcff87b18db4c6b (diff)
parent2aeaadaf0b908cbec7f0501458eca65ebaa7b33b (diff)
downloadotp-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')
-rw-r--r--erts/emulator/hipe/hipe_x86.c2
-rw-r--r--erts/lib_src/common/erl_misc_utils.c10
2 files changed, 9 insertions, 3 deletions
diff --git a/erts/emulator/hipe/hipe_x86.c b/erts/emulator/hipe/hipe_x86.c
index 24d232c968..4281730ae2 100644
--- a/erts/emulator/hipe/hipe_x86.c
+++ b/erts/emulator/hipe/hipe_x86.c
@@ -265,7 +265,7 @@ void *hipe_make_native_stub(void *beamAddress, unsigned int beamArity)
void hipe_arch_print_pcb(struct hipe_process_state *p)
{
#define U(n,x) \
- printf(" % 4d | %s | 0x%08x | |\r\n", offsetof(struct hipe_process_state,x), n, (unsigned)p->x)
+ printf(" % 4d | %s | 0x%08x | |\r\n", (int)offsetof(struct hipe_process_state,x), n, (unsigned)p->x)
U("ncsp ", ncsp);
U("narity ", narity);
#undef U
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__