Got rid of the LINUX1_2 and LINUX2_0 macros. I hope that this will
authorwtc
Tue, 28 Apr 1998 23:54:29 +0000
changeset 72 c831519d2e8fcf150a16c9dc9ffb9518b96ca8ad
parent 70 81fc3c4cf2b3fabf4a362962403b0a5518075ca3 (current diff)
parent 71 7dd7bc021fbf12f16460aa4e9fda3d56d877175c (diff)
child 73 e30e8b8611c904be15399237ae88863360560169
push idunknown
push userunknown
push dateunknown
Got rid of the LINUX1_2 and LINUX2_0 macros. I hope that this will make building on 2.1.x easier. In case we need to distinguish between different versions of Linux, we will try to use feature-based macros as opposed to version-based macros. Files changed: Linux.mk, _linux.h, _pth.h, prnetdb.c, and ptthread.c.
config/Linux.mk
pr/include/md/_linux.h
pr/include/md/_pth.h
pr/src/misc/prnetdb.c
pr/src/pthreads/ptthread.c
--- a/config/Linux.mk
+++ b/config/Linux.mk
@@ -54,45 +54,37 @@ PORT_FLAGS		= -D_POSIX_SOURCE -D_BSD_SOU
 
 OS_CFLAGS		= $(DSO_CFLAGS) $(PLATFORM_FLAGS) $(PORT_FLAGS)
 
 ######################################################################
 # Version-specific stuff
 ######################################################################
 
 ifeq ($(CPU_ARCH),alpha)
-PLATFORM_FLAGS		+= -DLINUX1_2 -D_ALPHA_ -D__alpha
+PLATFORM_FLAGS		+= -D_ALPHA_ -D__alpha
 PORT_FLAGS		+= -D_XOPEN_SOURCE
 endif
 ifeq ($(CPU_ARCH),ppc)
-PLATFORM_FLAGS		+= -DMKLINUX -DLINUX1_2
+PLATFORM_FLAGS		+= -DMKLINUX
 OS_INCLUDES		+= -I/usr/local/include
 endif
-ifeq ($(CPU_ARCH),sparc)
-PLATFORM_FLAGS		+= -DLINUX1_2
-endif
 ifeq ($(CPU_ARCH),x86)
-PLATFORM_FLAGS		+= -mno-486 -DLINUX1_2 -Di386
+PLATFORM_FLAGS		+= -mno-486 -Di386
 PORT_FLAGS		+= -D_XOPEN_SOURCE
 endif
 ifeq ($(CPU_ARCH),m68k)
 #
 # gcc on Linux/m68k either has a bug or triggers a code-sequence
 # bug in the 68060 which causes gcc to crash.  The simplest way to
 # avoid this is to enable a minimum level of optimization.
 #
 ifndef BUILD_OPT
 OPTIMIZER		+= -O
 endif
-PLATFORM_FLAGS		+= -m68020-40 -DLINUX1_2
-endif
-
-# These are CPU_ARCH independent
-ifeq ($(basename $(OS_RELEASE)),2.0)
-PLATFORM_FLAGS		+= -DLINUX2_0
+PLATFORM_FLAGS		+= -m68020-40
 endif
 
 #
 # Linux ppc and 2.0 have shared libraries.
 #
 
 MKSHLIB			= $(LD) $(DSO_LDOPTS) -soname $(@:$(OBJDIR)/%.so=%.so)
 ifdef BUILD_OPT
--- a/pr/include/md/_linux.h
+++ b/pr/include/md/_linux.h
@@ -43,23 +43,18 @@
 #define _MD_DEFAULT_STACK_SIZE	65536L
 #define _MD_MMAP_FLAGS          MAP_PRIVATE
 
 #undef	HAVE_STACK_GROWING_UP
 
 /*
  * Elf linux supports dl* functions
  */
-#if defined(LINUX1_2) || defined(LINUX2_0)
 #define HAVE_DLL
 #define USE_DLFCN
-#else
-#undef	HAVE_DLL
-#undef	USE_DLFCN
-#endif
 
 #if !defined(MKLINUX) && !defined(NEED_TIME_R)
 #define NEED_TIME_R
 #endif
 
 #define USE_SETJMP
 
 #ifdef _PR_PTHREADS
--- a/pr/include/md/_pth.h
+++ b/pr/include/md/_pth.h
@@ -136,17 +136,17 @@ PR_EXTERN(PRIntn) pt_hpux_privcheck(void
 #if defined(_PR_DCETHREADS) || defined(FREEBSD) \
 	|| (defined(LINUX) && defined(__alpha))
 #define PT_NO_ATFORK
 #endif
 
 /*
  * These platforms don't have sigtimedwait()
  */
-#if (defined(AIX) && !defined(AIX4_3)) || defined(LINUX2_0) \
+#if (defined(AIX) && !defined(AIX4_3)) || defined(LINUX) \
 	|| defined(FREEBSD)
 #define PT_NO_SIGTIMEDWAIT
 #endif
 
 #if defined(OSF1)
 #define PT_PRIO_MIN            PRI_OTHER_MIN
 #define PT_PRIO_MAX            PRI_OTHER_MAX
 #elif defined(IRIX)
--- a/pr/src/misc/prnetdb.c
+++ b/pr/src/misc/prnetdb.c
@@ -67,31 +67,31 @@ static sigset_t timer_set;
 /*
  * Some platforms have the reentrant getprotobyname_r() and
  * getprotobynumber_r().  However, they come in two flavors.
  * Some return a pointer to struct protoent, others return
  * an int.
  */
 
 #if defined(SOLARIS) \
-	|| (defined(LINUX2_0) && defined(_REENTRANT) \
+	|| (defined(LINUX) && defined(_REENTRANT) \
         && !(defined(__GLIBC__) && __GLIBC__ >= 2))
 #define _PR_HAVE_GETPROTO_R
 #define _PR_HAVE_GETPROTO_R_POINTER
 #endif
 
 #if defined(OSF1) \
         || defined(AIX4_3) || (defined(AIX) && defined(_THREAD_SAFE)) \
 	|| (defined(HPUX10_10) && defined(_REENTRANT)) \
         || (defined(HPUX10_20) && defined(_REENTRANT))
 #define _PR_HAVE_GETPROTO_R
 #define _PR_HAVE_GETPROTO_R_INT
 #endif
 
-#if (defined(LINUX2_0) && defined(__GLIBC__) && __GLIBC__ >= 2)
+#if (defined(LINUX) && defined(__GLIBC__) && __GLIBC__ >= 2)
 #define _PR_HAVE_GETPROTO_R
 #define _PR_HAVE_5_ARG_GETPROTO_R
 #endif
 
 #if !defined(_PR_HAVE_GETPROTO_R)
 PRLock* _getproto_lock = NULL;
 #endif
 
--- a/pr/src/pthreads/ptthread.c
+++ b/pr/src/pthreads/ptthread.c
@@ -746,17 +746,17 @@ void _PR_InitThreads(
     pt_schedpriv = PT_PRIVCHECK();
     PR_SetThreadPriority(thred, priority);
 
     /*
      * Linux pthreads use SIGUSR1 and SIGUSR2 internally, which
      * conflict with the use of these two signals in our GC support.
      * So we don't know how to support GC on Linux pthreads.
      */
-#if !defined(LINUX2_0) && !defined(FREEBSD)
+#if !defined(LINUX) && !defined(FREEBSD)
 	init_pthread_gc_support();
 #endif
 
 }  /* _PR_InitThreads */
 
 PR_IMPLEMENT(PRStatus) PR_Cleanup()
 {
     PRThread *me = PR_CurrentThread();