Checked in DG/UX port contributed by Marc Fraioli <fraioli@dg-rtp.dg.com>.
authorwtc%netscape.com
Tue, 11 Aug 1998 22:29:48 +0000
changeset 209 c6f8b24be891fe3dc1960a214ead27b58c5e4681
parent 206 f2a1375de80c8d157f608e30dac48a2f1e6f1599
child 210 f1af7a6b4e6be8965ba7f6052081622df7d3959b
push idunknown
push userunknown
push dateunknown
Checked in DG/UX port contributed by Marc Fraioli <fraioli@dg-rtp.dg.com>. New files: dgux.mk, _dgux.cfg, _dgux.h, and dgux.c. Files changed: lib/msgc/tests/Makefile, pr/include/md/Makefile, _unixos.h, prosdep.h, prsocket.c, pr/src/md/unix/Makefile, pr/src/md/unix/objs.mk, unix.c.
config/dgux.mk
lib/msgc/tests/Makefile
pr/include/md/Makefile
pr/include/md/_dgux.cfg
pr/include/md/_dgux.h
pr/include/md/_unixos.h
pr/include/md/prosdep.h
pr/src/io/prsocket.c
pr/src/md/unix/Makefile
pr/src/md/unix/dgux.c
pr/src/md/unix/objs.mk
pr/src/md/unix/unix.c
new file mode 100644
--- /dev/null
+++ b/config/dgux.mk
@@ -0,0 +1,42 @@
+#
+# The contents of this file are subject to the Netscape Public License
+# Version 1.0 (the "NPL"); you may not use this file except in
+# compliance with the NPL.  You may obtain a copy of the NPL at
+# http://www.mozilla.org/NPL/
+# 
+# Software distributed under the NPL is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
+# for the specific language governing rights and limitations under the
+# NPL.
+# 
+# The Initial Developer of this code under the NPL is Netscape
+# Communications Corporation.  Portions created by Netscape are
+# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
+# Reserved.
+#
+
+#
+# Config stuff for Data General DG/UX
+#
+# Initial DG/UX port by Marc Fraioli <fraioli@dg-rtp.dg.com>
+#
+
+include $(MOD_DEPTH)/config/UNIX.mk
+
+CC		= gcc
+CCC		= g++
+
+RANLIB		= true
+
+DEFINES		+= -D_PR_LOCAL_THREADS_ONLY 
+OS_CFLAGS	= -DSVR4 -DSYSV -DDGUX -D_DGUX_SOURCE -D_POSIX4A_DRAFT6_SOURCE 
+
+MKSHLIB		= $(LD) $(DSO_LDOPTS)
+DSO_LDOPTS	= -G 
+
+CPU_ARCH	= x86
+ARCH		= dgux
+
+NOSUCHFILE	= /no-such-file
+
+OPTIMIZER	=
--- a/lib/msgc/tests/Makefile
+++ b/lib/msgc/tests/Makefile
@@ -207,16 +207,20 @@ endif
 ifeq ($(OS_ARCH), UNIXWARE)
 export LD_RUN_PATH = $(PWD)/$(DIST)/lib
 endif
 
 ifeq ($(OS_ARCH),BSD_OS)
 EXTRA_LIBS = -ldl
 endif
 
+ifeq ($(OS_ARCH),dgux)
+EXTRA_LIBS = -lsocket -lnsl -ldl
+endif
+
 #####################################################
 #
 # The rules
 #
 #####################################################
 
 include $(MOD_DEPTH)/config/rules.mk
 
--- a/pr/include/md/Makefile
+++ b/pr/include/md/Makefile
@@ -102,16 +102,20 @@ endif
 ifeq ($(OS_ARCH),UNIXWARE)
 MDCPUCFG_H = _unixware.cfg
 endif
 
 ifeq ($(OS_ARCH),NCR)
 MDCPUCFG_H = _ncr.cfg
 endif
 
+ifeq ($(OS_ARCH),dgux)
+MDCPUCFG_H = _dgux.cfg
+endif
+
 export:: $(HEADERS) $(MDCPUCFG_H)
 	$(INSTALL) -m 444 $(HEADERS) $(DIST)/include/md
 	$(INSTALL) -m 444 $(MDCPUCFG_H) $(DIST)/include
 ifeq ($(MOZ_BITS),16)
 	cp $(DIST)/include/$(MDCPUCFG_H) $(DIST)/include/prcpucfg.h
 	$(INSTALL) -m 444 $(HEADERS) $(MOZ_INCL)/md
 	$(INSTALL) -m 444 $(MDCPUCFG_H) $(MOZ_INCL)
 	mv -f $(DIST)/include/$(MDCPUCFG_H) $(MOZ_INCL)/prcpucfg.h
