summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwtc <devnull@localhost>1998-04-22 22:10:37 +0000
committerwtc <devnull@localhost>1998-04-22 22:10:37 +0000
commit238caaecf6b62fdc9ec1cb0f8e7b395a63dbc9ff (patch)
tree85f2f12084f1a08c8267cd2769da47dffaee6532
parent119b636c5da44fdd49b80c2f8be49e5d5c91fa90 (diff)
downloadnspr-hg-238caaecf6b62fdc9ec1cb0f8e7b395a63dbc9ff.tar.gz
Fixed build problems on BSD/OS. Some makefiles need to change:
the value of OS_ARCH is changed from BSD_386 to BSD_OS. In unix.c, we now conditionalize on the macros O_SYNC and O_FSYNC, as opposed to the platform macros like FREEBSD and BSDI. We acknowledge jason@ackley.net for reporting and providing a fix for this problem.
-rw-r--r--lib/msgc/tests/Makefile2
-rw-r--r--pr/include/md/Makefile2
-rw-r--r--pr/src/md/unix/Makefile4
-rw-r--r--pr/src/md/unix/objs.mk4
-rw-r--r--pr/src/md/unix/unix.c6
-rw-r--r--pr/tests/Makefile2
6 files changed, 11 insertions, 9 deletions
diff --git a/lib/msgc/tests/Makefile b/lib/msgc/tests/Makefile
index d4512540..3c02cca4 100644
--- a/lib/msgc/tests/Makefile
+++ b/lib/msgc/tests/Makefile
@@ -203,7 +203,7 @@ ifeq ($(OS_ARCH), UNIXWARE)
export LD_RUN_PATH = $(PWD)/$(DIST)/lib
endif
-ifeq ($(OS_ARCH),BSD_386)
+ifeq ($(OS_ARCH),BSD_OS)
EXTRA_LIBS = -ldl
endif
diff --git a/pr/include/md/Makefile b/pr/include/md/Makefile
index fffd5de0..9d62722d 100644
--- a/pr/include/md/Makefile
+++ b/pr/include/md/Makefile
@@ -47,7 +47,7 @@ ifeq ($(OS_ARCH),AIX)
MDCPUCFG_H = _aix.cfg
endif
-ifeq ($(OS_ARCH),BSD_386)
+ifeq ($(OS_ARCH),BSD_OS)
MDCPUCFG_H = _bsdi.cfg
endif
diff --git a/pr/src/md/unix/Makefile b/pr/src/md/unix/Makefile
index 1f09acbb..16a5e52b 100644
--- a/pr/src/md/unix/Makefile
+++ b/pr/src/md/unix/Makefile
@@ -119,7 +119,7 @@ endif
ifeq ($(OS_ARCH),FreeBSD)
CSRCS += $(FREEBSD_CSRCS)
endif
-ifeq ($(OS_ARCH),BSD_386)
+ifeq ($(OS_ARCH),BSD_OS)
CSRCS += $(BSDI_CSRCS)
endif
ifeq ($(OS_ARCH),HP-UX)
@@ -174,7 +174,7 @@ ifeq ($(OS_ARCH), ReliantUNIX)
ASFILES = os_$(OS_ARCH).s
endif
-ifeq ($(OS_ARCH)$(OS_RELEASE),BSD_3862.1)
+ifeq ($(OS_ARCH)$(OS_RELEASE),BSD_OS2.1)
ASFILES = os_BSD_386_2.s
endif
diff --git a/pr/src/md/unix/objs.mk b/pr/src/md/unix/objs.mk
index c7862b7f..e76e27d1 100644
--- a/pr/src/md/unix/objs.mk
+++ b/pr/src/md/unix/objs.mk
@@ -112,7 +112,7 @@ endif
ifeq ($(OS_ARCH),FreeBSD)
CSRCS += $(FREEBSD_CSRCS)
endif
-ifeq ($(OS_ARCH),BSD_386)
+ifeq ($(OS_ARCH),BSD_OS)
CSRCS += $(BSDI_CSRCS)
endif
ifeq ($(OS_ARCH),HP-UX)
@@ -167,7 +167,7 @@ ifeq ($(OS_ARCH), ReliantUNIX)
ASFILES = os_$(OS_ARCH).s
endif
-ifeq ($(OS_ARCH)$(OS_RELEASE),BSD_3862.1)
+ifeq ($(OS_ARCH)$(OS_RELEASE),BSD_OS2.1)
ASFILES = os_BSD_386_2.s
endif
diff --git a/pr/src/md/unix/unix.c b/pr/src/md/unix/unix.c
index 3fcd26d2..9c62e80d 100644
--- a/pr/src/md/unix/unix.c
+++ b/pr/src/md/unix/unix.c
@@ -2342,10 +2342,12 @@ PRInt32 _MD_open(const char *name, PRIntn flags, PRIntn mode)
if (flags & PR_TRUNCATE)
osflags |= O_TRUNC;
if (flags & PR_SYNC) {
-#if defined(FREEBSD)
+#if defined(O_SYNC)
+ osflags |= O_SYNC;
+#elif defined(O_FSYNC)
osflags |= O_FSYNC;
#else
- osflags |= O_SYNC;
+#error "Neither O_SYNC nor O_FSYNC is defined on this platform"
#endif
}
diff --git a/pr/tests/Makefile b/pr/tests/Makefile
index eb3d5dc9..296e5567 100644
--- a/pr/tests/Makefile
+++ b/pr/tests/Makefile
@@ -297,7 +297,7 @@ EXTRA_LIBS = -lc_r
endif
endif
-ifeq ($(OS_ARCH),BSD_386)
+ifeq ($(OS_ARCH),BSD_OS)
EXTRA_LIBS = -ldl
endif