summaryrefslogtreecommitdiff
path: root/xc/include
diff options
context:
space:
mode:
authoralanh <alanh>2003-09-12 18:35:41 +0000
committeralanh <alanh>2003-09-12 18:35:41 +0000
commit1ad5a2d4f7bc83b50df9168c61e8d7215926a5ab (patch)
treeb87eff9079a90e36aace23ae3a2e9dd99c33feeb /xc/include
parentc506e07137af4fff850324329fd502b3e427c3b7 (diff)
second round.
Diffstat (limited to 'xc/include')
-rw-r--r--xc/include/GL/glxint.h2
-rw-r--r--xc/include/GL/glxmd.h2
-rw-r--r--xc/include/GL/glxproto.h2
-rw-r--r--xc/include/X.h13
-rw-r--r--xc/include/Xarch.h15
-rw-r--r--xc/include/Xmd.h31
-rw-r--r--xc/include/Xos.h79
-rw-r--r--xc/include/Xthreads.h56
8 files changed, 120 insertions, 80 deletions
diff --git a/xc/include/GL/glxint.h b/xc/include/GL/glxint.h
index 74e9efe63..4b53e9faf 100644
--- a/xc/include/GL/glxint.h
+++ b/xc/include/GL/glxint.h
@@ -1,7 +1,7 @@
#ifndef __GLX_glxint_h__
#define __GLX_glxint_h__
-/* $XFree86: xc/include/GL/glxint.h,v 1.3 2000/11/18 19:37:04 tsi Exp $ */
+/* $XFree86: xc/include/GL/glxint.h,v 1.4 2001/08/01 00:44:34 tsi Exp $ */
/*
** The contents of this file are subject to the GLX Public License Version 1.0
** (the "License"). You may not use this file except in compliance with the
diff --git a/xc/include/GL/glxmd.h b/xc/include/GL/glxmd.h
index ddb03c385..3c4dc6570 100644
--- a/xc/include/GL/glxmd.h
+++ b/xc/include/GL/glxmd.h
@@ -1,7 +1,7 @@
#ifndef _GLX_glxmd_h_
#define _GLX_glxmd_h_
-/* $XFree86: xc/include/GL/glxmd.h,v 1.2 1999/06/14 07:23:28 dawes Exp $ */
+/* $XFree86: xc/include/GL/glxmd.h,v 1.3 2001/03/21 15:51:38 dawes Exp $ */
/*
** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free
diff --git a/xc/include/GL/glxproto.h b/xc/include/GL/glxproto.h
index 23a992814..39ff22d84 100644
--- a/xc/include/GL/glxproto.h
+++ b/xc/include/GL/glxproto.h
@@ -1,7 +1,7 @@
#ifndef _GLX_glxproto_h_
#define _GLX_glxproto_h_
-/* $XFree86: xc/include/GL/glxproto.h,v 1.4 2001/04/10 16:07:49 dawes Exp $ */
+/* $XFree86: xc/include/GL/glxproto.h,v 1.5 2001/08/01 00:44:34 tsi Exp $ */
/*
** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free
diff --git a/xc/include/X.h b/xc/include/X.h
index 0a98d1aec..30dd4a2e9 100644
--- a/xc/include/X.h
+++ b/xc/include/X.h
@@ -1,5 +1,5 @@
/*
- * $TOG: X.h /main/9 1998/02/09 11:18:23 kaleb $
+ * $Xorg: X.h,v 1.4 2001/02/09 02:03:22 xorgcvs Exp $
*/
/* Definitions for the X window system likely to be used by applications */
@@ -11,7 +11,11 @@
Copyright 1987, 1998 The Open Group
-All Rights Reserved.
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
@@ -49,7 +53,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
-/* $XFree86: xc/include/X.h,v 1.3 1999/08/22 08:58:48 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 */
@@ -295,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/xc/include/Xarch.h b/xc/include/Xarch.h
index 2e046e00b..057187701 100644
--- a/xc/include/Xarch.h
+++ b/xc/include/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.8 1999/03/14 05:50:53 dawes Exp $ */
+/* $XFree86: xc/include/Xarch.h,v 1.11 2003/05/27 22:26:24 tsi Exp $ */
/*
@@ -41,7 +41,7 @@
#else
#ifdef SVR4
-#if defined(NCR) || defined(Mips)
+#if defined(NCR) || defined(Mips) || defined(__sgi)
#include <sys/endian.h>
#else
#if !defined(sun)
@@ -87,9 +87,18 @@
#define LITTLE_ENDIAN 1234
#define BIG_ENDIAN 4321
-#ifdef QNX
+#if defined(__QNX__) && !defined(__QNXNTO__)
#define BYTE_ORDER LITTLE_ENDIAN
#endif
+
+#if defined(__QNXNTO__)
+#if defined(i386) || defined(__i386__) || defined(__x86__)
+#define BYTE_ORDER LITTLE_ENDIAN
+#else
+#define BYTE_ORDER BIG_ENDIAN
+#endif
+#endif
+
#ifdef Lynx
#if defined(i386) || defined(__i386__) || defined(__x86__)
#define BYTE_ORDER LITTLE_ENDIAN
diff --git a/xc/include/Xmd.h b/xc/include/Xmd.h
index 45ddad391..ceb5becfa 100644
--- a/xc/include/Xmd.h
+++ b/xc/include/Xmd.h
@@ -1,9 +1,13 @@
-/* $XFree86: xc/include/Xmd.h,v 3.5 1998/10/02 07:38:50 dawes Exp $ */
+/* $XFree86: xc/include/Xmd.h,v 3.18 2003/07/07 15:34:21 eich Exp $ */
/***********************************************************
Copyright 1987, 1998 The Open Group
-All Rights Reserved.
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
@@ -43,7 +47,7 @@ SOFTWARE.
******************************************************************/
#ifndef XMD_H
#define XMD_H 1
-/* $TOG: Xmd.h /main/36 1998/02/09 11:18:48 kaleb $ */
+/* $Xorg: Xmd.h,v 1.4 2001/02/09 02:03:22 xorgcvs Exp $ */
/*
* Xmd.h: MACHINE DEPENDENT DECLARATIONS.
*/
@@ -54,7 +58,13 @@ 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(__AMD64__) || defined(AMD64)
#define LONG64 /* 32/64-bit architecture */
#endif
#ifdef __sgi
@@ -145,19 +155,14 @@ typedef unsigned char CARD8;
typedef CARD32 BITS32;
typedef CARD16 BITS16;
-#ifndef __EMX__
+#ifndef I_NEED_OS2_H
typedef CARD8 BYTE;
-typedef CARD8 BOOL;
+typedef CARD8 BOOL;
#else
-/*
- * This is bad style, but the central include file <os2.h> declares them
- * as well
- */
-#define BYTE CARD8
-#define BOOL CARD8
+#define BYTE CARD8
+#define BOOL CARD8
#endif
-
/*
* definitions for sign-extending bitfields on 64-bit architectures
*/
diff --git a/xc/include/Xos.h b/xc/include/Xos.h
index a593f1cc3..7de76a4be 100644
--- a/xc/include/Xos.h
+++ b/xc/include/Xos.h
@@ -1,10 +1,14 @@
/*
- * $TOG: Xos.h /main/71 1998/02/09 11:18:52 kaleb $
+ * $Xorg: Xos.h,v 1.6 2001/02/09 02:03:22 xorgcvs Exp $
*
*
Copyright 1987, 1998 The Open Group
-All Rights Reserved.
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
@@ -23,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.26 1998/10/25 07:11:11 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.
@@ -47,7 +51,7 @@ in this Software without prior written authorization from The Open Group.
#define __TYPES__
#endif /* __TYPES__ */
#else /* USG */
-#if defined(_POSIX_SOURCE) && (defined(MOTOROLA) || defined(AMOEBA))
+#if defined(_POSIX_SOURCE) && defined(MOTOROLA)
#undef _POSIX_SOURCE
#include <sys/types.h>
#define _POSIX_SOURCE
@@ -56,6 +60,14 @@ in this Software without prior written authorization from The Open Group.
#endif
#endif /* USG */
+#ifdef _SEQUENT_
+/*
+ * in_systm.h compatibility between SysV and BSD types u_char u_short u_long
+ * select.h for typedef of args to select, fd_set, may use SVR4 later
+ */
+#include <netinet/in_systm.h>
+#include <sys/select.h>
+#endif /* _SEQUENT_ */
/*
* Just about everyone needs the strings routines. We provide both forms here,
@@ -121,7 +133,7 @@ extern int sys_nerr;
/*
* Get open(2) constants
*/
-#ifdef X_NOT_POSIX
+#if defined(X_NOT_POSIX)
#include <fcntl.h>
#if defined(USL) || defined(CRAY) || defined(MOTOROLA) || (defined(i386) && (defined(SYSV) || defined(SVR4))) || defined(__sxg__)
#include <unistd.h>
@@ -143,16 +155,11 @@ extern int sys_nerr;
#endif
#endif /* X_NOT_POSIX else */
-#ifdef CSRG_BASED
-#include <stdlib.h>
-#include <unistd.h>
-#endif /* CSRG_BASED */
-
/*
- * Get struct timeval
+ * Get struct timeval and struct tm
*/
-#ifdef SYSV
+#if defined(SYSV) && !defined(_SEQUENT_)
#ifndef USL
#include <sys/time.h>
@@ -204,13 +211,18 @@ struct timeval {
(t)->tv_sec = _gtodtmp.time; \
(t)->tv_usec = _gtodtmp.millitm * 1000; \
}
-#elif defined(AMOEBA)
+#elif defined(_SEQUENT_) || defined(Lynx)
#include <time.h>
+#elif defined (__QNX__)
+typedef unsigned long fd_mask;
+/* Make sure we get 256 bit select masks */
+#define FD_SETSIZE 256
+#include <sys/select.h>
#include <sys/time.h>
-#elif defined(MINIX) || defined(_SEQUENT_) || defined(Lynx)
#include <time.h>
#else
#include <sys/time.h>
+#include <time.h>
#endif /* defined(_POSIX_SOURCE) && defined(SVR4) */
#endif /* SYSV */
@@ -226,40 +238,7 @@ struct timeval {
#endif
#endif /* XPG4 else */
-#ifdef MINIX
-#include <errno.h>
-#include <net/gen/in.h>
-#include <net/gen/socket.h>
-#include <net/gen/udp.h>
-#include <net/gen/udp_hdr.h>
-
-struct sockaddr
-{
- u16_t sa_family;
- char sa_data[14];
-};
-
-struct sockaddr_in
-{
- u16_t sin_family;
- u16_t sin_port;
- struct
- {
- ipaddr_t s_addr;
- } sin_addr;
- char sin_zero[8];
-};
-
-struct in_addr
-{
- ipaddr_t s_addr;
-};
-
-typedef char *caddr_t;
-typedef unsigned char u_char;
-#endif /* MINIX */
-
-#ifdef __EMX__
+#ifdef __UNIXOS2__
typedef unsigned long fd_mask;
#include <limits.h>
#define MAX_PATH _POSIX_PATH_MAX
@@ -282,7 +261,9 @@ typedef unsigned long fd_mask;
#define NGROUPS 16
#endif
-#if defined(ISC) || defined(__EMX__)
+#if defined(ISC) || defined(__UNIXOS2__) || \
+ (defined(linux) && !defined(__GLIBC__)) || \
+ (defined(__QNX__) && !defined(UNIXCONN))
/*
* Some OS's may not have this
*/
diff --git a/xc/include/Xthreads.h b/xc/include/Xthreads.h
index f5a676de8..0bc6558ab 100644
--- a/xc/include/Xthreads.h
+++ b/xc/include/Xthreads.h
@@ -1,10 +1,14 @@
/*
- * $TOG: Xthreads.h /main/37 1998/02/09 11:19:20 kaleb $
+ * $Xorg: Xthreads.h,v 1.5 2001/02/09 02:03:23 xorgcvs Exp $
*
*
Copyright 1993, 1998 The Open Group
-All Rights Reserved.
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
@@ -21,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.5 1998/10/02 07:38:52 dawes Exp $ */
+/* $XFree86: xc/include/Xthreads.h,v 3.11 2003/03/08 19:14:53 herrb Exp $ */
#ifndef _XTHREADS_H_
#define _XTHREADS_H_
@@ -59,7 +63,7 @@ typedef struct mutex xmutex_rec;
#define xcondition_broadcast(cv) condition_broadcast(cv)
#define xcondition_set_name(cv,str) condition_set_name(cv,str)
#else /* !CTHREADS */
-#if defined(SVR4) && !defined(__sgi)
+#if defined(SVR4) && !defined(__sgi) && !defined(_SEQUENT_)
#include <thread.h>
#include <synch.h>
typedef thread_t xthread_t;
@@ -78,7 +82,6 @@ typedef mutex_t xmutex_rec;
#endif
#define xthread_set_specific(k,v) thr_setspecific(k,v)
#define xthread_get_specific(k,vp) thr_getspecific(k,vp)
-#define XMUTEX_INITIALIZER {0}
#define xmutex_init(m) mutex_init(m,USYNC_THREAD,0)
#define xmutex_clear(m) mutex_destroy(m)
#define xmutex_lock(m) mutex_lock(m)
@@ -193,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;
@@ -227,19 +261,25 @@ typedef pthread_mutex_t xmutex_rec;
#define xcondition_wait(c,m) pthread_cond_wait(c,m)
#define xcondition_signal(c) pthread_cond_signal(c)
#define xcondition_broadcast(c) pthread_cond_broadcast(c)
-#if defined(_DECTHREADS_) || defined(linux)
+#if defined(_DECTHREADS_)
static xthread_t _X_no_thread_id;
#define xthread_have_id(id) !pthread_equal(id, _X_no_thread_id)
#define xthread_clear_id(id) id = _X_no_thread_id
#define xthread_equal(id1,id2) pthread_equal(id1, id2)
-#endif /* _DECTHREADS_ || linux */
-#if _CMA_VENDOR_ == _CMA__IBM
+#endif /* _DECTHREADS_ */
+#if defined(linux)
+#define xthread_have_id(id) !pthread_equal(id, 0)
+#define xthread_clear_id(id) id = 0
+#define xthread_equal(id1,id2) pthread_equal(id1, id2)
+#endif /* linux */
+#if defined(_CMA_VENDOR_) && defined(_CMA__IBM) && (_CMA_VENDOR_ == _CMA__IBM)
#ifdef DEBUG /* too much of a hack to enable normally */
/* see also cma__obj_set_name() */
#define xmutex_set_name(m,str) ((char**)(m)->field1)[5] = (str)
#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 */