8211146: fix problematic elif-tests after recent gcc warning changes Werror=undef
Reviewed-by: stuefe, clanger, dholmes, chegar, alanb
--- a/src/java.base/unix/native/libnet/net_util_md.h Fri Sep 21 18:57:18 2018 +0200
+++ b/src/java.base/unix/native/libnet/net_util_md.h Wed Sep 26 14:28:37 2018 +0200
@@ -47,7 +47,7 @@
#ifndef SO_REUSEPORT
#ifdef __linux__
#define SO_REUSEPORT 15
-#elif __solaris__
+#elif defined(__solaris__)
#define SO_REUSEPORT 0x100e
#elif defined(AIX) || defined(MACOSX)
#define SO_REUSEPORT 0x0200
--- a/src/java.base/unix/native/libnio/ch/NativeThread.c Fri Sep 21 18:57:18 2018 +0200
+++ b/src/java.base/unix/native/libnio/ch/NativeThread.c Wed Sep 26 14:28:37 2018 +0200
@@ -37,14 +37,14 @@
#include <pthread.h>
/* Also defined in net/linux_close.c */
#define INTERRUPT_SIGNAL (__SIGRTMAX - 2)
-#elif _AIX
+#elif defined(_AIX)
#include <pthread.h>
/* Also defined in net/aix_close.c */
#define INTERRUPT_SIGNAL (SIGRTMAX - 1)
-#elif __solaris__
+#elif defined(__solaris__)
#include <thread.h>
#define INTERRUPT_SIGNAL (SIGRTMAX - 2)
-#elif _ALLBSD_SOURCE
+#elif defined(_ALLBSD_SOURCE)
#include <pthread.h>
/* Also defined in net/bsd_close.c */
#define INTERRUPT_SIGNAL SIGIO
--- a/src/java.base/unix/native/libnio/ch/nio_util.h Fri Sep 21 18:57:18 2018 +0200
+++ b/src/java.base/unix/native/libnio/ch/nio_util.h Wed Sep 26 14:28:37 2018 +0200
@@ -40,7 +40,7 @@
#ifndef SO_REUSEPORT
#ifdef __linux__
#define SO_REUSEPORT 15
-#elif __solaris__
+#elif defined(__solaris__)
#define SO_REUSEPORT 0x100e
#elif defined(AIX) || defined(MACOSX)
#define SO_REUSEPORT 0x0200
--- a/src/jdk.jdwp.agent/unix/native/libjdwp/util_md.h Fri Sep 21 18:57:18 2018 +0200
+++ b/src/jdk.jdwp.agent/unix/native/libjdwp/util_md.h Wed Sep 26 14:28:37 2018 +0200
@@ -33,7 +33,7 @@
#include <sys/types.h>
#ifdef _ALLBSD_SOURCE
#include <machine/endian.h>
-#elif __linux__
+#elif defined(__linux__)
#include <endian.h>
#endif