diff options
author | srinivas%netscape.com <devnull@localhost> | 1999-05-12 00:47:36 +0000 |
---|---|---|
committer | srinivas%netscape.com <devnull@localhost> | 1999-05-12 00:47:36 +0000 |
commit | d2ce4ea949182d8cb38a493f1998c35c38416d10 (patch) | |
tree | bfcba1857845d75fef8f9fe9fcb915189dcded97 /config | |
parent | d47a6ac41046fe767a3c3453f15c39d0311d8420 (diff) | |
download | nspr-hg-d2ce4ea949182d8cb38a493f1998c35c38416d10.tar.gz |
Port to OpenVMS.
Checkin for "Colin R. Blake" <colin@theblakes.com>.
Diffstat (limited to 'config')
-rw-r--r-- | config/Makefile | 3 | ||||
-rw-r--r-- | config/arch.mk | 5 | ||||
-rw-r--r-- | config/now.c | 12 | ||||
-rw-r--r-- | config/nsinstall.c | 4 |
4 files changed, 21 insertions, 3 deletions
diff --git a/config/Makefile b/config/Makefile index 4b64fb6e..6a48ed63 100644 --- a/config/Makefile +++ b/config/Makefile @@ -19,6 +19,9 @@ MOD_DEPTH = .. +# Indicate that this directory builds build tools. +INTERNAL_TOOLS = 1 + include $(MOD_DEPTH)/config/config.mk CSRCS = nsinstall.c now.c diff --git a/config/arch.mk b/config/arch.mk index f38c1781..ee56c9c7 100644 --- a/config/arch.mk +++ b/config/arch.mk @@ -60,6 +60,11 @@ endif ifeq ($(OS_ARCH),UNIX_System_V) OS_ARCH := NEC endif +ifneq (,$(findstring POSIX_for_OpenVMS,$(OS_ARCH))) +OS_ARCH := OpenVMS +CPU_ARCH := $(shell uname -Wh) +OS_RELEASE := $(shell uname -v) +endif ifeq ($(OS_ARCH),QNX) OS_RELEASE := $(shell uname -v | sed 's/^\([0-9]\)\([0-9]*\)$$/\1.\2/') endif diff --git a/config/now.c b/config/now.c index 2515bd32..1a881acb 100644 --- a/config/now.c +++ b/config/now.c @@ -19,7 +19,9 @@ #include <stdio.h> #include <stdlib.h> -#if defined(XP_UNIX) || defined(XP_OS2_EMX) || defined(XP_BEOS) +#if defined(VMS) +#include <sys/timeb.h> +#elif defined(XP_UNIX) || defined(XP_OS2_EMX) || defined(XP_BEOS) #include <sys/time.h> #elif defined(WIN32) || defined(XP_OS2_VACPP) #include <sys/timeb.h> @@ -41,6 +43,14 @@ int main(int argc, char **argv) * of this program and omit the library build time * in PRVersionDescription. */ +#elif defined(VMS) + long long now; + struct timeb b; + ftime(&b); + now = b.time; + now *= 1000000; + now += (1000 * b.millitm); + fprintf(stdout, "%Ld", now); #elif defined(XP_UNIX) || defined(XP_OS2_EMX) || defined(XP_BEOS) long long now; struct timeval tv; diff --git a/config/nsinstall.c b/config/nsinstall.c index c86eba63..56d4d304 100644 --- a/config/nsinstall.c +++ b/config/nsinstall.c @@ -46,7 +46,7 @@ #if defined(AIX) || defined(BSDI) || defined(HPUX) || defined(LINUX) \ || defined(SUNOS4) || defined(SCO) || defined(UNIXWARE) \ || defined(RHAPSODY) || defined(NEXTSTEP) || defined(QNX) \ - || defined(BEOS) + || defined(BEOS) || defined(VMS) #undef HAVE_LCHOWN #endif @@ -60,7 +60,7 @@ * Does getcwd() take NULL as the first argument and malloc * the result buffer? */ -#if !defined(RHAPSODY) && !defined(NEXTSTEP) +#if !defined(RHAPSODY) && !defined(NEXTSTEP) && !defined(VMS) #define GETCWD_CAN_MALLOC #endif |