summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkaleb <empty>1995-04-07 19:22:30 +0000
committerkaleb <empty>1995-04-07 19:22:30 +0000
commit023659f0b9ca9ae596537244cc342aaebbc845a1 (patch)
tree517599dc7c380bfb4d8ced62e14331b0f9ef2f2b
parent336910f78a86d3ad5e7c55a2e126129b55354c93 (diff)
XBUG 7336, AIX 4 support
-rw-r--r--xc/config/cf/ibm.cf4
-rw-r--r--xc/config/cf/ibmLib.rules4
-rw-r--r--xc/include/Xthreads.h29
-rw-r--r--xc/lib/X11/Xaixlcint.h8
-rw-r--r--xc/lib/X11/aixlcLoad.c14
-rw-r--r--xc/programs/twm/session.c4
6 files changed, 46 insertions, 17 deletions
diff --git a/xc/config/cf/ibm.cf b/xc/config/cf/ibm.cf
index 83965e80d..a40852778 100644
--- a/xc/config/cf/ibm.cf
+++ b/xc/config/cf/ibm.cf
@@ -1,4 +1,4 @@
-XCOMM platform: $XConsortium: ibm.cf,v 1.53 95/03/17 19:47:01 kaleb Exp gildea $
+XCOMM platform: $XConsortium: ibm.cf,v 1.54 95/03/17 20:53:33 gildea Exp kaleb $
#ifdef RsArchitecture
#ifndef OSName
@@ -43,7 +43,7 @@ XCOMM operating system: OSName
* #define HasPosixThreads NO
* in the BeforeVendorCF section of your site.def.
*/
-#if !defined(HasPosixThreads) && (OSMajorVersion > 3 || (OSMajorVersion == 3 && (OSMinorVersion > 2 || (OSMinorVersion == 2 && OSTeenyVersion > 4))))
+#if !defined(HasPosixThreads) && ((OSMajorVersion == 3 && (OSMinorVersion > 2 || (OSMinorVersion == 2 && OSTeenyVersion > 4))) || (OSMajorVersion == 4 && (OSMinorVersion > 1 || (OSMinorVersion == 1 && OSTeenyVersion > 1))))
#define HasPosixThreads YES
#endif
#if HasPosixThreads
diff --git a/xc/config/cf/ibmLib.rules b/xc/config/cf/ibmLib.rules
index 7e9005459..9b8305a7c 100644
--- a/xc/config/cf/ibmLib.rules
+++ b/xc/config/cf/ibmLib.rules
@@ -1,4 +1,4 @@
-XCOMM $XConsortium: ibmLib.rules,v 1.8 93/09/04 16:00:31 rws Exp $
+XCOMM $XConsortium: ibmLib.rules,v 1.9 93/12/24 11:28:07 rws Exp Kaleb $
/*
* AIX shared library rules
@@ -37,6 +37,7 @@ XCOMM $XConsortium: ibmLib.rules,v 1.8 93/09/04 16:00:31 rws Exp $
/*
* SharedLibReferences - variables for shared libraries
*/
+#if OSMajorVersion < 4
#ifndef SharedLibReferences
#define SharedLibReferences(varname,libname,libsource,revname,rev) @@\
Concat3(DEP,varname,LIB) = /**/ @@\
@@ -51,6 +52,7 @@ LintLibReferences(varname,libname,libsource)
#define SharedDSLibReferences(varname,libname,libsource,revname,rev) @@\
SharedLibReferences(varname,libname,libsource,revname,rev)
#endif
+#endif
/*
* InstallSharedLibrary - generate rules to install the shared library.
diff --git a/xc/include/Xthreads.h b/xc/include/Xthreads.h
index 502603386..7472b3625 100644
--- a/xc/include/Xthreads.h
+++ b/xc/include/Xthreads.h
@@ -1,5 +1,5 @@
/*
- * $XConsortium: Xthreads.h,v 1.16 94/03/24 14:45:27 gildea Exp $
+ * $XConsortium: Xthreads.h,v 1.17 94/04/17 20:10:54 gildea Exp kaleb $
*
*
Copyright (c) 1993 X Consortium
@@ -152,19 +152,40 @@ extern struct _xthread_waiter *_Xthread_waiter();
}
#else
#include <pthread.h>
+#ifdef AIXV3
+#ifndef _AIX32_THREADS
+#define POSIX_DRAFT7_THREADS
+#endif
+#endif
+/*
+ * The above would probably be better handled with an imake config
+ * variable, but since AIX 4.X seems to be the only platform implementing
+ * the draft 7 API, this will suffice for now. An imake config variable
+ * would also require changes to the Xlib and Xt Imakefiles to compile
+ * Xlib's locking.c and Xt's Threads.c, so this has less impact.
+ */
typedef pthread_t xthread_t;
typedef pthread_cond_t xcondition_rec;
typedef pthread_mutex_t xmutex_rec;
#define xthread_self pthread_self
-#define xthread_fork(func,closure) { pthread_t _tmpxthr; \
- pthread_create(&_tmpxthr,pthread_attr_default,func,closure); }
#define xthread_yield() pthread_yield()
#define xthread_exit(v) pthread_exit(v)
-#define xmutex_init(m) pthread_mutex_init(m, pthread_mutexattr_default)
#define xmutex_clear(m) pthread_mutex_destroy(m)
#define xmutex_lock(m) pthread_mutex_lock(m)
#define xmutex_unlock(m) pthread_mutex_unlock(m)
+#ifndef POSIX_DRAFT7_THREADS
+#define xthread_fork(func,closure) { pthread_t _tmpxthr; \
+ pthread_create(&_tmpxthr,pthread_attr_default,func,closure); }
+#define xmutex_init(m) pthread_mutex_init(m, pthread_mutexattr_default)
#define xcondition_init(c) pthread_cond_init(c, pthread_condattr_default)
+#else /* POSIX_DRAFT7_THREADS */
+#define xthread_fork(func,closure) { pthread_t _tmpxthr; \
+ pthread_create(&_tmpxthr,&pthread_attr_default,func,closure); }
+#define xmutex_init(m) \
+ pthread_mutex_init(m, &pthread_mutexattr_default)
+#define xcondition_init(c) \
+ pthread_cond_init(c, &pthread_condattr_default)
+#endif /* POSIX_DRAFT7_THREADS */
#define xcondition_clear(c) pthread_cond_destroy(c)
#define xcondition_wait(c,m) pthread_cond_wait(c,m)
#define xcondition_signal(c) pthread_cond_signal(c)
diff --git a/xc/lib/X11/Xaixlcint.h b/xc/lib/X11/Xaixlcint.h
index 21f01eacf..c923cfe4d 100644
--- a/xc/lib/X11/Xaixlcint.h
+++ b/xc/lib/X11/Xaixlcint.h
@@ -1,4 +1,4 @@
-/* $XConsortium: Xaixlcint.h,v 1.1 93/09/17 13:25:26 rws Exp $ */
+/* $XConsortium: Xaixlcint.h,v 1.2 94/01/20 18:02:13 rws Exp Kaleb $ */
/*
*
* Copyright IBM Corporation 1993
@@ -45,4 +45,10 @@ typedef struct _LC_core_ldx_t {
Bool sticky;
} _XlcCoreObjRec, *_XlcCoreObj;
+#if _LC_VERSION < 0x40000000
+#define __type_id type_id
+#define __magic magic
+#define __version version
+#endif
+
#endif /*_Xaixlcint_h*/
diff --git a/xc/lib/X11/aixlcLoad.c b/xc/lib/X11/aixlcLoad.c
index c7115104e..0a28f806c 100644
--- a/xc/lib/X11/aixlcLoad.c
+++ b/xc/lib/X11/aixlcLoad.c
@@ -1,4 +1,4 @@
-/* $XConsortium: aixlcLoad.c,v 1.4 93/12/09 15:02:19 kaleb Exp $ */
+/* $XConsortium: aixlcLoad.c,v 1.5 94/01/20 18:03:37 rws Exp Kaleb $ */
/*
*
* Copyright IBM Corporation 1993
@@ -229,15 +229,15 @@ get_ldxversion(ldx)
return LDX_INVALID_VERSION;
}
- if(ldx->lc_object_header.type_id == _LC_LDX_R6 &&
- ldx->lc_object_header.magic == _LC_MAGIC &&
- ldx->lc_object_header.version == _LC_VERSION_R6){
+ if(ldx->lc_object_header.__type_id == _LC_LDX_R6 &&
+ ldx->lc_object_header.__magic == _LC_MAGIC &&
+ ldx->lc_object_header.__version == _LC_VERSION_R6){
return LDX_R6;
}
- if(ldx->lc_object_header.type_id == _LC_LDX &&
- ldx->lc_object_header.magic == _LC_MAGIC &&
- ldx->lc_object_header.version == _LC_VERSION){
+ if(ldx->lc_object_header.__type_id == _LC_LDX &&
+ ldx->lc_object_header.__magic == _LC_MAGIC &&
+ ldx->lc_object_header.__version == _LC_VERSION){
return LDX_R5;
}
diff --git a/xc/programs/twm/session.c b/xc/programs/twm/session.c
index 997f70226..0e2ea9082 100644
--- a/xc/programs/twm/session.c
+++ b/xc/programs/twm/session.c
@@ -1,4 +1,4 @@
-/* $XConsortium: session.c,v 1.17 94/12/30 15:48:31 mor Exp mor $ */
+/* $XConsortium: session.c,v 1.18 95/01/04 22:28:37 mor Exp Kaleb $ */
/******************************************************************************
Copyright (c) 1994 X Consortium
@@ -27,7 +27,7 @@ in this Software without prior written authorization from the X Consortium.
Author: Ralph Mor, X Consortium
******************************************************************************/
-#include <X11/Xosdefs.h>
+#include <X11/Xos.h>
#ifndef X_NOT_POSIX
#ifdef _POSIX_SOURCE