pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/erlang Avoid non-portable recognition of defined(...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/d908c178804c
branches:  trunk
changeset: 356039:d908c178804c
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Sat Dec 17 23:27:23 2016 +0000

description:
Avoid non-portable recognition of defined() in expanded macros.

diffstat:

 lang/erlang/distinfo                                           |   3 +-
 lang/erlang/patches/patch-erts_emulator_sys_common_erl__poll.c |  42 ++++++++++
 2 files changed, 44 insertions(+), 1 deletions(-)

diffs (62 lines):

diff -r 55c833aca512 -r d908c178804c lang/erlang/distinfo
--- a/lang/erlang/distinfo      Sat Dec 17 23:24:31 2016 +0000
+++ b/lang/erlang/distinfo      Sat Dec 17 23:27:23 2016 +0000
@@ -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-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 -r 55c833aca512 -r d908c178804c lang/erlang/patches/patch-erts_emulator_sys_common_erl__poll.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/erlang/patches/patch-erts_emulator_sys_common_erl__poll.c    Sat Dec 17 23:27:23 2016 +0000
@@ -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
+ 



Home | Main Index | Thread Index | Old Index