diff options
author | wtc%netscape.com <devnull@localhost> | 2002-12-10 20:27:45 +0000 |
---|---|---|
committer | wtc%netscape.com <devnull@localhost> | 2002-12-10 20:27:45 +0000 |
commit | 5637b0d7b13e29612f8287dac80347d3618f051f (patch) | |
tree | ac75936d57e1c55e47b342c6564e56483301bfff /security/coreconf | |
parent | 52f37a7c7c7d4cf90ade5a58d29e7f5ae1154fe7 (diff) | |
download | nss-hg-5637b0d7b13e29612f8287dac80347d3618f051f.tar.gz |
Bug 180294: moved the OpenVMS build from the POSIX subsystem to native
VMS (GNV). The patch is contributed by Colin Blakes <colin@theblakes.com>.
Modified files: OpenVMS.mk config.mk rules.mk nsinstall/nsinstall.c
Diffstat (limited to 'security/coreconf')
-rwxr-xr-x | security/coreconf/OpenVMS.mk | 23 | ||||
-rw-r--r-- | security/coreconf/config.mk | 3 | ||||
-rw-r--r-- | security/coreconf/nsinstall/nsinstall.c | 16 | ||||
-rw-r--r-- | security/coreconf/rules.mk | 8 |
4 files changed, 27 insertions, 23 deletions
diff --git a/security/coreconf/OpenVMS.mk b/security/coreconf/OpenVMS.mk index 8e9813b32..192a164c3 100755 --- a/security/coreconf/OpenVMS.mk +++ b/security/coreconf/OpenVMS.mk @@ -21,23 +21,15 @@ include $(CORE_DEPTH)/coreconf/UNIX.mk -ifdef INTERNAL_TOOLS -CC = c89 +CC = cc CCC = cxx -OPTIMIZER = -O -else -CC = ccc -CCC = ccc -endif -RANLIB = /bin/true +RANLIB = /gnu/bin/true CPU_ARCH := $(shell uname -Wh) -OS_CFLAGS = -DVMS -DVMS_AS_IS -Wc,names=\(short,as\) \ - -DGENERIC_PTHREAD_REDEFINES -DNO_UDSOCK -OS_CXXFLAGS = -DVMS -DVMS_AS_IS -Wc,names=\(short,as\) \ - -DGENERIC_PTHREAD_REDEFINES -DNO_UDSOCK +OS_CFLAGS = -DVMS +OS_CXXFLAGS = -DVMS # Maybe this should go into rules.mk or something? ifdef NSPR_INCLUDE_DIR @@ -52,13 +44,14 @@ endif # XCFLAGS += $(OPTIMIZER) -# The command to build a shared library in POSIX on OpenVMS. -MKSHLIB = vmsld_psm OBJDIR=$(OBJDIR) $(OPTIMIZER) +DSO_LDOPTS = -shared -auto_symvec +MKSHLIB = $(CC) $(OPTIMIZER) $(LDFLAGS) $(DSO_LDOPTS) + ifdef MAPFILE # Add LD options to restrict exported symbols to those in the map file endif # Change PROCESS to put the mapfile in the correct format for this platform -PROCESS_MAP_FILE = copy $(LIBRARY_NAME).def $@ +PROCESS_MAP_FILE = cp $(LIBRARY_NAME).def $@ # diff --git a/security/coreconf/config.mk b/security/coreconf/config.mk index 949d27ef6..1bb3962f4 100644 --- a/security/coreconf/config.mk +++ b/security/coreconf/config.mk @@ -58,7 +58,8 @@ endif # one for each OS release. # ####################################################################### -TARGET_OSES = FreeBSD BSD_OS NetBSD OpenUNIX OS2 QNX Darwin BeOS OpenBSD +TARGET_OSES = FreeBSD BSD_OS NetBSD OpenUNIX OS2 QNX Darwin BeOS OpenBSD \ + OpenVMS ifeq (,$(filter-out $(TARGET_OSES),$(OS_TARGET))) include $(CORE_DEPTH)/coreconf/$(OS_TARGET).mk diff --git a/security/coreconf/nsinstall/nsinstall.c b/security/coreconf/nsinstall/nsinstall.c index 0c9915926..b7b846903 100644 --- a/security/coreconf/nsinstall/nsinstall.c +++ b/security/coreconf/nsinstall/nsinstall.c @@ -403,6 +403,11 @@ retry: if (ftruncate(tofd, sb.st_size) < 0) fail("cannot truncate %s", toname); + /* + ** On OpenVMS we can't chmod() until the file is closed, and we + ** have to utime() last since fchown/chmod alter the timestamps. + */ +#ifndef VMS if (dotimes) { utb.actime = sb.st_atime; utb.modtime = sb.st_mtime; @@ -415,6 +420,7 @@ retry: if (chmod(toname, mode) < 0) #endif fail("cannot change mode of %s", toname); +#endif if ((owner || group) && fchown(tofd, uid, gid) < 0) fail("cannot change owner of %s", toname); @@ -422,6 +428,16 @@ retry: if (close(tofd) < 0) fail("close reports write error on %s", toname); close(fromfd); +#ifdef VMS + if (chmod(toname, mode) < 0) + fail("cannot change mode of %s", toname); + if (dotimes) { + utb.actime = sb.st_atime; + utb.modtime = sb.st_mtime; + if (utime(toname, &utb) < 0) + fail("cannot set times of %s", toname); + } +#endif } free(toname); diff --git a/security/coreconf/rules.mk b/security/coreconf/rules.mk index 4b4568790..84fc90eb5 100644 --- a/security/coreconf/rules.mk +++ b/security/coreconf/rules.mk @@ -110,9 +110,6 @@ ifdef LIBRARY endif ifdef SHARED_LIBRARY $(INSTALL) -m 775 $(SHARED_LIBRARY) $(SOURCE_LIB_DIR) -ifeq ($(OS_TARGET),OpenVMS) - $(INSTALL) -m 775 $(SHARED_LIBRARY:$(DLL_SUFFIX)=vms) $(SOURCE_LIB_DIR) -endif endif ifdef IMPORT_LIBRARY $(INSTALL) -m 775 $(IMPORT_LIBRARY) $(SOURCE_LIB_DIR) @@ -365,9 +362,6 @@ else $(MKSHLIB) -o $@ $(OBJS) $(SUB_SHLOBJS) $(LD_LIBS) $(EXTRA_LIBS) $(EXTRA_SHARED_LIBS) endif chmod +x $@ -ifeq ($(OS_TARGET),OpenVMS) - @echo "`translate $@`" > $(@:$(DLL_SUFFIX)=vms) -endif ifeq ($(OS_TARGET),Darwin) ifdef MAPFILE nmedit -s $(MAPFILE) $@ @@ -855,7 +849,7 @@ endif -include $(DEPENDENCIES) -ifneq (,$(filter-out OS2 WIN%,$(OS_TARGET))) +ifneq (,$(filter-out OpenVMS OS2 WIN%,$(OS_TARGET))) # Can't use sed because of its 4000-char line length limit, so resort to perl .DEFAULT: @perl -e ' \ |