1 /* @(#)mytype.h 1.5 16/02/14 Copyright 1998,1999 Heiko Eissfeldt */ 2 3 /* 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License, Version 1.0 only 6 * (the "License"). You may not use this file except in compliance 7 * with the License. 8 * 9 * See the file CDDL.Schily.txt in this distribution for details. 10 * A copy of the CDDL is also available via the Internet at 11 * http://www.opensource.org/licenses/cddl1.txt 12 * 13 * When distributing Covered Code, include this CDDL HEADER in each 14 * file and include the License file CDDL.Schily.txt from this distribution. 15 */ 16 17 #if 4 == SIZEOF_LONG_INT 18 #define UINT4 long unsigned int 19 #define UINT4_C ULONG_C 20 #else 21 #if 4 == SIZEOF_INT 22 #define UINT4 unsigned int 23 #define UINT4_C UINT_C 24 #else 25 #if 4 == SIZEOF_SHORT_INT 26 #define UINT4 short unsigned int 27 #define UINT4_C USHORT_C 28 #else 29 error need an integer type with 32 bits, but do not know one! 30 #endif 31 #endif 32 #endif 33 #ifndef TRUE 34 #define TRUE 1 35 #endif 36 #ifndef FALSE 37 #define FALSE 0 38 #endif 39 40 #ifndef offsetof 41 #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) 42 #endif 43