зеркало из https://github.com/mozilla/pjs.git
BugZilla: 19247. Add support for VMS, QNX, NTO
This commit is contained in:
Родитель
d73d71e653
Коммит
fa4ff6d029
|
@ -756,6 +756,9 @@ EOF
|
|||
*:QNX:*:*)
|
||||
echo i386-pc-qnx`${UNAME_VERSION} | cut -c1-1`
|
||||
exit 0 ;;
|
||||
*:*nto:*:*)
|
||||
echo `uname -p`-pc-nto
|
||||
exit 0 ;;
|
||||
BePC:BeOS:*:*)
|
||||
echo i386-pc-beos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
|
|
|
@ -144,11 +144,11 @@ case $os in
|
|||
os=-psos
|
||||
;;
|
||||
-qnx*)
|
||||
basic_machine=i386-pc
|
||||
basic_machine=x6-pc
|
||||
os=-qnx`uname -v | cut -c1-1`
|
||||
;;
|
||||
-nto*)
|
||||
basic_machine=i386-pc
|
||||
basic_machine=`uname -p`-pc
|
||||
os=-nto
|
||||
;;
|
||||
-rhapsody*)
|
||||
|
@ -518,11 +518,11 @@ case $basic_machine in
|
|||
basic_machine=i386-ibm
|
||||
;;
|
||||
*qnx*)
|
||||
basic_machine=i386-pc
|
||||
basic_machine=x86-pc
|
||||
os=-qnx`uname -v | cut -c1-1`
|
||||
;;
|
||||
*nto*)
|
||||
basic_machine=i386-pc
|
||||
basic_machine=`uname -p`-pc
|
||||
os=-nto
|
||||
;;
|
||||
rm[46]00)
|
||||
|
|
|
@ -21,30 +21,54 @@
|
|||
|
||||
include $(MOD_DEPTH)/config/UNIX.mk
|
||||
|
||||
CPU_ARCH = x86
|
||||
#
|
||||
# XXX
|
||||
# Temporary define for the Client; to be removed when binary release is used
|
||||
#
|
||||
ifdef MOZILLA_CLIENT
|
||||
ifneq ($(USE_PTHREADS),1)
|
||||
CLASSIC_NSPR = 1
|
||||
endif
|
||||
endif
|
||||
|
||||
#
|
||||
# The default implementation strategy for Linux is pthreads.
|
||||
#
|
||||
ifeq ($(CLASSIC_NSPR),1)
|
||||
IMPL_STRATEGY = _EMU
|
||||
DEFINES += -D_PR_LOCAL_THREADS_ONLY
|
||||
else
|
||||
USE_PTHREADS = 1
|
||||
IMPL_STRATEGY = _PTH
|
||||
DEFINES += -D_REENTRANT
|
||||
endif
|
||||
|
||||
|
||||
AR = qcc -Vgcc_ntox86 -M -a $@
|
||||
CC = qcc -Vgcc_ntox86 -shared
|
||||
CC = qcc -Vgcc_ntox86
|
||||
LD = $(CC)
|
||||
CCC = $(CC)
|
||||
OS_CFLAGS = -Wc,-Wall -Wc,-Wno-parentheses -DNTO -DNTO2 -Di386 \
|
||||
-D_QNX_SOURCE -DNO_REGEX \
|
||||
-DSTRINGS_ALIGNED -D__i386__ -D__QNXNTO__ -DPIC \
|
||||
-DHAVE_POINTER_LOCALTIME_R
|
||||
|
||||
# Old Flags -DNO_REGEX -DSTRINGS_ALIGNED
|
||||
|
||||
OS_CFLAGS = -Wc,-Wall -Wc,-Wno-parentheses -DNTO \
|
||||
-D_QNX_SOURCE -DHAVE_POINTER_LOCALTIME_R -shared
|
||||
|
||||
COMPILER_TAG = _qcc
|
||||
MKSHLIB = qcc -Vgcc_ntox86 -shared -Wl,-h$(@:$(OBJDIR)/%.so=%.so) -g2 -M
|
||||
|
||||
RANLIB = ranlib
|
||||
G++INCLUDES =
|
||||
OS_LIBS =
|
||||
XLDOPTS =
|
||||
EXTRA_LIBS = -lsocket
|
||||
|
||||
ifdef USE_PTHREADS
|
||||
IMPL_STRATEGY = _PTH
|
||||
ifdef BUILD_OPT
|
||||
OPTIMIZER = -O2
|
||||
else
|
||||
IMPL_STRATEGY = _EMU
|
||||
OPTIMIZER = -O2 -gdwarf-2
|
||||
endif
|
||||
|
||||
NOSUCHFILE = /no-such-file
|
||||
|
||||
GARBAGE = $(wildcard *.err)
|
||||
GARBAGE += *.map
|
||||
|
||||
|
|
|
@ -57,6 +57,10 @@ endif
|
|||
ifeq ($(OS_ARCH),NCR)
|
||||
OS_RELEASE := $(shell awk '{print $$3}' /etc/.relid | sed 's/^\([0-9]\)\(.\)\(..\)\(.*\)$$/\2.\3/')
|
||||
endif
|
||||
ifeq ($(OS_ARCH),procnto)
|
||||
OS_ARCH := NTO
|
||||
OS_RELEASE := _$(OS_TEST)$(OS_RELEASE)
|
||||
endif
|
||||
ifeq ($(OS_ARCH),UNIX_System_V)
|
||||
OS_ARCH := NEC
|
||||
endif
|
||||
|
|
|
@ -43,6 +43,8 @@
|
|||
#define HAVE_FCNTL_FILE_LOCKING
|
||||
#define _PR_NO_LARGE_FILES
|
||||
#define _PR_STAT_HAS_ONLY_ST_ATIME
|
||||
#define PR_HAVE_POSIX_NAMED_SHARED_MEMORY
|
||||
#define _PR_HAVE_POSIX_SEMAPHORES
|
||||
|
||||
#include <sys/select.h>
|
||||
|
||||
|
|
|
@ -199,6 +199,9 @@ endif
|
|||
ifeq ($(OS_ARCH),DGUX)
|
||||
CSRCS += $(DGUX_CSRCS)
|
||||
endif
|
||||
ifeq ($(OS_ARCH),NTO)
|
||||
CSRCS += $(NTO_CSRCS)
|
||||
endif
|
||||
ifeq ($(OS_ARCH),QNX)
|
||||
ifeq ($(OS_TARGET),NTO)
|
||||
CSRCS += $(NTO_CSRCS)
|
||||
|
|
|
@ -98,6 +98,24 @@ GetHighResClock(void *buf, size_t maxbytes)
|
|||
return _pr_CopyLowBits(buf, maxbytes, &t, sizeof(t));
|
||||
}
|
||||
|
||||
#elif defined(VMS)
|
||||
|
||||
#include <ints.h>
|
||||
|
||||
/*
|
||||
* Use the "get the cycle counter" instruction on the alpha.
|
||||
* The low 32 bits completely turn over in less than a minute.
|
||||
* The high 32 bits are some non-counter gunk that changes sometimes.
|
||||
*/
|
||||
static size_t
|
||||
GetHighResClock(void *buf, size_t maxbytes)
|
||||
{
|
||||
uint64 t;
|
||||
|
||||
t = __RPCC();
|
||||
return _pr_CopyLowBits(buf, maxbytes, &t, sizeof(t));
|
||||
}
|
||||
|
||||
#elif defined(AIX)
|
||||
|
||||
static size_t
|
||||
|
@ -278,7 +296,7 @@ GetHighResClock(void *buf, size_t maxbytes)
|
|||
{
|
||||
return 0;
|
||||
}
|
||||
#elif defined(SCO) || defined(UNIXWARE) || defined(BSDI)
|
||||
#elif defined(SCO) || defined(UNIXWARE) || defined(BSDI) || defined(NTO) || defined(QNX)
|
||||
#include <sys/times.h>
|
||||
|
||||
static size_t
|
||||
|
@ -291,7 +309,7 @@ GetHighResClock(void *buf, size_t maxbytes)
|
|||
return _pr_CopyLowBits(buf, maxbytes, &ticks, sizeof(ticks));
|
||||
}
|
||||
#else
|
||||
error! Platform undefined
|
||||
#error! Platform undefined
|
||||
#endif /* defined(SOLARIS) */
|
||||
|
||||
extern PRSize _PR_MD_GetRandomNoise( void *buf, PRSize size )
|
||||
|
|
|
@ -416,7 +416,11 @@ else
|
|||
ifeq ($(OS_ARCH),BSD_OS)
|
||||
LIBPTHREAD =
|
||||
else
|
||||
LIBPTHREAD = -lpthread
|
||||
ifeq ($(OS_ARCH),NTO)
|
||||
LIBPTHREAD =
|
||||
else
|
||||
LIBPTHREAD = -lpthread
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
|
Загрузка…
Ссылка в новой задаче