1 /* Copyright (c) 2003 Canna Project. All rights reserved. 2 * 3 * Permission to use, copy, modify, distribute and sell this software 4 * and its documentation for any purpose is hereby granted without 5 * fee, provided that the above copyright notice appear in all copies 6 * and that both that copyright notice and this permission notice 7 * appear in supporting documentation, and that the name of the 8 * author and contributors not be used in advertising or publicity 9 * pertaining to distribution of the software without specific, written 10 * prior permission. The author and contributors no representations 11 * about the suitability of this software for any purpose. It is 12 * provided "as is" without express or implied warranty. 13 * 14 * THE AUTHOR AND CONTRIBUTORS DISCLAIMS ALL WARRANTIES WITH REGARD TO 15 * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 16 * FITNESS, IN NO EVENT SHALL THE AUTHOR AND CONTRIBUTORS BE LIABLE FOR 17 * ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER 18 * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF 19 * CONTRACT, NEGLIGENCE OR OTHER TORTUOUS ACTION, ARISING OUT OF OR IN 20 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 21 */ 22 23 /* $Id: sysdep.h,v 1.4 2003/10/02 07:40:29 aida_s Exp $ */ 24 25 #ifndef CANNA_SYSDEP_H 26 #define CANNA_SYSDEP_H 27 28 #include <canna/pubconf.h> 29 #if defined(CANNA_HAVE_INTTYPES_H) 30 # include <inttypes.h> 31 #elif defined(CANNA_HAVE_STDINT_H) 32 # include <stdint.h> 33 #else 34 # include <sys/types.h> 35 #endif 36 37 #ifndef _WCHAR_T 38 # if defined(WCHAR_T) || defined(_WCHAR_T_) || defined(__WCHAR_T) \ 39 || defined(_GCC_WCHAR_T) || defined(_WCHAR_T_DEFINED) 40 # define _WCHAR_T 41 # endif 42 #endif 43 44 #ifdef CANNA_HAVE_INT32_T 45 typedef int8_t canna_int8_t; 46 typedef int16_t canna_int16_t; 47 typedef int32_t canna_int32_t; 48 typedef intptr_t canna_intptr_t; 49 typedef uint8_t canna_uint8_t; 50 typedef uint16_t canna_uint16_t; 51 typedef uint32_t canna_uint32_t; 52 typedef uintptr_t canna_uintptr_t; 53 #else /* CANNA_HAVE_INT32_T */ 54 /* ILP32 and LP64 */ 55 typedef signed char canna_int8_t; 56 typedef short canna_int16_t; 57 typedef int canna_int32_t; 58 typedef unsigned long canna_intptr_t; 59 typedef unsigned char canna_uint8_t; 60 typedef unsigned short canna_uint16_t; 61 typedef unsigned int canna_uint32_t; 62 typedef unsigned long canna_uintptr_t; 63 #endif /* !CANNA_HAVE_INT32_T */ 64 65 #endif /* CANNA_SYSDEP_H */ 66 /* vim: set sw=2: */ 67