45
45
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
48
## JET - 10/17/2006 - sync this file from the X11R6.8 tree (Xmd.h)
49
## attribution follows:
51
Copyright 1987, 1998 The Open Group
53
Permission to use, copy, modify, distribute, and sell this software and its
54
documentation for any purpose is hereby granted without fee, provided that
55
the above copyright notice appear in all copies and that both that
56
copyright notice and this permission notice appear in supporting
59
The above copyright notice and this permission notice shall be included in
60
all copies or substantial portions of the Software.
62
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
63
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
64
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
65
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
66
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
67
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
69
Except as contained in this notice, the name of The Open Group shall not be
70
used in advertising or otherwise to promote the sale, use or other dealings
71
in this Software without prior written authorization from The Open Group.
74
Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
78
Permission to use, copy, modify, and distribute this software and its
79
documentation for any purpose and without fee is hereby granted,
80
provided that the above copyright notice appear in all copies and that
81
both that copyright notice and this permission notice appear in
82
supporting documentation, and that the name of Digital not be
83
used in advertising or publicity pertaining to distribution of the
84
software without specific, written prior permission.
86
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
87
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
88
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
89
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
90
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
91
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
48
94
******************************************************************/
50
96
/* Bogus!! Amd.h and Xmd.h serve the same function for two different
54
100
Bad Thing. This should be fixed. */
59
/* $XConsortium: Xmd.h,v 1.36 90/03/14 12:15:16 jim Exp $ */
61
* Xmd.h: MACHINE DEPENDENT DECLARATIONS.
107
/* Copyright 1987, 1998 The Open Group */
109
/* $Id: Amd.h 229 2006-11-27 19:46:55Z jon $ */
65
112
* Special per-machine configuration flags.
68
115
#define WORD64 /* 64-bit architecture */
69
#define UNSIGNEDBITFIELDS /* bit fields do not honor sign */
117
#if defined (_LP64) || \
118
defined(__alpha) || defined(__alpha__) || \
119
defined(__ia64__) || defined(ia64) || \
120
defined(__sparc64__) || \
121
defined(__s390x__) || \
122
(defined(__hppa__) && defined(__LP64__)) || \
123
defined(__amd64__) || defined(amd64) || \
124
defined(__powerpc64__) || \
125
(defined(sgi) && (_MIPS_SZLONG == 64))
126
#define LONG64 /* 32/64-bit architecture */
74
130
* Stuff to handle large architecture machines; the constants were generated
83
139
* Definition of macro used to set constants for size of network structures;
84
140
* machines with preprocessors that can't handle all of the sz_ symbols
85
141
* can define this macro to be sizeof(x) if and only if their compiler doesn't
86
* pad out structures (esp. the xTextElt structure which contains only two
142
* pad out structures (esp. the xTextElt structure which contains only two
87
143
* one-byte fields). Network structures should always define sz_symbols.
89
145
* The sz_ prefix is used instead of something more descriptive so that the
90
146
* symbols are no more than 32 characters long (which causes problems for some
91
147
* compilers and preprocessors).
149
* The extra indirection in the __STDC__ case is to get macro arguments to
150
* expand correctly before the concatenation, rather than afterward.
93
#if defined(__STDC__) && !defined(UNIXCPP)
94
#define SIZEOF(x) sz_##x
152
#if ((defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)) && !defined(UNIXCPP)) || defined(ANSICPP)
153
#define _SIZEOF(x) sz_##x
154
#define SIZEOF(x) _SIZEOF(x)
96
156
#define SIZEOF(x) sz_/**/x
97
157
#endif /* if ANSI C compiler else not */
102
* ibm pcc doesn't understand pragmas.
104
#if defined(ibm032) && defined(__HIGHC__)
105
pragma on(pointers_compatible);
106
pragma off(char_default_unsigned);
111
160
* Bitfield suffixes for the protocol structure elements, if you
112
161
* need them. Note that bitfields are not guarranteed to be signed
113
162
* (or even unsigned) according to ANSI C.
166
typedef unsigned long CARD64;
169
#ifdef UNSIGNEDBITFIELDS
170
typedef unsigned int INT32;
171
typedef unsigned int INT16;
174
typedef signed int INT32;
175
typedef signed int INT16;
123
#if !defined(__alpha__) && !defined(__x86_64__) && !defined(__ia64__) && !defined(__LP64__)
125
typedef unsigned long CARD32;
126
typedef unsigned long BITS32;
129
typedef unsigned int CARD32;
130
typedef unsigned int BITS32;
193
#if defined(__STDC__) || defined(sgi) || defined(AIXV3)
194
typedef signed char INT8;
134
196
typedef char INT8;
200
typedef unsigned long CARD64;
201
typedef unsigned int CARD32;
203
typedef unsigned long CARD32;
136
205
typedef unsigned short CARD16;
137
206
typedef unsigned char CARD8;
139
typedef unsigned short BITS16;
140
typedef unsigned char BYTE;
208
typedef CARD32 BITS32;
209
typedef CARD16 BITS16;
143
typedef unsigned char BOOL;
144
220
typedef BOOL AUBOOL;
145
221
#else /* WIN32 */
146
222
typedef unsigned char AUBOOL;
181
257
#define NEXTPTR(p,t) (((char *) p) + SIZEOF(t))
182
258
#else /* else not MUSTCOPY, this is used for 32-bit machines */
184
* this version should leave result of type (t *), but that should only be
260
* this version should leave result of type (t *), but that should only be
185
261
* used when not in MUSTCOPY
187
263
#define NEXTPTR(p,t) (((t *)(p)) + 1)
188
264
#endif /* MUSTCOPY - used machines whose C structs don't line up with proto */
190
267
#endif /* AMD_H */
191
268
#endif /* XMD_H */