new file mode 100644
--- /dev/null
+++ b/pr/include/md/_dgux.cfg
@@ -0,0 +1,121 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/*
+ * The contents of this file are subject to the Netscape Public License
+ * Version 1.0 (the "NPL"); you may not use this file except in
+ * compliance with the NPL.  You may obtain a copy of the NPL at
+ * http://www.mozilla.org/NPL/
+ * 
+ * Software distributed under the NPL is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
+ * for the specific language governing rights and limitations under the
+ * NPL.
+ * 
+ * The Initial Developer of this code under the NPL is Netscape
+ * Communications Corporation.  Portions created by Netscape are
+ * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
+ * Reserved.
+ */
+
+#ifndef nspr_cpucfg___
+#define nspr_cpucfg___
+
+#ifndef XP_UNIX
+#define XP_UNIX
+#endif
+
+#ifndef DGUX
+#define DGUX
+#endif
+
+#define IS_LITTLE_ENDIAN 1
+#undef  IS_BIG_ENDIAN
+#undef	HAVE_ALIGNED_DOUBLES
+#undef	HAVE_ALIGNED_LONGLONGS
+
+#define PR_BYTES_PER_BYTE   1
+#define PR_BYTES_PER_SHORT  2
+#define PR_BYTES_PER_INT    4
+#define PR_BYTES_PER_INT64  8
+#define PR_BYTES_PER_LONG   4
+#define PR_BYTES_PER_FLOAT  4
+#define PR_BYTES_PER_DOUBLE 8
+#define PR_BYTES_PER_WORD   4
+#define PR_BYTES_PER_DWORD  8
+#define PR_BYTES_PER_WORD_LOG2   2
+#define PR_BYTES_PER_DWORD_LOG2  3
+
+#define PR_BITS_PER_BYTE    8
+#define PR_BITS_PER_SHORT   16
+#define PR_BITS_PER_INT     32
+#define PR_BITS_PER_INT64   64
+#define PR_BITS_PER_LONG    32
+#define PR_BITS_PER_FLOAT   32
+#define PR_BITS_PER_DOUBLE  64
+#define PR_BITS_PER_WORD    32
+
+#define PR_BITS_PER_BYTE_LOG2   3
+#define PR_BITS_PER_SHORT_LOG2  4
+#define PR_BITS_PER_INT_LOG2    5
+#define PR_BITS_PER_INT64_LOG2  6
+#define PR_BITS_PER_LONG_LOG2   5
+#define PR_BITS_PER_FLOAT_LOG2  5
+#define PR_BITS_PER_DOUBLE_LOG2 6
+#define PR_BITS_PER_WORD_LOG2   5
+
+#define PR_ALIGN_OF_SHORT   2
+#define PR_ALIGN_OF_INT     4
+#define PR_ALIGN_OF_LONG    4
+#define PR_ALIGN_OF_INT64   4
+#define PR_ALIGN_OF_FLOAT   4
+#define PR_ALIGN_OF_DOUBLE  4
+#define PR_ALIGN_OF_POINTER 4
+
+#define _PR_USE_POLL
+#define _PR_POLL_AVAILABLE
+
+#ifndef NO_NSPR_10_SUPPORT
+
+#define BYTES_PER_BYTE		PR_BYTES_PER_BYTE
+#define BYTES_PER_SHORT 	PR_BYTES_PER_SHORT
+#define BYTES_PER_INT 		PR_BYTES_PER_INT
+#define BYTES_PER_INT64		PR_BYTES_PER_INT64
+#define BYTES_PER_LONG		PR_BYTES_PER_LONG
+#define BYTES_PER_FLOAT		PR_BYTES_PER_FLOAT
+#define BYTES_PER_DOUBLE	PR_BYTES_PER_DOUBLE
+#define BYTES_PER_WORD		PR_BYTES_PER_WORD
+#define BYTES_PER_DWORD		PR_BYTES_PER_DWORD
+
+#define BITS_PER_BYTE		PR_BITS_PER_BYTE
+#define BITS_PER_SHORT		PR_BITS_PER_SHORT
+#define BITS_PER_INT		PR_BITS_PER_INT
+#define BITS_PER_INT64		PR_BITS_PER_INT64
+#define BITS_PER_LONG		PR_BITS_PER_LONG
+#define BITS_PER_FLOAT		PR_BITS_PER_FLOAT
+#define BITS_PER_DOUBLE		PR_BITS_PER_DOUBLE
+#define BITS_PER_WORD		PR_BITS_PER_WORD
+
+#define BITS_PER_BYTE_LOG2	PR_BITS_PER_BYTE_LOG2
+#define BITS_PER_SHORT_LOG2	PR_BITS_PER_SHORT_LOG2
+#define BITS_PER_INT_LOG2	PR_BITS_PER_INT_LOG2
+#define BITS_PER_INT64_LOG2	PR_BITS_PER_INT64_LOG2
+#define BITS_PER_LONG_LOG2	PR_BITS_PER_LONG_LOG2
+#define BITS_PER_FLOAT_LOG2	PR_BITS_PER_FLOAT_LOG2
+#define BITS_PER_DOUBLE_LOG2 	PR_BITS_PER_DOUBLE_LOG2
+#define BITS_PER_WORD_LOG2	PR_BITS_PER_WORD_LOG2
+
+#define ALIGN_OF_SHORT		PR_ALIGN_OF_SHORT
+#define ALIGN_OF_INT		PR_ALIGN_OF_INT
+#define ALIGN_OF_LONG		PR_ALIGN_OF_LONG
+#define ALIGN_OF_INT64		PR_ALIGN_OF_INT64
+#define ALIGN_OF_FLOAT		PR_ALIGN_OF_FLOAT
+#define ALIGN_OF_DOUBLE		PR_ALIGN_OF_DOUBLE
+#define ALIGN_OF_POINTER	PR_ALIGN_OF_POINTER
+#define ALIGN_OF_WORD		PR_ALIGN_OF_WORD
+
+#define BYTES_PER_WORD_LOG2	PR_BYTES_PER_WORD_LOG2
+#define BYTES_PER_DWORD_LOG2	PR_BYTES_PER_DWORD_LOG2
+#define WORDS_PER_DWORD_LOG2	PR_WORDS_PER_DWORD_LOG2
+
+#endif /* NO_NSPR_10_SUPPORT */
+
+#endif /* nspr_cpucfg___ */
new file mode 100644
--- /dev/null
+++ b/pr/include/md/_dgux.h
@@ -0,0 +1,162 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/*
+ * The contents of this file are subject to the Netscape Public License
+ * Version 1.0 (the "NPL"); you may not use this file except in
+ * compliance with the NPL.  You may obtain a copy of the NPL at
+ * http://www.mozilla.org/NPL/
+ * 
+ * Software distributed under the NPL is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
+ * for the specific language governing rights and limitations under the
+ * NPL.
+ * 
+ * The Initial Developer of this code under the NPL is Netscape
+ * Communications Corporation.  Portions created by Netscape are
+ * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
+ * Reserved.
+ */
+
+#ifndef nspr_dgux_defs_h___
+#define nspr_dgux_defs_h___
+
+/*
+ * Internal configuration macros
+ */
+
+#define PR_LINKER_ARCH	"dgux"
+#define _PR_SI_SYSNAME		"DGUX"
+#define _PR_SI_ARCHITECTURE	"x86"
+#define PR_DLL_SUFFIX		".so"
+
+#define _PR_VMBASE	 	0x30000000
+#define _PR_STACK_VMBASE	0x50000000
+#define _MD_DEFAULT_STACK_SIZE	65536L
+#define _MD_MMAP_FLAGS          MAP_PRIVATE
+
+#ifndef	HAVE_WEAK_IO_SYMBOLS
+#define	HAVE_WEAK_IO_SYMBOLS
+#endif
+
+#undef  HAVE_STACK_GROWING_UP
+#define HAVE_NETCONFIG
+#define	HAVE_DLL
+#define	USE_DLFCN
+#define NEED_STRFTIME_LOCK
+#define NEED_TIME_R
+#define _PR_NEED_STRCASECMP
+
+#define USE_SETJMP
+
+#include <setjmp.h>
+
+#define _SETJMP setjmp
+#define _LONGJMP longjmp
+#define _PR_CONTEXT_TYPE         jmp_buf
+#define _MD_GET_SP(_t)           (_t)->md.context[4]
+#define _PR_NUM_GCREGS	_JBLEN
+
+#define CONTEXT(_th) ((_th)->md.context)
+
+/*
+** Initialize the thread context preparing it to execute _main.
+*/
+#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \
+{								  \
+    *status = PR_TRUE; \
+    if(_SETJMP(CONTEXT(_thread))) (*_main)(); \
+    _MD_GET_SP(_thread) = (int) ((_sp) - 128); \
+}
+
+#define _MD_SWITCH_CONTEXT(_thread)  \
+    if (!_SETJMP(CONTEXT(_thread))) { \
+	(_thread)->md.errcode = errno;  \
+	_PR_Schedule();		     \
+    }
+
+/*
+** Restore a thread context, saved by _MD_SWITCH_CONTEXT
+*/
+#define _MD_RESTORE_CONTEXT(_thread) \
+{				     \
+    errno = (_thread)->md.errcode;	     \
+    _MD_SET_CURRENT_THREAD(_thread); \
+    _LONGJMP(CONTEXT(_thread), 1);    \
+}
+
+/* Machine-dependent (MD) data structures.
+ * Don't use SVR4 native threads (yet). 
+ */
+
+struct _MDThread {
+    _PR_CONTEXT_TYPE context;
+    int id;
+    int errcode;
+};
+
+struct _MDThreadStack {
+    PRInt8 notused;
+};
+
+struct _MDLock {
+    PRInt8 notused;
+};
+
+struct _MDSemaphore {
+    PRInt8 notused;
+};
+
+struct _MDCVar {
+    PRInt8 notused;
+};
+
+struct _MDSegment {
+    PRInt8 notused;
+};
+
+struct _MDCPU {
+	struct _MDCPU_Unix md_unix;
+};
+
+#define _MD_INIT_LOCKS()
+#define _MD_NEW_LOCK(lock) PR_SUCCESS
+#define _MD_FREE_LOCK(lock)
+#define _MD_LOCK(lock)
+#define _MD_UNLOCK(lock)
+#define _MD_INIT_IO()
+#define _MD_IOQ_LOCK()
+#define _MD_IOQ_UNLOCK()
+
+/*
+ * The following are copied from _sunos.h, _aix.h.  This means
+ * some of them should probably be moved into _unixos.h.  But
+ * _irix.h seems to be quite different in regard to these macros.
+ */
+#define _MD_GET_INTERVAL                  _PR_UNIX_GetInterval
+#define _MD_INTERVAL_PER_SEC              _PR_UNIX_TicksPerSecond
+
+#define _MD_EARLY_INIT		_MD_EarlyInit
+#define _MD_FINAL_INIT		_PR_UnixInit
+#define _MD_INIT_RUNNING_CPU(cpu) _MD_unix_init_running_cpu(cpu)
+#define _MD_INIT_THREAD         _MD_InitializeThread
+#define _MD_EXIT_THREAD(thread)
+#define	_MD_SUSPEND_THREAD(thread)
+#define	_MD_RESUME_THREAD(thread)
+#define _MD_CLEAN_THREAD(_thread)
+
+/*
+ * We wrapped the select() call.  _MD_SELECT refers to the built-in,
+ * unwrapped version.
+ */
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/time.h>
+extern int _select(int nfds, fd_set *readfds, fd_set *writefds,
+	fd_set *execptfds, struct timeval *timeout);
+#define _MD_SELECT _select
+
+#define _MD_POLL _poll
+#include <poll.h>
+#include <stropts.h>
+extern int _poll(struct pollfd *fds, unsigned long nfds, int timeout);
+
+#endif /* nspr_dgux_defs_h___ */
--- a/pr/include/md/_unixos.h
+++ b/pr/include/md/_unixos.h
@@ -45,17 +45,17 @@
 /* To pick up fd_set */
 #if defined(HPUX)
 #include <sys/time.h>
 #elif defined(OSF1) || defined(AIX) || defined(SOLARIS) || defined(IRIX) \
         || defined(UNIXWARE) || defined(NCR) || defined(SNI) || defined(NEC) \
         || defined(BSDI) || defined(SONY)
 #include <sys/select.h>
 #elif defined(SUNOS4) || defined(SCO) || defined(FREEBSD) \
