From: Hasso Tepper Date: Mon, 10 Mar 2008 12:01:50 +0000 (+0000) Subject: Remove #ifndef __cplusplus around wchar related stuff in include/wchar.h X-Git-Tag: v2.0.1~990 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/b9286c919de6585c967b8dbf2c472fba7b33f9f1 Remove #ifndef __cplusplus around wchar related stuff in include/wchar.h and sys/sys/stdint.h headers. It allows to build libstdc++ with std::w* (wstring, wint_t etc) support. Amongst others fixes building boost libraries with g++41. Approved-by: corecode@ --- diff --git a/gnu/lib/gcc41/libstdc++/config.h b/gnu/lib/gcc41/libstdc++/config.h index 769f2fb87b..a8fce3ae47 100644 --- a/gnu/lib/gcc41/libstdc++/config.h +++ b/gnu/lib/gcc41/libstdc++/config.h @@ -1,4 +1,4 @@ -/* $DragonFly: src/gnu/lib/gcc41/libstdc++/config.h,v 1.1 2006/09/27 12:10:33 corecode Exp $ */ +/* $DragonFly: src/gnu/lib/gcc41/libstdc++/config.h,v 1.2 2008/03/10 12:01:50 hasso Exp $ */ /* config.h. Generated by configure. */ /* config.h.in. Generated from configure.ac by autoheader. */ @@ -127,13 +127,13 @@ /* #undef HAVE_HYPOTL */ /* Define to 1 if you have the `iconv' function. */ -/* #undef HAVE_ICONV */ +#define HAVE_ICONV 1 /* Define to 1 if you have the `iconv_close' function. */ -/* #undef HAVE_ICONV_CLOSE */ +#define HAVE_ICONV_CLOSE 1 /* Define to 1 if you have the `iconv_open' function. */ -/* #undef HAVE_ICONV_OPEN */ +#define HAVE_ICONV_OPEN 1 /* Define to 1 if you have the header file. */ #define HAVE_IEEEFP_H 1 @@ -238,7 +238,7 @@ /* #undef HAVE_NAN_H */ /* Define to 1 if you have the `nl_langinfo' function. */ -/* #undef HAVE_NL_LANGINFO */ +#define HAVE_NL_LANGINFO 1 /* Define if poll is available in . */ #define HAVE_POLL 1 @@ -689,7 +689,7 @@ #define _GLIBCXX_USE_C99_MATH 1 /* Define if iconv and related functions exist and are usable. */ -/* #undef _GLIBCXX_USE_ICONV */ +#define _GLIBCXX_USE_ICONV 1 /* Define if LFS support is available. */ /* #undef _GLIBCXX_USE_LFS */ @@ -701,7 +701,7 @@ /* #undef _GLIBCXX_USE_NLS */ /* Define if code specialized for wchar_t should be used. */ -/* #undef _GLIBCXX_USE_WCHAR_T */ +#define _GLIBCXX_USE_WCHAR_T 1 #if defined (HAVE__ACOSF) && ! defined (HAVE_ACOSF) # define HAVE_ACOSF 1 diff --git a/include/wchar.h b/include/wchar.h index cf3c23024d..41286e74c2 100644 --- a/include/wchar.h +++ b/include/wchar.h @@ -1,5 +1,5 @@ /* $NetBSD: src/include/wchar.h,v 1.20 2004/05/08 21:57:05 kleink Exp $ */ -/* $DragonFly: src/include/wchar.h,v 1.10 2005/09/22 23:50:10 corecode Exp $ */ +/* $DragonFly: src/include/wchar.h,v 1.11 2008/03/10 12:01:50 hasso Exp $ */ /*- * Copyright (c)1999 Citrus Project, @@ -76,7 +76,6 @@ #define NULL 0 #endif -#ifndef __cplusplus #ifndef _WCHAR_T_DECLARED #define _WCHAR_T_DECLARED typedef __wchar_t wchar_t; @@ -89,7 +88,6 @@ typedef __wchar_t wchar_t; #ifndef WCHAR_MAX #define WCHAR_MAX INT_MAX #endif -#endif /* !__cplusplus */ #ifndef _WINT_T_DECLARED #define _WINT_T_DECLARED diff --git a/sys/sys/stdint.h b/sys/sys/stdint.h index 7defe7dad6..b031f1e1a9 100644 --- a/sys/sys/stdint.h +++ b/sys/sys/stdint.h @@ -1,7 +1,7 @@ /* * This file is in the public domain. * $FreeBSD: src/sys/sys/inttypes.h,v 1.2 1999/08/28 00:51:47 peter Exp $ - * $DragonFly: src/sys/sys/stdint.h,v 1.3 2005/04/21 16:36:35 joerg Exp $ + * $DragonFly: src/sys/sys/stdint.h,v 1.4 2008/03/10 12:01:50 hasso Exp $ * * Note: since portions of these header files can be included with various * other combinations of defines, we cannot surround the whole header file @@ -27,9 +27,7 @@ * as 31 bit standard and all supported architectures have * sizeof(int) >= 4. */ -#ifndef __cplusplus typedef int __wchar_t; -#endif typedef int __wint_t; typedef int __rune_t; typedef void *__wctrans_t;