]> granicus.if.org Git - gc/commitdiff
Align IRIX/OSF1_THREADS definition in gc_config_macros.h with gcconfig.h
authorIvan Maidanski <ivmai@mail.ru>
Thu, 4 May 2017 11:17:37 +0000 (14:17 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Thu, 4 May 2017 11:19:03 +0000 (14:19 +0300)
The condition of defining GC_IRIX_THREADS and GC_OSF1_THREADS
(if GC_THREADS) in gc_config_macros.h is now the same as that of
IRIX5 and OSF1 macros in gcconfig.h, respectively.

* include/gc_config_macros.h [GC_THREADS] (GC_HPUX_THREADS,
GC_SOLARIS_THREADS): Replace !defined(__linux__) with "#elif".
* include/gc_config_macros.h [GC_THREADS] (GC_OPENBSD_THREADS,
GC_FREEBSD_THREADS, GC_NETBSD_THREADS): Handle the case before
GC_OSF1_THREADS, GC_IRIX_THREADS, GC_SOLARIS_THREADS, GC_DARWIN_THREADS;
remove FIXME.
* include/gc_config_macros.h [GC_THREADS] (GC_IRIX_THREADS): Check
mips and _mips predefined macros in addition to __mips; do not define
if any of [_]nec_ews, [__]ultrix predefined macro is defined.

include/gc_config_macros.h

index 21953ade16a388cedb0dd55ed3c86fc50a26de29..3d64dfef8d40b10fdd9e16ba1d1440416bc0849a 100644 (file)
 #elif defined(GC_THREADS)
 # if defined(__linux__)
 #   define GC_LINUX_THREADS
-# endif
-# if !defined(__linux__) && (defined(_PA_RISC1_1) || defined(_PA_RISC2_0) \
-                             || defined(hppa) || defined(__HPPA)) \
-     || (defined(__ia64) && defined(_HPUX_SOURCE))
+# elif defined(_PA_RISC1_1) || defined(_PA_RISC2_0) || defined(hppa) \
+       || defined(__HPPA) || (defined(__ia64) && defined(_HPUX_SOURCE))
 #   define GC_HPUX_THREADS
-# endif
-# if !defined(__linux__) && (defined(__alpha) || defined(__alpha__))
+# elif defined(__OpenBSD__)
+#   define GC_OPENBSD_THREADS
+# elif defined(__FreeBSD__) || defined(__DragonFly__)
+#   define GC_FREEBSD_THREADS
+# elif defined(__NetBSD__)
+#   define GC_NETBSD_THREADS
+# elif defined(__alpha) || defined(__alpha__) /* && !Linux && !xBSD */
 #   define GC_OSF1_THREADS
-# endif
-# if defined(__mips) && !defined(__linux__)
+# elif (defined(mips) || defined(__mips) || defined(_mips)) \
+        && !(defined(nec_ews) || defined(_nec_ews) \
+             || defined(ultrix) || defined(__ultrix))
 #   define GC_IRIX_THREADS
-# endif
-# if defined(__sparc) && !defined(__linux__) \
-     || ((defined(sun) || defined(__sun)) \
-         && (defined(i386) || defined(__i386__) \
-             || defined(__amd64) || defined(__amd64__)))
+# elif defined(__sparc) /* && !Linux */ \
+       || ((defined(sun) || defined(__sun)) \
+           && (defined(i386) || defined(__i386__) \
+               || defined(__amd64) || defined(__amd64__)))
 #   define GC_SOLARIS_THREADS
 # elif defined(__APPLE__) && defined(__MACH__)
 #   define GC_DARWIN_THREADS
-# elif defined(__OpenBSD__)
-#   define GC_OPENBSD_THREADS
-# elif !defined(GC_LINUX_THREADS) && !defined(GC_HPUX_THREADS) \
-       && !defined(GC_OSF1_THREADS) && !defined(GC_IRIX_THREADS)
-    /* FIXME: Should we really need for FreeBSD and NetBSD to check     */
-    /* that no other GC_xxx_THREADS macro is set?                       */
-#   if defined(__FreeBSD__) || defined(__DragonFly__)
-#     define GC_FREEBSD_THREADS
-#   elif defined(__NetBSD__)
-#     define GC_NETBSD_THREADS
-#   endif
 # endif
 # if defined(DGUX) && (defined(i386) || defined(__i386__))
 #   define GC_DGUX386_THREADS