summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsrinivas%netscape.com <devnull@localhost>1999-05-12 00:47:36 +0000
committersrinivas%netscape.com <devnull@localhost>1999-05-12 00:47:36 +0000
commitd2ce4ea949182d8cb38a493f1998c35c38416d10 (patch)
treebfcba1857845d75fef8f9fe9fcb915189dcded97
parentd47a6ac41046fe767a3c3453f15c39d0311d8420 (diff)
downloadnspr-hg-d2ce4ea949182d8cb38a493f1998c35c38416d10.tar.gz
Port to OpenVMS.
Checkin for "Colin R. Blake" <colin@theblakes.com>.
-rw-r--r--config/Makefile3
-rw-r--r--config/arch.mk5
-rw-r--r--config/now.c12
-rw-r--r--config/nsinstall.c4
-rw-r--r--pr/include/md/Makefile13
5 files changed, 34 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
diff --git a/pr/include/md/Makefile b/pr/include/md/Makefile
index e4291e0f..684ceaa0 100644
--- a/pr/include/md/Makefile
+++ b/pr/include/md/Makefile
@@ -67,6 +67,10 @@ ifeq ($(OS_ARCH),OpenBSD)
MDCPUCFG_H = _openbsd.cfg
endif
+ifeq ($(OS_ARCH),OpenVMS)
+MDCPUCFG_H = _openvms.cfg
+endif
+
ifeq ($(OS_ARCH),NetBSD)
MDCPUCFG_H = _netbsd.cfg
endif
@@ -150,6 +154,15 @@ ifeq ($(MOZ_BITS),16)
else
mv -f $(DIST)/include/$(MDCPUCFG_H) $(DIST)/include/prcpucfg.h
endif
+ifeq ($(OS_ARCH),OpenVMS)
+# mv'ing a link causes the file itself to move, not the link, so fix it.
+ rm -f $(DIST)/include/$(MDCPUCFG_H)
+ if [ ! -L $(DIST)/include/prcpucfg.h ]; then \
+ mv -f $(DIST)/include/prcpucfg.h $(MDCPUCFG_H); \
+ ln -fs $(MOD_DEPTH)/nsprpub/pr/include/md/$(MDCPUCFG_H) \
+ $(DIST)/include/prcpucfg.h; \
+ fi
+endif
release:: export
@echo "Copying machine-dependent prcpucfg.h"