From 1bc76f07581e6364f440b89ace6ea40123e96fb3 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Thu, 4 May 2017 14:17:37 +0300 Subject: [PATCH] Align IRIX/OSF1_THREADS definition in gc_config_macros.h with gcconfig.h 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 | 40 ++++++++++++++++------------------------ 1 file changed, 16 insertions(+), 24 deletions(-) diff --git a/include/gc_config_macros.h b/include/gc_config_macros.h index 21953ad..3d64dfe 100644 --- a/include/gc_config_macros.h +++ b/include/gc_config_macros.h @@ -83,36 +83,28 @@ #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 -- 2.7.4