summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Xfuncs.h6
-rw-r--r--Xos.h4
-rw-r--r--Xosdefs.h21
-rw-r--r--Xthreads.h5
4 files changed, 25 insertions, 11 deletions
diff --git a/Xfuncs.h b/Xfuncs.h
index 12a03ed..9fe8687 100644
--- a/Xfuncs.h
+++ b/Xfuncs.h
@@ -41,21 +41,23 @@ void bcopy();
void bzero();
int bcmp();
#else
-#if defined(SYSV) && !defined(SCO325) && !defined(sun)
+#if defined(SYSV) && !defined(__SCO__) && !defined(sun) && !defined(__UNIXWARE__)
#include <memory.h>
void bcopy();
#define bzero(b,len) memset(b, 0, len)
#define bcmp(b1,b2,len) memcmp(b1, b2, len)
#else
#include <string.h>
-#if defined(SCO325) || defined(sun)
+#if defined(__SCO__) || defined(sun) || defined(__UNIXWARE__)
#include <strings.h>
#endif
#define _XFUNCS_H_INCLUDED_STRING_H
+#if defined(sun)
#define bcopy(b1,b2,len) memmove(b2, b1, (size_t)(len))
#define bzero(b,len) memset(b, 0, (size_t)(len))
#define bcmp(b1,b2,len) memcmp(b1, b2, (size_t)(len))
#endif
+#endif
#endif /* X_USEBFUNCS */
/* the new Xfuncs.h */
diff --git a/Xos.h b/Xos.h
index e051016..94fe58c 100644
--- a/Xos.h
+++ b/Xos.h
@@ -62,7 +62,7 @@ in this Software without prior written authorization from The Open Group.
#endif /* USG */
#ifndef sgi
-#if defined(SCO325) || defined(__USLC__)
+#if defined(__SCO__) || defined(__UNIXWARE__)
#include <stdint.h>
#endif
#endif
@@ -92,7 +92,7 @@ in this Software without prior written authorization from The Open Group.
#ifndef X_NOT_STDC_ENV
#include <string.h>
-#ifdef SCO325
+#if defined(__SCO__) || defined(__UNIXWARE__)
#include <strings.h>
#else
#if (defined(sun) && defined(__SVR4))
diff --git a/Xosdefs.h b/Xosdefs.h
index c192068..075d798 100644
--- a/Xosdefs.h
+++ b/Xosdefs.h
@@ -81,18 +81,16 @@ in this Software without prior written authorization from The Open Group.
#endif
#ifdef _SCO_DS
-#ifndef SCO
-#define SCO
-#endif
-#ifndef SCO325
-#define SCO325
+#ifndef __SCO__
+#define __SCO__
#endif
#endif
#ifdef i386
#ifdef SYSV
-#if !defined(ISC) && !defined(SCO) && !defined(_SEQUENT_) && !defined(sun)
-#if !defined(_POSIX_SOURCE) && !defined(_SCO_DS)
+#if !defined(ISC) && !defined(__SCO__) && !defined(_SEQUENT_) && \
+ !defined(__UNIXWARE__) && !defined(sun)
+#if !defined(_POSIX_SOURCE)
#define X_NOT_POSIX
#endif
#define X_NOT_STDC_ENV
@@ -148,6 +146,15 @@ in this Software without prior written authorization from The Open Group.
#endif
#endif
+#if defined(__SCO__) || defined(__UNIXWARE__)
+# ifndef PATH_MAX
+# define PATH_MAX 1024
+# endif
+# ifndef MAXPATHLEN
+# define MAXPATHLEN 1024
+# endif
+#endif
+
#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) \
|| defined(__Darwin__) || defined(__DragonFly__)
# ifndef CSRG_BASED
diff --git a/Xthreads.h b/Xthreads.h
index c1cb765..54b5440 100644
--- a/Xthreads.h
+++ b/Xthreads.h
@@ -70,7 +70,12 @@ typedef thread_t xthread_t;
typedef thread_key_t xthread_key_t;
typedef cond_t xcondition_rec;
typedef mutex_t xmutex_rec;
+#if defined(__UNIXWARE__)
+extern xthread_t (*_x11_thr_self)();
+#define xthread_self (_x11_thr_self)
+#else
#define xthread_self thr_self
+#endif
#define xthread_fork(func,closure) thr_create(NULL,0,func,closure,THR_NEW_LWP|THR_DETACHED,NULL)
#define xthread_yield() thr_yield()
#define xthread_exit(v) thr_exit(v)