Date: Sat, 19 May 2012 23:51:49 +0000 (UTC) From: Andrew Turner <andrew@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r235672 - in projects/arm_eabi/sys: amd64/include i386/include ia64/include mips/include pc98/include powerpc/include sparc64/include x86/include Message-ID: <201205192351.q4JNpnAq053531@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: andrew Date: Sat May 19 23:51:48 2012 New Revision: 235672 URL: http://svn.freebsd.org/changeset/base/235672 Log: Fix wchar support in the not ARM case. * Add machine/_wchar.h to define WCHAR_{MIN,MAX} and include it from machine/_stdint.h, it is already in wchar.h. * Add the typedef for __wchar_t to machine/_types.h. Added: projects/arm_eabi/sys/amd64/include/_wchar.h projects/arm_eabi/sys/i386/include/_wchar.h projects/arm_eabi/sys/ia64/include/_wchar.h projects/arm_eabi/sys/mips/include/_wchar.h projects/arm_eabi/sys/pc98/include/_wchar.h projects/arm_eabi/sys/powerpc/include/_wchar.h projects/arm_eabi/sys/sparc64/include/_wchar.h projects/arm_eabi/sys/x86/include/_wchar.h Modified: projects/arm_eabi/sys/ia64/include/_stdint.h projects/arm_eabi/sys/ia64/include/_types.h projects/arm_eabi/sys/mips/include/_stdint.h projects/arm_eabi/sys/mips/include/_types.h projects/arm_eabi/sys/powerpc/include/_stdint.h projects/arm_eabi/sys/powerpc/include/_types.h projects/arm_eabi/sys/sparc64/include/_stdint.h projects/arm_eabi/sys/sparc64/include/_types.h projects/arm_eabi/sys/x86/include/_stdint.h projects/arm_eabi/sys/x86/include/_types.h Added: projects/arm_eabi/sys/amd64/include/_wchar.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/arm_eabi/sys/amd64/include/_wchar.h Sat May 19 23:51:48 2012 (r235672) @@ -0,0 +1,6 @@ +/*- + * This file is in the public domain. + */ +/* $FreeBSD$ */ + +#include <x86/_wchar.h> Added: projects/arm_eabi/sys/i386/include/_wchar.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/arm_eabi/sys/i386/include/_wchar.h Sat May 19 23:51:48 2012 (r235672) @@ -0,0 +1,6 @@ +/*- + * This file is in the public domain. + */ +/* $FreeBSD$ */ + +#include <x86/_wchar.h> Modified: projects/arm_eabi/sys/ia64/include/_stdint.h ============================================================================== --- projects/arm_eabi/sys/ia64/include/_stdint.h Sat May 19 23:25:57 2012 (r235671) +++ projects/arm_eabi/sys/ia64/include/_stdint.h Sat May 19 23:51:48 2012 (r235672) @@ -52,6 +52,8 @@ #if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) +#include <machine/_wchar.h> + /* * ISO/IEC 9899:1999 * 7.18.2.1 Limits of exact-width integer types @@ -149,12 +151,6 @@ /* Limit of size_t. */ #define SIZE_MAX UINT64_MAX -#ifndef WCHAR_MIN /* Also possibly defined in <wchar.h> */ -/* Limits of wchar_t. */ -#define WCHAR_MIN INT32_MIN -#define WCHAR_MAX INT32_MAX -#endif - /* Limits of wint_t. */ #define WINT_MIN INT32_MIN #define WINT_MAX INT32_MAX Modified: projects/arm_eabi/sys/ia64/include/_types.h ============================================================================== --- projects/arm_eabi/sys/ia64/include/_types.h Sat May 19 23:25:57 2012 (r235671) +++ projects/arm_eabi/sys/ia64/include/_types.h Sat May 19 23:51:48 2012 (r235672) @@ -115,4 +115,6 @@ typedef char * __va_list; /* non-funct #endif /* lint */ #endif /* __GNUCLIKE_BUILTIN_VARARGS */ +typedef int __wchar_t; + #endif /* !_MACHINE__TYPES_H_ */ Added: projects/arm_eabi/sys/ia64/include/_wchar.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/arm_eabi/sys/ia64/include/_wchar.h Sat May 19 23:51:48 2012 (r235672) @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2011 Andrew Turner + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _IA64_INCLUDE__WCHAR_H_ +#define _IA64_INCLUDE__WCHAR_H_ + +/* Limits of wchar_t. */ +#define WCHAR_MIN __INT_MIN +#define WCHAR_MAX __INT_MAX + +#endif /* _IA64_INCLUDE__WCHAR_H_ */ + Modified: projects/arm_eabi/sys/mips/include/_stdint.h ============================================================================== --- projects/arm_eabi/sys/mips/include/_stdint.h Sat May 19 23:25:57 2012 (r235671) +++ projects/arm_eabi/sys/mips/include/_stdint.h Sat May 19 23:51:48 2012 (r235672) @@ -66,6 +66,8 @@ #if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) +#include <machine/_wchar.h> + #ifdef __mips_n64 #define __INT64_C(c) (c ## L) #define __UINT64_C(c) (c ## UL) @@ -186,12 +188,6 @@ #define SIG_ATOMIC_MIN INT32_MIN #define SIG_ATOMIC_MAX INT32_MAX -#ifndef WCHAR_MIN /* Also possibly defined in <wchar.h> */ -/* Limits of wchar_t. */ -#define WCHAR_MIN INT32_MIN -#define WCHAR_MAX INT32_MAX -#endif - /* Limits of wint_t. */ #define WINT_MIN INT32_MIN #define WINT_MAX INT32_MAX Modified: projects/arm_eabi/sys/mips/include/_types.h ============================================================================== --- projects/arm_eabi/sys/mips/include/_types.h Sat May 19 23:25:57 2012 (r235671) +++ projects/arm_eabi/sys/mips/include/_types.h Sat May 19 23:51:48 2012 (r235672) @@ -160,4 +160,6 @@ typedef char * __va_list; typedef __va_list __gnuc_va_list; /* compatibility w/GNU headers*/ #endif +typedef int __wchar_t; + #endif /* !_MACHINE__TYPES_H_ */ Added: projects/arm_eabi/sys/mips/include/_wchar.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/arm_eabi/sys/mips/include/_wchar.h Sat May 19 23:51:48 2012 (r235672) @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2011 Andrew Turner + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _MIPS_INCLUDE__WCHAR_H_ +#define _MIPS_INCLUDE__WCHAR_H_ + +/* Limits of wchar_t. */ +#define WCHAR_MIN __INT_MIN +#define WCHAR_MAX __INT_MAX + +#endif /* _MIPS_INCLUDE__WCHAR_H_ */ + Added: projects/arm_eabi/sys/pc98/include/_wchar.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/arm_eabi/sys/pc98/include/_wchar.h Sat May 19 23:51:48 2012 (r235672) @@ -0,0 +1,6 @@ +/*- + * This file is in the public domain. + */ +/* $FreeBSD$ */ + +#include <x86/_wchar.h> Modified: projects/arm_eabi/sys/powerpc/include/_stdint.h ============================================================================== --- projects/arm_eabi/sys/powerpc/include/_stdint.h Sat May 19 23:25:57 2012 (r235671) +++ projects/arm_eabi/sys/powerpc/include/_stdint.h Sat May 19 23:51:48 2012 (r235672) @@ -65,6 +65,8 @@ #if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) +#include <machine/_wchar.h> + #ifdef __LP64__ #define __INT64_C(c) (c ## L) #define __UINT64_C(c) (c ## UL) @@ -189,12 +191,6 @@ #define SIZE_MAX UINT32_MAX #endif -#ifndef WCHAR_MIN /* Also possibly defined in <wchar.h> */ -/* Limits of wchar_t. */ -#define WCHAR_MIN INT32_MIN -#define WCHAR_MAX INT32_MAX -#endif - /* Limits of wint_t. */ #define WINT_MIN INT32_MIN #define WINT_MAX INT32_MAX Modified: projects/arm_eabi/sys/powerpc/include/_types.h ============================================================================== --- projects/arm_eabi/sys/powerpc/include/_types.h Sat May 19 23:25:57 2012 (r235671) +++ projects/arm_eabi/sys/powerpc/include/_types.h Sat May 19 23:51:48 2012 (r235672) @@ -154,4 +154,6 @@ typedef struct { typedef __va_list __gnuc_va_list; /* compatibility w/GNU headers*/ #endif +typedef int __wchar_t; + #endif /* !_MACHINE__TYPES_H_ */ Added: projects/arm_eabi/sys/powerpc/include/_wchar.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/arm_eabi/sys/powerpc/include/_wchar.h Sat May 19 23:51:48 2012 (r235672) @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2011 Andrew Turner + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _POWERPC_INCLUDE__WCHAR_H_ +#define _POWERPC_INCLUDE__WCHAR_H_ + +/* Limits of wchar_t. */ +#define WCHAR_MIN __INT_MIN +#define WCHAR_MAX __INT_MAX + +#endif /* _POWERPC_INCLUDE__WCHAR_H_ */ + Modified: projects/arm_eabi/sys/sparc64/include/_stdint.h ============================================================================== --- projects/arm_eabi/sys/sparc64/include/_stdint.h Sat May 19 23:25:57 2012 (r235671) +++ projects/arm_eabi/sys/sparc64/include/_stdint.h Sat May 19 23:51:48 2012 (r235672) @@ -52,6 +52,8 @@ #if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) +#include <machine/_wchar.h> + /* * ISO/IEC 9899:1999 * 7.18.2.1 Limits of exact-width integer types @@ -149,12 +151,6 @@ /* Limit of size_t. */ #define SIZE_MAX UINT64_MAX -#ifndef WCHAR_MIN /* Also possibly defined in <wchar.h> */ -/* Limits of wchar_t. */ -#define WCHAR_MIN INT32_MIN -#define WCHAR_MAX INT32_MAX -#endif - /* Limits of wint_t. */ #define WINT_MIN INT32_MIN #define WINT_MAX INT32_MAX Modified: projects/arm_eabi/sys/sparc64/include/_types.h ============================================================================== --- projects/arm_eabi/sys/sparc64/include/_types.h Sat May 19 23:25:57 2012 (r235671) +++ projects/arm_eabi/sys/sparc64/include/_types.h Sat May 19 23:51:48 2012 (r235672) @@ -107,4 +107,6 @@ typedef char * __va_list; typedef __va_list __gnuc_va_list; /* compatibility w/GNU headers*/ #endif +typedef int __wchar_t; + #endif /* !_MACHINE__TYPES_H_ */ Added: projects/arm_eabi/sys/sparc64/include/_wchar.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/arm_eabi/sys/sparc64/include/_wchar.h Sat May 19 23:51:48 2012 (r235672) @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2011 Andrew Turner + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _SPARC64_INCLUDE__WCHAR_H_ +#define _SPARC64_INCLUDE__WCHAR_H_ + +/* Limits of wchar_t. */ +#define WCHAR_MIN __INT_MIN +#define WCHAR_MAX __INT_MAX + +#endif /* _SPARC64_INCLUDE__WCHAR_H_ */ + Modified: projects/arm_eabi/sys/x86/include/_stdint.h ============================================================================== --- projects/arm_eabi/sys/x86/include/_stdint.h Sat May 19 23:25:57 2012 (r235671) +++ projects/arm_eabi/sys/x86/include/_stdint.h Sat May 19 23:51:48 2012 (r235672) @@ -65,6 +65,8 @@ #if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) +#include <machine/_wchar.h> + /* * ISO/IEC 9899:1999 * 7.18.2.1 Limits of exact-width integer types @@ -180,12 +182,6 @@ #define SIZE_MAX UINT32_MAX #endif -#ifndef WCHAR_MIN /* Also possibly defined in <wchar.h> */ -/* Limits of wchar_t. */ -#define WCHAR_MIN INT32_MIN -#define WCHAR_MAX INT32_MAX -#endif - /* Limits of wint_t. */ #define WINT_MIN INT32_MIN #define WINT_MAX INT32_MAX Modified: projects/arm_eabi/sys/x86/include/_types.h ============================================================================== --- projects/arm_eabi/sys/x86/include/_types.h Sat May 19 23:25:57 2012 (r235671) +++ projects/arm_eabi/sys/x86/include/_types.h Sat May 19 23:51:48 2012 (r235672) @@ -157,4 +157,6 @@ typedef char * __va_list; /* pretend * typedef __va_list __gnuc_va_list; /* compatibility w/GNU headers*/ #endif +typedef int __wchar_t; + #endif /* !_MACHINE__TYPES_H_ */ Added: projects/arm_eabi/sys/x86/include/_wchar.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/arm_eabi/sys/x86/include/_wchar.h Sat May 19 23:51:48 2012 (r235672) @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2011 Andrew Turner + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _X86_INCLUDE__WCHAR_H_ +#define _X86_INCLUDE__WCHAR_H_ + +/* Limits of wchar_t. */ +#define WCHAR_MIN __INT_MIN +#define WCHAR_MAX __INT_MAX + +#endif /* _X86_INCLUDE__WCHAR_H_ */ +
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201205192351.q4JNpnAq053531>