diff options
author | joerg <joerg@pkgsrc.org> | 2016-12-17 23:27:23 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2016-12-17 23:27:23 +0000 |
commit | 4ffce295cc55f4df61b5393b57194c0e4c78c84a (patch) | |
tree | 121e422b76dd980ce45c634346311227f1aeb404 /lang/erlang | |
parent | 1b039a7b2cfb2fa4cc3f5186993f1612b399dd24 (diff) | |
download | pkgsrc-4ffce295cc55f4df61b5393b57194c0e4c78c84a.tar.gz |
Avoid non-portable recognition of defined() in expanded macros.
Diffstat (limited to 'lang/erlang')
-rw-r--r-- | lang/erlang/distinfo | 3 | ||||
-rw-r--r-- | lang/erlang/patches/patch-erts_emulator_sys_common_erl__poll.c | 42 |
2 files changed, 44 insertions, 1 deletions
diff --git a/lang/erlang/distinfo b/lang/erlang/distinfo index d12bfca9b86..68935d493b4 100644 --- a/lang/erlang/distinfo +++ b/lang/erlang/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.47 2016/10/04 07:21:30 he Exp $ +$NetBSD: distinfo,v 1.48 2016/12/17 23:27:23 joerg Exp $ SHA1 (erlang/otp_src_19.1.tar.gz) = 9f83a442de96c075a7cd1c42ceae9e3ce44b8f76 RMD160 (erlang/otp_src_19.1.tar.gz) = 7a850068e9b46f8b6f54f83e95d2d5d09ec674e7 @@ -10,5 +10,6 @@ SHA1 (patch-ao) = e5801f2a1f1f7e8b75dc35abbc485dc310666a37 SHA1 (patch-ay) = f5f1accdb11e404ba4779b056228431e3080e4cd SHA1 (patch-erts_configure) = dba8d72974e8c493cf2bb90e6b149a84dd9073da SHA1 (patch-erts_emulator_drivers_common_inet__drv.c) = b7784e5e8e025ca75d5279a63e0cb3f74c54bd6a +SHA1 (patch-erts_emulator_sys_common_erl__poll.c) = b2068ed4f1994407cb2ec3cd10220bebae85b01d SHA1 (patch-erts_emulator_sys_unix_sys.c) = 976124f49103f994db0cd7334987f42fc5c590bc SHA1 (patch-make_output.mk.in) = d7b3da58bfb471d52c41242e2a03d1598ce24e62 diff --git a/lang/erlang/patches/patch-erts_emulator_sys_common_erl__poll.c b/lang/erlang/patches/patch-erts_emulator_sys_common_erl__poll.c new file mode 100644 index 00000000000..3de69532095 --- /dev/null +++ b/lang/erlang/patches/patch-erts_emulator_sys_common_erl__poll.c @@ -0,0 +1,42 @@ +$NetBSD: patch-erts_emulator_sys_common_erl__poll.c,v 1.1 2016/12/17 23:27:23 joerg Exp $ + +Do not depend on defined() being evaluated in a macro expansion. + +--- erts/emulator/sys/common/erl_poll.c.orig 2016-12-16 13:31:54.163364875 +0000 ++++ erts/emulator/sys/common/erl_poll.c +@@ -148,11 +148,17 @@ int ERTS_SELECT(int nfds, ERTS_fd_set *r + + #define ERTS_POLL_USE_BATCH_UPDATE_POLLSET (ERTS_POLL_USE_DEVPOLL \ + || ERTS_POLL_USE_KQUEUE) +-#define ERTS_POLL_USE_UPDATE_REQUESTS_QUEUE \ +- (defined(ERTS_SMP) || ERTS_POLL_USE_KERNEL_POLL || ERTS_POLL_USE_POLL) ++#if (defined(ERTS_SMP) || ERTS_POLL_USE_KERNEL_POLL || ERTS_POLL_USE_POLL) ++#define ERTS_POLL_USE_UPDATE_REQUESTS_QUEUE 1 ++#else ++#define ERTS_POLL_USE_UPDATE_REQUESTS_QUEUE 0 ++#endif + +-#define ERTS_POLL_USE_CONCURRENT_UPDATE \ +- (defined(ERTS_SMP) && ERTS_POLL_USE_EPOLL) ++#if (defined(ERTS_SMP) && ERTS_POLL_USE_EPOLL) ++#define ERTS_POLL_USE_CONCURRENT_UPDATE 1 ++#else ++#define ERTS_POLL_USE_CONCURRENT_UPDATE 0 ++#endif + + #define ERTS_POLL_COALESCE_KP_RES (ERTS_POLL_USE_KQUEUE || ERTS_POLL_USE_EPOLL) + +@@ -162,8 +168,11 @@ int ERTS_SELECT(int nfds, ERTS_fd_set *r + # define ERTS_POLL_ASYNC_INTERRUPT_SUPPORT 0 + #endif + +-#define ERTS_POLL_USE_WAKEUP_PIPE \ +- (ERTS_POLL_ASYNC_INTERRUPT_SUPPORT || defined(USE_THREADS)) ++#if (ERTS_POLL_ASYNC_INTERRUPT_SUPPORT || defined(USE_THREADS)) ++#define ERTS_POLL_USE_WAKEUP_PIPE 1 ++#else ++#define ERTS_POLL_USE_WAKEUP_PIPE 0 ++#endif + + #ifdef ERTS_SMP + |