1 /*	$NetBSD: bitypes.h,v 1.1.1.1 2009/04/12 15:33:51 christos Exp $	*/
2 
3 /*
4  * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
5  * Copyright (c) 1996,1999 by Internet Software Consortium.
6  *
7  * Permission to use, copy, modify, and distribute this software for any
8  * purpose with or without fee is hereby granted, provided that the above
9  * copyright notice and this permission notice appear in all copies.
10  *
11  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
12  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13  * MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR
14  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
17  * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18  */
19 
20 #ifndef __BIT_TYPES_DEFINED__
21 #define __BIT_TYPES_DEFINED__
22 
23 	/*
24 	 * Basic integral types.  Omit the typedef if
25 	 * not possible for a machine/compiler combination.
26 	 */
27 	typedef /*signed*/ char           	   int8m_t;
28 	typedef unsigned char            u_int8_t, u_int8m_t;
29 	typedef short                     	   int16m_t;
30 	typedef unsigned short          u_int16_t, u_int16m_t;
31 	typedef int                       	   int32m_t;
32 	typedef unsigned int            u_int32_t, u_int32m_t;
33 
34 #ifdef __arch64__
35 	typedef long			  	   int64m_t;
36 	typedef unsigned long		u_int64_t, u_int64m_t;
37 #endif
38 
39 #ifndef _INTTYPES_H
40 	typedef signed char               int8_t;
41 	typedef signed short              int16_t;
42 	typedef signed int                int32_t;
43 	typedef unsigned char             uint8_t;
44 	typedef unsigned short            uint16_t;
45 	typedef unsigned int              uint32_t;
46 #ifdef __arch64__
47 	typedef signed long               int64_t;
48 	typedef unsigned long             uint64_t;
49 #endif
50 #endif
51 
52 #endif	/* __BIT_TYPES_DEFINED__ */
53