Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:14:34

0001 /***********************************************************
0002 
0003 Copyright 1987, 1998  The Open Group
0004 
0005 Permission to use, copy, modify, distribute, and sell this software and its
0006 documentation for any purpose is hereby granted without fee, provided that
0007 the above copyright notice appear in all copies and that both that
0008 copyright notice and this permission notice appear in supporting
0009 documentation.
0010 
0011 The above copyright notice and this permission notice shall be included in
0012 all copies or substantial portions of the Software.
0013 
0014 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
0015 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
0016 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
0017 OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
0018 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
0019 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
0020 
0021 Except as contained in this notice, the name of The Open Group shall not be
0022 used in advertising or otherwise to promote the sale, use or other dealings
0023 in this Software without prior written authorization from The Open Group.
0024 
0025 
0026 Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
0027 
0028                         All Rights Reserved
0029 
0030 Permission to use, copy, modify, and distribute this software and its
0031 documentation for any purpose and without fee is hereby granted,
0032 provided that the above copyright notice appear in all copies and that
0033 both that copyright notice and this permission notice appear in
0034 supporting documentation, and that the name of Digital not be
0035 used in advertising or publicity pertaining to distribution of the
0036 software without specific, written prior permission.
0037 
0038 DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
0039 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
0040 DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
0041 ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
0042 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
0043 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
0044 SOFTWARE.
0045 
0046 ******************************************************************/
0047 #ifndef XMD_H
0048 # define XMD_H 1
0049 /*
0050  *  Xmd.h: MACHINE DEPENDENT DECLARATIONS.
0051  */
0052 
0053 /*
0054  * Special per-machine configuration flags.
0055  */
0056 # if defined(__sun) && defined(__SVR4)
0057 #  include <sys/isa_defs.h> /* Solaris: defines _LP64 if necessary */
0058 # endif
0059 
0060 # if defined (_LP64) || defined(__LP64__) || \
0061      defined(__alpha) || defined(__alpha__) || \
0062      defined(__ia64__) || defined(ia64) || \
0063      defined(__sparc64__) || \
0064      defined(__s390x__) || \
0065      defined(__amd64__) || defined(amd64) || \
0066      defined(__powerpc64__)
0067 #  if !defined(__ILP32__) /* amd64-x32 is 32bit */
0068 #   define LONG64               /* 32/64-bit architecture */
0069 #  endif /* !__ILP32__ */
0070 # endif
0071 
0072 /*
0073  * Definition of macro used to set constants for size of network structures;
0074  * machines with preprocessors that can't handle all of the sz_ symbols
0075  * can define this macro to be sizeof(x) if and only if their compiler doesn't
0076  * pad out structures (esp. the xTextElt structure which contains only two
0077  * one-byte fields).  Network structures should always define sz_symbols.
0078  *
0079  * The sz_ prefix is used instead of something more descriptive so that the
0080  * symbols are no more than 32 characters long (which causes problems for some
0081  * compilers and preprocessors).
0082  *
0083  * The extra indirection is to get macro arguments to expand correctly before
0084  * the concatenation, rather than afterward.
0085  */
0086 # define _SIZEOF(x) sz_##x
0087 # define SIZEOF(x) _SIZEOF(x)
0088 
0089 /*
0090  * Bitfield suffixes for the protocol structure elements, if you
0091  * need them.  Note that bitfields are not guaranteed to be signed
0092  * (or even unsigned) according to ANSI C.
0093  */
0094 # define B32 /* bitfield not needed on architectures with native 32-bit type */
0095 # define B16 /* bitfield not needed on architectures with native 16-bit type */
0096 # ifdef LONG64
0097 typedef long INT64;
0098 typedef int INT32;
0099 # else
0100 typedef long INT32;
0101 # endif
0102 typedef short INT16;
0103 
0104 typedef signed char    INT8;
0105 
0106 # ifdef LONG64
0107 typedef unsigned long CARD64;
0108 typedef unsigned int CARD32;
0109 # else
0110 typedef unsigned long long CARD64;
0111 typedef unsigned long CARD32;
0112 # endif
0113 typedef unsigned short CARD16;
0114 typedef unsigned char  CARD8;
0115 
0116 typedef CARD32      BITS32;
0117 typedef CARD16      BITS16;
0118 
0119 typedef CARD8       BYTE;
0120 typedef CARD8       BOOL;
0121 
0122 /*
0123  * was definitions for sign-extending bitfields on architectures without
0124  * native types smaller than 64-bit, now just backwards compatibility
0125  */
0126 # define cvtINT8toInt(val) (val)
0127 # define cvtINT16toInt(val) (val)
0128 # define cvtINT32toInt(val) (val)
0129 # define cvtINT8toShort(val) (val)
0130 # define cvtINT16toShort(val) (val)
0131 # define cvtINT32toShort(val) (val)
0132 # define cvtINT8toLong(val) (val)
0133 # define cvtINT16toLong(val) (val)
0134 # define cvtINT32toLong(val) (val)
0135 
0136 /*
0137  * this version should leave result of type (t *), but that should only be
0138  * used when not in MUSTCOPY
0139  */
0140 # define NEXTPTR(p,t) (((t *)(p)) + 1)
0141 
0142 #endif /* XMD_H */