1 /* 2 * cook - file construction tool 3 * Copyright (C) 1994, 1997-1999, 2006, 2007 Peter Miller; 4 * All rights reserved. 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 3 of the License, or 9 * (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program. If not, see 18 * <http://www.gnu.org/licenses/>. 19 */ 20 21 #ifndef COMMON_AC_STDLIB_H 22 #define COMMON_AC_STDLIB_H 23 24 #include <common/config.h> 25 26 #ifdef HAVE_STDLIB_H 27 #include <stdlib.h> 28 #else 29 30 #ifndef _WCHAR_T 31 #ifndef _T_WCHAR_ 32 #ifndef _T_WCHAR 33 #ifndef __WCHAR_T 34 #ifndef _WCHAR_T_ 35 #ifndef _WCHAR_T_H 36 #ifndef ___int_wchar_t_h 37 #ifndef __INT_WCHAR_T_H 38 #ifndef _GCC_WCHAR_T 39 #define _WCHAR_T 40 #define _T_WCHAR_ 41 #define _T_WCHAR 42 #define __WCHAR_T 43 #define _WCHAR_T_ 44 #define _WCHAR_T_H 45 #define ___int_wchar_t_h 46 #define __INT_WCHAR_T_H 47 #define _GCC_WCHAR_T 48 #ifndef __WCHAR_TYPE__ 49 #define __WCHAR_TYPE__ int 50 #endif 51 typedef __WCHAR_TYPE__ wchar_t; 52 typedef int wchar_t; 53 #endif 54 #endif 55 #endif 56 #endif 57 #endif 58 #endif 59 #endif 60 #endif 61 #endif 62 63 #ifndef MB_LEN_MAX 64 #define MB_LEN_MAX 1 65 #endif 66 67 #ifndef MB_CUR_MAX 68 #define MB_CUR_MAX 1 69 #endif 70 71 #endif 72 73 /* 74 * On Linux, the proptotype for exit isn't quite correct. 75 * (__NORETURN is the old gcc way, __NORETURN2 is the new gcc way.) 76 */ 77 #ifdef __linux__ 78 #ifdef __NORETURN 79 #ifdef __NORETURN2 80 extern __NORETURN void exit __P((int)) __NORETURN2; 81 #endif 82 #endif 83 #endif 84 85 #endif /* COMMON_AC_STDLIB_H */ 86