-        || defined(NETBSD) || defined(RHAPSODY)
+        || defined(NETBSD) || defined(RHAPSODY) || defined(DGUX)
 #include <sys/types.h>
 #elif defined(LINUX)
 #include <sys/time.h>
 #include <sys/types.h>
 #else
 #error Find out what include file defines fd_set on this platform
 #endif
 
--- a/pr/include/md/prosdep.h
+++ b/pr/include/md/prosdep.h
@@ -99,16 +99,19 @@ PR_BEGIN_EXTERN_C
 #include "md/_scoos.h"
 
 #elif defined(UNIXWARE)
 #include "md/_unixware.h"
 
 #elif defined(NCR)
 #include "md/_ncr.h"
 
+#elif defined(DGUX)
+#include "md/_dgux.h"
+
 #else
 #error unknown Unix flavor
 
 #endif
 
 #else
 
 #error "The platform is not Unix, Windows, or Mac"
--- a/pr/src/io/prsocket.c
+++ b/pr/src/io/prsocket.c
@@ -13,26 +13,18 @@
  * The Initial Developer of this code under the NPL is Netscape
  * Communications Corporation.  Portions created by Netscape are
  * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
  * Reserved.
  */
 
 #include "primpl.h"
 
-#ifdef XP_UNIX
-#include <fcntl.h>
-#endif
 #include <string.h>
 
