1 /* Copyright 1992 NEC Corporation, Tokyo, Japan. 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 NEC 8 * Corporation not be used in advertising or publicity pertaining to 9 * distribution of the software without specific, written prior 10 * permission. NEC Corporation makes no representations about the 11 * suitability of this software for any purpose. It is provided "as 12 * is" without express or implied warranty. 13 * 14 * NEC CORPORATION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 15 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN 16 * NO EVENT SHALL NEC CORPORATION BE LIABLE FOR ANY SPECIAL, INDIRECT OR 17 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF 18 * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 19 * OTHER TORTUOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 20 * PERFORMANCE OF THIS SOFTWARE. 21 */ 22 23 /* 24 * @(#) 102.1 $Id: widedef.h,v 1.7.2.2 2003/12/27 17:15:20 aida_s Exp $ 25 */ 26 27 #ifndef _WIDEDEF_H_ 28 #define _WIDEDEF_H_ 29 30 #ifdef __DragonFly__ 31 # include <osreldate.h> 32 #endif 33 34 #if (defined(__DragonFly__) && __DragonFly_version < 300000) \ 35 || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__) 36 # include <machine/ansi.h> 37 #endif 38 39 #if (defined(__DragonFly__) && __DragonFly_version < 300000) \ 40 || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__) 41 # ifdef _BSD_WCHAR_T_ 42 # undef _BSD_WCHAR_T_ 43 # ifdef WCHAR16 44 # define _BSD_WCHAR_T_ unsigned short 45 # else 46 # define _BSD_WCHAR_T_ unsigned long 47 # endif 48 # if defined(__APPLE__) && defined(__WCHAR_TYPE__) 49 # undef __WCHAR_TYPE__ 50 # define __WCHAR_TYPE__ _BSD_WCHAR_T_ 51 # endif 52 # include <stddef.h> 53 # define _WCHAR_T 54 # endif 55 #elif defined(__DragonFly__) && __DragonFly_version >= 300000 56 # ifdef WCHAR16 57 typedef unsigned short wchar_t; 58 # define _WCHAR_T_DECLARED 59 # endif 60 # include <stddef.h> 61 # define _WCHAR_T 62 #else 63 #if !defined(WCHAR_T) && !defined(_WCHAR_T) && !defined(_WCHAR_T_) \ 64 && !defined(__WCHAR_T) && !defined(_GCC_WCHAR_T) && !defined(_WCHAR_T_DEFINED) 65 # ifdef WCHAR16 66 typedef unsigned short wchar_t; 67 # else 68 /* replace this with #include or typedef appropriate for your system */ 69 typedef unsigned long wchar_t; 70 # endif 71 # define WCHAR_T 72 # define _WCHAR_T 73 # define _WCHAR_T_ 74 # define __WCHAR_T 75 # define _GCC_WCHAR_T 76 #define _WCHAR_T_DEFINED 77 #endif 78 #endif 79 80 #endif /* _WIDEDEF_H_ */ 81