summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaleb Keithley <kaleb@freedesktop.org>2003-11-25 19:28:01 +0000
committerKaleb Keithley <kaleb@freedesktop.org>2003-11-25 19:28:01 +0000
commit376f9efdab6ef2dce267caa0a0228892e768e390 (patch)
treed58ca14843514adcd7308067019ecf47adb553e7
parent5ec315b967cb1ae519f514896f0b48fb5407f863 (diff)
XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folksxf86-4_3_99_901xf86-4_3_99_16
-rw-r--r--X.h5
-rw-r--r--Xarch.h6
-rw-r--r--Xmd.h27
-rw-r--r--Xos.h4
-rw-r--r--Xos_r.h24
-rw-r--r--Xthreads.h34
6 files changed, 65 insertions, 35 deletions
diff --git a/X.h b/X.h
index ffeea80..30dd4a2 100644
--- a/X.h
+++ b/X.h
@@ -53,7 +53,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
-/* $XFree86: xc/include/X.h,v 1.5 2001/12/14 19:53:25 dawes Exp $ */
+/* $XFree86: xc/include/X.h,v 1.7 2003/07/18 15:53:24 tsi Exp $ */
#define X_PROTOCOL 11 /* current protocol version */
#define X_PROTOCOL_REVISION 0 /* current minor version */
@@ -299,9 +299,10 @@ are reserved in the protocol for errors and replies. */
/* protocol families */
-#define FamilyInternet 0
+#define FamilyInternet 0 /* IPv4 */
#define FamilyDECnet 1
#define FamilyChaos 2
+#define FamilyInternet6 6 /* IPv6 */
/* Property notification */
diff --git a/Xarch.h b/Xarch.h
index 0633ebc..0571877 100644
--- a/Xarch.h
+++ b/Xarch.h
@@ -25,7 +25,7 @@
* IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $XFree86: xc/include/Xarch.h,v 1.10 2000/06/15 20:49:58 dawes Exp $ */
+/* $XFree86: xc/include/Xarch.h,v 1.11 2003/05/27 22:26:24 tsi Exp $ */
/*
@@ -41,10 +41,10 @@
#else
#ifdef SVR4
-#if defined(NCR) || defined(Mips)
+#if defined(NCR) || defined(Mips) || defined(__sgi)
#include <sys/endian.h>
#else
-#if !defined(sun) && !defined(__sgi)
+#if !defined(sun)
#include <sys/byteorder.h>
#endif
#endif
diff --git a/Xmd.h b/Xmd.h
index 377b9bc..0a9a4c1 100644
--- a/Xmd.h
+++ b/Xmd.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/include/Xmd.h,v 3.16 2002/05/31 18:45:39 dawes Exp $ */
+/* $XFree86: xc/include/Xmd.h,v 3.19 2003/10/23 15:19:01 tsi Exp $ */
/***********************************************************
Copyright 1987, 1998 The Open Group
@@ -28,13 +28,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
@@ -58,19 +58,16 @@ SOFTWARE.
#ifdef CRAY
#define WORD64 /* 64-bit architecture */
#endif
-#if defined(__alpha) || defined(__alpha__) || \
+#if defined (_LP64) || \
+ defined(__alpha) || defined(__alpha__) || \
defined(__ia64__) || defined(ia64) || \
defined(__sparc64__) || \
defined(__s390x__) || \
(defined(__hppa__) && defined(__LP64__)) || \
- defined(__x86_64__) || defined(x86_64)
+ defined(__AMD64__) || defined(AMD64) || \
+ (defined(sgi) && (_MIPS_SZLONG == 64))
#define LONG64 /* 32/64-bit architecture */
#endif
-#ifdef __sgi
-#if (_MIPS_SZLONG == 64)
-#define LONG64
-#endif
-#endif
/*
* Stuff to handle large architecture machines; the constants were generated
@@ -85,7 +82,7 @@ SOFTWARE.
* Definition of macro used to set constants for size of network structures;
* machines with preprocessors that can't handle all of the sz_ symbols
* can define this macro to be sizeof(x) if and only if their compiler doesn't
- * pad out structures (esp. the xTextElt structure which contains only two
+ * pad out structures (esp. the xTextElt structure which contains only two
* one-byte fields). Network structures should always define sz_symbols.
*
* The sz_ prefix is used instead of something more descriptive so that the
@@ -196,9 +193,9 @@ typedef CARD8 BOOL;
#define NEXTPTR(p,t) (((char *) p) + SIZEOF(t))
#else /* else not MUSTCOPY, this is used for 32-bit machines */
/*
- * this version should leave result of type (t *), but that should only be
+ * this version should leave result of type (t *), but that should only be
* used when not in MUSTCOPY
- */
+ */
#define NEXTPTR(p,t) (((t *)(p)) + 1)
#endif /* MUSTCOPY - used machines whose C structs don't line up with proto */
diff --git a/Xos.h b/Xos.h
index 64468bd..7de76a4 100644
--- a/Xos.h
+++ b/Xos.h
@@ -27,7 +27,7 @@ in this Software without prior written authorization from The Open Group.
* The X Window System is a Trademark of The Open Group.
*
*/
-/* $XFree86: xc/include/Xos.h,v 3.38 2002/05/31 18:45:39 dawes Exp $ */
+/* $XFree86: xc/include/Xos.h,v 3.39 2003/03/25 04:18:07 dawes Exp $ */
/* This is a collection of things to try and minimize system dependencies
* in a "signficant" number of source files.
@@ -261,7 +261,7 @@ typedef unsigned long fd_mask;
#define NGROUPS 16
#endif
-#if defined(ISC) || \
+#if defined(ISC) || defined(__UNIXOS2__) || \
(defined(linux) && !defined(__GLIBC__)) || \
(defined(__QNX__) && !defined(UNIXCONN))
/*
diff --git a/Xos_r.h b/Xos_r.h
index 9a2ed52..b7cada5 100644
--- a/Xos_r.h
+++ b/Xos_r.h
@@ -1,5 +1,5 @@
/* $Xorg: Xos_r.h,v 1.4 2001/02/09 02:03:22 xorgcvs Exp $ */
-/*
+/*
Copyright 1996, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
@@ -22,9 +22,9 @@ Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
-/* $XFree86: xc/include/Xos_r.h,v 1.18 2002/08/28 23:08:22 torrey Exp $ */
+/* $XFree86: xc/include/Xos_r.h,v 1.19 2003/10/23 15:19:01 tsi Exp $ */
-/*
+/*
* Various and sundry Thread-Safe functions used by X11, Motif, and CDE.
*
* Use this file in MT-safe code where you would have included
@@ -54,7 +54,7 @@ in this Software without prior written authorization from The Open Group.
* NOTE: On systems lacking appropriate _r functions Getgrgid() and
* Getgrnam() do NOT copy the list of group members!
*
- * This header is nominally intended to simplify porting X11, Motif, and
+ * This header is nominally intended to simplify porting X11, Motif, and
* CDE; it may be useful to other people too. The structure below is
* complicated, mostly because P1003.1c (the IEEE POSIX Threads spec)
* went through lots of drafts, and some vendors shipped systems based
@@ -189,7 +189,7 @@ extern void XtProcessUnlock(
#endif /* !defined WIN32 */
-/*
+/*
* Solaris 2.5 has SVR4 thread-safe API, but defines the POSIX
* thread-safe feature test macro. Fix the feature test macro.
*/
@@ -198,7 +198,7 @@ extern void XtProcessUnlock(
#endif
/*
- * LynxOS 3.1 defines _POSIX_THREAD_SAFE_FUNCTIONS but
+ * LynxOS 3.1 defines _POSIX_THREAD_SAFE_FUNCTIONS but
* getpwuid_r has different semantics than defined by POSIX
*/
#if defined(Lynx) && defined(_POSIX_THREAD_SAFE_FUNCTIONS)
@@ -255,7 +255,7 @@ typedef struct {
* NetBSD and FreeBSD, at least, are missing several of the unixware passwd
* fields.
*/
-
+
#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || \
defined(__APPLE__)
static __inline__ void _Xpw_copyPasswd(_Xgetpwparams p)
@@ -382,7 +382,7 @@ typedef int _Xgetpwret;
/***** <netdb.h> wrappers *****/
-/*
+/*
* Effective prototypes for <netdb.h> wrappers:
*
* NOTE: On systems lacking the appropriate _r functions Gethostbyname(),
@@ -397,7 +397,7 @@ typedef int _Xgetpwret;
* typedef ... _Xgetservbynameparams;
*
* struct hostent* _XGethostbyname(const char* name,_Xgethostbynameparams);
- * struct hostent* _XGethostbyaddr(const char* addr, int len, int type,
+ * struct hostent* _XGethostbyaddr(const char* addr, int len, int type,
* _Xgethostbynameparams);
* struct servent* _XGetservbyname(const char* name, const char* proto,
* _Xgetservbynameparams);
@@ -554,7 +554,7 @@ typedef int _Xgetservbynameparams; /* dummy */
* #define X_INCLUDE_DIRENT_H
* #define XOS_USE_..._LOCKING
* #include <X11/Xos_r.h>
- *
+ *
* typedef ... _Xreaddirparams;
*
* struct dirent *_XReaddir(DIR *dir_pointer, _Xreaddirparams);
@@ -678,7 +678,7 @@ extern int _Preaddir_r(DIR *, struct dirent *, struct dirent **);
* #define X_INCLUDE_UNISTD_H
* #define XOS_USE_..._LOCKING
* #include <X11/Xos_r.h>
- *
+ *
* typedef ... _Xgetloginparams;
* typedef ... _Xttynameparams;
*
@@ -840,7 +840,7 @@ typedef struct {
/* Use regular, unsafe API. */
typedef int _Xstrtokparams; /* dummy */
# define _XStrtok(s1,s2,p) \
- ( (void)(p), strtok((s1),(s2)) )
+ ( p = 0, (void)p, strtok((s1),(s2)) )
#elif !defined(XOS_USE_MTSAFE_STRINGAPI) || defined(XNO_MTSAFE_STRINGAPI)
/* Systems with thread support but no _r API. */
diff --git a/Xthreads.h b/Xthreads.h
index f2e87a1..0bc6558 100644
--- a/Xthreads.h
+++ b/Xthreads.h
@@ -25,7 +25,7 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
* *
*/
-/* $XFree86: xc/include/Xthreads.h,v 3.10 2001/12/14 19:53:26 dawes Exp $ */
+/* $XFree86: xc/include/Xthreads.h,v 3.11 2003/03/08 19:14:53 herrb Exp $ */
#ifndef _XTHREADS_H_
#define _XTHREADS_H_
@@ -196,6 +196,37 @@ typedef pthread_mutex_t xmutex_rec;
#define xcondition_signal(c) tis_cond_signal(c)
#define xcondition_broadcast(c) tis_cond_broadcast(c)
#else
+#ifdef USE_NBSD_THREADLIB
+/*
+ * NetBSD threadlib support is intended for thread safe libraries.
+ * This should not be used for general client programming.
+ */
+#include <threadlib.h>
+typedef thr_t xthread_t;
+typedef thread_key_t xthread_key_t;
+typedef cond_t xcondition_rec;
+typedef mutex_t xmutex_rec;
+#define xthread_self thr_self
+#define xthread_fork(func,closure) { thr_t _tmpxthr; \
+ /* XXX Create it detached? --thorpej */ \
+ thr_create(&_tmpxthr,NULL,func,closure); }
+#define xthread_yield() thr_yield()
+#define xthread_exit(v) thr_exit(v)
+#define xthread_key_create(kp,d) thr_keycreate(kp,d)
+#define xthread_key_delete(k) thr_keydelete(k)
+#define xthread_set_specific(k,v) thr_setspecific(k,v)
+#define xthread_get_specific(k,vp) *(vp) = thr_getspecific(k)
+#define XMUTEX_INITIALIZER MUTEX_INITIALIZER
+#define xmutex_init(m) mutex_init(m, 0)
+#define xmutex_clear(m) mutex_destroy(m)
+#define xmutex_lock(m) mutex_lock(m)
+#define xmutex_unlock(m) mutex_unlock(m)
+#define xcondition_init(c) cond_init(c, 0, 0)
+#define xcondition_clear(c) cond_destroy(c)
+#define xcondition_wait(c,m) cond_wait(c,m)
+#define xcondition_signal(c) cond_signal(c)
+#define xcondition_broadcast(c) cond_broadcast(c)
+#else
#include <pthread.h>
typedef pthread_t xthread_t;
typedef pthread_key_t xthread_key_t;
@@ -248,6 +279,7 @@ static xthread_t _X_no_thread_id;
#define xcondition_set_name(cv,str) ((char**)(cv)->field1)[5] = (str)
#endif /* DEBUG */
#endif /* _CMA_VENDOR_ == _CMA__IBM */
+#endif /* USE_NBSD_THREADLIB */
#endif /* USE_TIS_SUPPORT */
#endif /* WIN32 */
#endif /* SVR4 */