-#if defined(SVR4) || defined(SUNOS4)
-/* To pick up FIONREAD */
-#include <sys/filio.h>
-#endif
-
 /************************************************************************/
 
 /* These two functions are only used in assertions. */
 #if defined(DEBUG)
 
 static PRBool IsValidNetAddr(const PRNetAddr *addr)
 {
     if ((addr != NULL)
--- a/pr/src/md/unix/Makefile
+++ b/pr/src/md/unix/Makefile
@@ -100,16 +100,20 @@ SONY_CSRCS = \
 NCR_CSRCS = \
 	ncr.c \
 	$(NULL)
 
 SCOOS_CSRCS = \
 	scoos.c \
 	$(NULL)
 
+DGUX_CSRCS = \
+	dgux.c \
+	$(NULL)
+
 ifeq ($(PTHREADS_USER),1)
 CSRCS += $(PTH_USER_CSRCS)
 endif
 
 ifeq ($(OS_ARCH),IRIX)
 CSRCS += $(IRIX_CSRCS)
 endif
 
@@ -158,16 +162,19 @@ ifeq ($(OS_ARCH),NEWS-OS)
 CSRCS += $(SONY_CSRCS)
 endif
 ifeq ($(OS_ARCH),NCR)
 CSRCS += $(NCR_CSRCS)
 endif
 ifeq ($(OS_ARCH),SCOOS)
 CSRCS += $(SCOOS_CSRCS)
 endif
+ifeq ($(OS_ARCH),dgux)
+CSRCS += $(DGUX_CSRCS)
+endif
 
 #
 # Some Unix platforms have an assembly language file.
 # E.g., AIX 3.2, Solaris (both sparc and x86).
 #
 ifeq ($(OS_ARCH), AIX)
     ifeq ($(OS_RELEASE), 3.2)
 	ASFILES   = os_$(OS_ARCH).s
new file mode 100644
--- /dev/null
+++ b/pr/src/md/unix/dgux.c
@@ -0,0 +1,90 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/*
+ * The contents of this file are subject to the Netscape Public License
+ * Version 1.0 (the "NPL"); you may not use this file except in
+ * compliance with the NPL.  You may obtain a copy of the NPL at
+ * http://www.mozilla.org/NPL/
+ * 
+ * Software distributed under the NPL is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
+ * for the specific language governing rights and limitations under the
+ * NPL.
+ * 
+ * The Initial Developer of this code under the NPL is Netscape
+ * Communications Corporation.  Portions created by Netscape are
+ * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
+ * Reserved.
+ */
+
+#include "primpl.h"
+
+/*
+ * using only NSPR threads here
+ *
+ *  Copied from the UnixWare implementation.  Should be kept in sync
+ *  with ../../../include/md/_dgux.h.
+ */
+
+#include <setjmp.h>
+
+void _MD_EarlyInit(void)
+{
+}
+
+PRWord *_MD_HomeGCRegisters(PRThread *t, int isCurrent, int *np)
+{
+    if (isCurrent) {
+        (void) setjmp(CONTEXT(t));
+    }
+    *np = sizeof(CONTEXT(t)) / sizeof(PRWord);
+    return (PRWord *) CONTEXT(t);
+}
+
+void
+_MD_SET_PRIORITY(_MDThread *thread, PRUintn newPri)
+{
+    return;
+}
+
+PRStatus
+_MD_InitializeThread(PRThread *thread)
+{
+    return PR_SUCCESS;
+}
+
+PRStatus
+_MD_WAIT(PRThread *thread, PRIntervalTime ticks)
+{
+    PR_ASSERT(!(thread->flags & _PR_GLOBAL_SCOPE));
+    _PR_MD_SWITCH_CONTEXT(thread);
+    return PR_SUCCESS;
+}
+
+PRStatus
+_MD_WAKEUP_WAITER(PRThread *thread)
+{
+    if (thread) {
+        PR_ASSERT(!(thread->flags & _PR_GLOBAL_SCOPE));
+    }
+    return PR_SUCCESS;
+}
+
+/* These functions should not be called for DG/UX */
+void
+_MD_YIELD(void)
+{
+    PR_NOT_REACHED("_MD_YIELD should not be called for DG/UX.");
+}
+
+PRStatus
+_MD_CREATE_THREAD(
+    PRThread *thread,
+    void (*start) (void *),
+    PRThreadPriority priority,
+    PRThreadScope scope,
+    PRThreadState state,
+    PRUint32 stackSize)
+{
+    PR_NOT_REACHED("_MD_CREATE_THREAD should not be called for DG/UX.");
+}
+
--- a/pr/src/md/unix/objs.mk
+++ b/pr/src/md/unix/objs.mk
@@ -92,16 +92,20 @@ SONY_CSRCS = \
 NCR_CSRCS = \
 	ncr.c \
 	$(NULL)
 
 SCOOS_CSRCS = \
 	scoos.c \
 	$(NULL)
 
+DGUX_CSRCS = \
+	dgux.c \
+	$(NULL)
+
 
 ifeq ($(PTHREADS_USER),1)
 CSRCS += $(PTH_USER_CSRCS)
 endif
 
 ifeq ($(OS_ARCH),IRIX)
 CSRCS += $(IRIX_CSRCS)
 endif
@@ -151,16 +155,19 @@ ifeq ($(OS_ARCH),NEWS-OS)
 CSRCS += $(SONY_CSRCS)
 endif
 ifeq ($(OS_ARCH),NCR)
 CSRCS += $(NCR_CSRCS)
 endif
 ifeq ($(OS_ARCH),SCOOS)
 CSRCS += $(SCOOS_CSRCS)
 endif
+ifeq ($(OS_ARCH),dgux)
+CSRCS += $(DGUX_CSRCS)
+endif
  
 #
 # Some Unix platforms have an assembly language file.
 # E.g., AIX 3.2, Solaris (both sparc and x86).
 #
 ifeq ($(OS_ARCH), AIX)
     ifeq ($(OS_RELEASE), 3.2)
 	ASFILES   = os_$(OS_ARCH).s
--- a/pr/src/md/unix/unix.c
+++ b/pr/src/md/unix/unix.c
@@ -43,17 +43,17 @@
  * PRInt32* pointer to a _PRSockLen_t* pointer.
  */
 #if defined(IRIX) || defined(HPUX) || defined(OSF1) || defined(SOLARIS) \
     || defined(AIX4_1) || defined(LINUX) || defined(SONY) \
     || defined(BSDI) || defined(SCO) || defined(NEC) || defined(SNI) \
     || defined(SUNOS4) || defined(NCR) || defined(RHAPSODY)
 #define _PRSockLen_t int
 #elif (defined(AIX) && !defined(AIX4_1)) || defined(FREEBSD) \
-    || defined(NETBSD) || defined(UNIXWARE)
+    || defined(NETBSD) || defined(UNIXWARE) || defined(DGUX)
 #define _PRSockLen_t size_t
 #else
 #error "Cannot determine architecture"
 #endif
 
 /*
 ** Global lock variable used to bracket calls into rusty libraries that
 ** aren't thread safe (like libc, libX, etc).