8211146: fix problematic elif-tests after recent gcc warning changes Werror=undef jdk-12+13
authormbaesken
Wed, 26 Sep 2018 14:28:37 +0200
changeset 51878 511a9946f83e
parent 51877 5f931e3e7a63
child 51879 6ffa38b8da65
8211146: fix problematic elif-tests after recent gcc warning changes Werror=undef Reviewed-by: stuefe, clanger, dholmes, chegar, alanb
src/java.base/unix/native/libnet/net_util_md.h
src/java.base/unix/native/libnio/ch/NativeThread.c
src/java.base/unix/native/libnio/ch/nio_util.h
src/jdk.jdwp.agent/unix/native/libjdwp/util_md.h
--- 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