зеркало из https://github.com/mozilla/pjs.git
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.
This commit is contained in:
Родитель
3545f4e831
Коммит
89b2aa5242
|
@ -59,18 +59,15 @@ OS_CFLAGS = $(DSO_CFLAGS) $(PLATFORM_FLAGS) $(PORT_FLAGS)
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
ifeq ($(CPU_ARCH),alpha)
|
ifeq ($(CPU_ARCH),alpha)
|
||||||
PLATFORM_FLAGS += -DLINUX1_2 -D_ALPHA_ -D__alpha
|
PLATFORM_FLAGS += -D_ALPHA_ -D__alpha
|
||||||
PORT_FLAGS += -D_XOPEN_SOURCE
|
PORT_FLAGS += -D_XOPEN_SOURCE
|
||||||
endif
|
endif
|
||||||
ifeq ($(CPU_ARCH),ppc)
|
ifeq ($(CPU_ARCH),ppc)
|
||||||
PLATFORM_FLAGS += -DMKLINUX -DLINUX1_2
|
PLATFORM_FLAGS += -DMKLINUX
|
||||||
OS_INCLUDES += -I/usr/local/include
|
OS_INCLUDES += -I/usr/local/include
|
||||||
endif
|
endif
|
||||||
ifeq ($(CPU_ARCH),sparc)
|
|
||||||
PLATFORM_FLAGS += -DLINUX1_2
|
|
||||||
endif
|
|
||||||
ifeq ($(CPU_ARCH),x86)
|
ifeq ($(CPU_ARCH),x86)
|
||||||
PLATFORM_FLAGS += -mno-486 -DLINUX1_2 -Di386
|
PLATFORM_FLAGS += -mno-486 -Di386
|
||||||
PORT_FLAGS += -D_XOPEN_SOURCE
|
PORT_FLAGS += -D_XOPEN_SOURCE
|
||||||
endif
|
endif
|
||||||
ifeq ($(CPU_ARCH),m68k)
|
ifeq ($(CPU_ARCH),m68k)
|
||||||
|
@ -82,12 +79,7 @@ ifeq ($(CPU_ARCH),m68k)
|
||||||
ifndef BUILD_OPT
|
ifndef BUILD_OPT
|
||||||
OPTIMIZER += -O
|
OPTIMIZER += -O
|
||||||
endif
|
endif
|
||||||
PLATFORM_FLAGS += -m68020-40 -DLINUX1_2
|
PLATFORM_FLAGS += -m68020-40
|
||||||
endif
|
|
||||||
|
|
||||||
# These are CPU_ARCH independent
|
|
||||||
ifeq ($(basename $(OS_RELEASE)),2.0)
|
|
||||||
PLATFORM_FLAGS += -DLINUX2_0
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
|
@ -48,13 +48,8 @@
|
||||||
/*
|
/*
|
||||||
* Elf linux supports dl* functions
|
* Elf linux supports dl* functions
|
||||||
*/
|
*/
|
||||||
#if defined(LINUX1_2) || defined(LINUX2_0)
|
|
||||||
#define HAVE_DLL
|
#define HAVE_DLL
|
||||||
#define USE_DLFCN
|
#define USE_DLFCN
|
||||||
#else
|
|
||||||
#undef HAVE_DLL
|
|
||||||
#undef USE_DLFCN
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !defined(MKLINUX) && !defined(NEED_TIME_R)
|
#if !defined(MKLINUX) && !defined(NEED_TIME_R)
|
||||||
#define NEED_TIME_R
|
#define NEED_TIME_R
|
||||||
|
|
|
@ -141,7 +141,7 @@ PR_EXTERN(PRIntn) pt_hpux_privcheck(void);
|
||||||
/*
|
/*
|
||||||
* These platforms don't have sigtimedwait()
|
* 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)
|
|| defined(FREEBSD)
|
||||||
#define PT_NO_SIGTIMEDWAIT
|
#define PT_NO_SIGTIMEDWAIT
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -72,7 +72,7 @@ static sigset_t timer_set;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(SOLARIS) \
|
#if defined(SOLARIS) \
|
||||||
|| (defined(LINUX2_0) && defined(_REENTRANT) \
|
|| (defined(LINUX) && defined(_REENTRANT) \
|
||||||
&& !(defined(__GLIBC__) && __GLIBC__ >= 2))
|
&& !(defined(__GLIBC__) && __GLIBC__ >= 2))
|
||||||
#define _PR_HAVE_GETPROTO_R
|
#define _PR_HAVE_GETPROTO_R
|
||||||
#define _PR_HAVE_GETPROTO_R_POINTER
|
#define _PR_HAVE_GETPROTO_R_POINTER
|
||||||
|
@ -86,7 +86,7 @@ static sigset_t timer_set;
|
||||||
#define _PR_HAVE_GETPROTO_R_INT
|
#define _PR_HAVE_GETPROTO_R_INT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (defined(LINUX2_0) && defined(__GLIBC__) && __GLIBC__ >= 2)
|
#if (defined(LINUX) && defined(__GLIBC__) && __GLIBC__ >= 2)
|
||||||
#define _PR_HAVE_GETPROTO_R
|
#define _PR_HAVE_GETPROTO_R
|
||||||
#define _PR_HAVE_5_ARG_GETPROTO_R
|
#define _PR_HAVE_5_ARG_GETPROTO_R
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -751,7 +751,7 @@ void _PR_InitThreads(
|
||||||
* conflict with the use of these two signals in our GC support.
|
* conflict with the use of these two signals in our GC support.
|
||||||
* So we don't know how to support GC on Linux pthreads.
|
* 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();
|
init_pthread_gc_support();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче