aboutsummaryrefslogtreecommitdiffstats
path: root/lib
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 /lib
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 'lib')
-rw-r--r--lib/erl_interface/src/connect/ei_resolve.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/erl_interface/src/connect/ei_resolve.c b/lib/erl_interface/src/connect/ei_resolve.c
index ba8f8fbce3..79d259b92d 100644
--- a/lib/erl_interface/src/connect/ei_resolve.c
+++ b/lib/erl_interface/src/connect/ei_resolve.c
@@ -186,11 +186,11 @@ static int verify_dns_configuration(void)
* advance: increment buf by n bytes, reduce len by same amount .
*/
#if defined SIZEOF_VOID_P
-#define ALIGNBYTES (SIZEOF_VOID_P - 1)
+#define EI_ALIGNBYTES (SIZEOF_VOID_P - 1)
#else
-#define ALIGNBYTES (sizeof(void*) - 1)
+#define EI_ALIGNBYTES (sizeof(void*) - 1)
#endif
-#define align_buf(buf,len) for (;(((unsigned)buf) & ALIGNBYTES); (buf)++, len--)
+#define align_buf(buf,len) for (;(((unsigned)buf) & EI_ALIGNBYTES); (buf)++, len--)
#define advance_buf(buf,len,n) ((buf)+=(n),(len)-=(n))
/* "and now the tricky part..." */
@@ -282,6 +282,8 @@ static int copy_hostent(struct hostent *dest, const struct hostent *src, char *b
return 0;
}
+#undef EI_ALIGNBYTES
+
/* This function is a pseudo-reentrant version of gethostbyname(). It
* uses locks to serialize the call to the regular (non-reentrant)
* gethostbyname() and then copies the data into the user-provided