56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsync/* $XFree86: xc/include/Xmd.h,v 3.16 2002/05/31 18:45:39 dawes Exp $ */
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsync/***********************************************************
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsyncCopyright 1987, 1998 The Open Group
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsyncPermission to use, copy, modify, distribute, and sell this software and its
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsyncdocumentation for any purpose is hereby granted without fee, provided that
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsyncthe above copyright notice appear in all copies and that both that
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsynccopyright notice and this permission notice appear in supporting
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsyncdocumentation.
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsyncThe above copyright notice and this permission notice shall be included in
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsyncall copies or substantial portions of the Software.
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsyncTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsyncIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsyncFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsyncOPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsyncAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsyncCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsyncExcept as contained in this notice, the name of The Open Group shall not be
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsyncused in advertising or otherwise to promote the sale, use or other dealings
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsyncin this Software without prior written authorization from The Open Group.
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsyncCopyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsync All Rights Reserved
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsyncPermission to use, copy, modify, and distribute this software and its
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsyncdocumentation for any purpose and without fee is hereby granted,
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsyncprovided that the above copyright notice appear in all copies and that
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsyncboth that copyright notice and this permission notice appear in
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsyncsupporting documentation, and that the name of Digital not be
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsyncused in advertising or publicity pertaining to distribution of the
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsyncsoftware without specific, written prior permission.
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsyncDIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsyncALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsyncDIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsyncANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsyncWHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsyncARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsync******************************************************************/
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsync/* $Xorg: Xmd.h,v 1.4 2001/02/09 02:03:22 xorgcvs Exp $ */
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsync * Xmd.h: MACHINE DEPENDENT DECLARATIONS.
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsync * Special per-machine configuration flags.
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsync defined(__sparc64__) || \
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsync defined(__s390x__) || \
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsync * Stuff to handle large architecture machines; the constants were generated
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsync * on a 32-bit machine and must coorespond to the protocol.
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsync#endif /* WORD64 */
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsync * Definition of macro used to set constants for size of network structures;
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsync * machines with preprocessors that can't handle all of the sz_ symbols
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsync * can define this macro to be sizeof(x) if and only if their compiler doesn't
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsync * pad out structures (esp. the xTextElt structure which contains only two
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsync * one-byte fields). Network structures should always define sz_symbols.
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsync * The sz_ prefix is used instead of something more descriptive so that the
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsync * symbols are no more than 32 characters long (which causes problems for some
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsync * compilers and preprocessors).
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsync * The extra indirection in the __STDC__ case is to get macro arguments to
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsync * expand correctly before the concatenation, rather than afterward.
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsync#if ((defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)) && !defined(UNIXCPP)) || defined(ANSICPP)
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsync#endif /* if ANSI C compiler else not */
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsync * Bitfield suffixes for the protocol structure elements, if you
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsync * need them. Note that bitfields are not guarranteed to be signed
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsync * (or even unsigned) according to ANSI C.
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsync#if defined(__STDC__) || defined(sgi) || defined(AIXV3)
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsync * definitions for sign-extending bitfields on 64-bit architectures
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsync#define cvtINT8toInt(val) (((val) & 0x00000080) ? ((val) | 0xffffffffffffff00) : (val))
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsync#define cvtINT16toInt(val) (((val) & 0x00008000) ? ((val) | 0xffffffffffff0000) : (val))
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsync#define cvtINT32toInt(val) (((val) & 0x80000000) ? ((val) | 0xffffffff00000000) : (val))
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsync#endif /* WORD64 and UNSIGNEDBITFIELDS */
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsync * This macro must not cast or else pointers will get aligned and be wrong
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsync#else /* else not MUSTCOPY, this is used for 32-bit machines */
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsync * this version should leave result of type (t *), but that should only be
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsync * used when not in MUSTCOPY
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsync#endif /* MUSTCOPY - used machines whose C structs don't line up with proto */
56cf8eab3b29ae65a78e72a1d03ad30ef1c9bf57vboxsync#endif /* XMD_H */