Author: theraven Date: Fri Sep 6 09:46:44 2013 New Revision: 255297 URL: http://svnweb.freebsd.org/changeset/base/255297
Log: Fix the namespace pollution caused by iconv.h including stdbool.h This broke any C89 ports that defined bool themselves, including things like gcc, gtk, and so on. Modified: head/include/iconv.h head/lib/libc/iconv/citrus_iconv_local.h head/lib/libiconv_modules/Makefile Modified: head/include/iconv.h ============================================================================== --- head/include/iconv.h Fri Sep 6 09:08:40 2013 (r255296) +++ head/include/iconv.h Fri Sep 6 09:46:44 2013 (r255297) @@ -35,7 +35,6 @@ #include <sys/cdefs.h> #include <sys/types.h> -#include <stdbool.h> #include <wchar.h> #include <sys/cdefs.h> @@ -48,6 +47,13 @@ #define libiconv iconv #define libiconv_t iconv_t #endif +#ifdef __cplusplus +typedef bool __iconv_bool; +#elif __STDC_VERSION__ >= 199901L +typedef _Bool __iconv_bool; +#else +typedef int __iconv_bool; +#endif struct __tag_iconv_t; typedef struct __tag_iconv_t *iconv_t; @@ -61,7 +67,7 @@ int iconv_close(iconv_t); /* * non-portable interfaces for iconv */ -int __iconv_get_list(char ***, size_t *, bool); +int __iconv_get_list(char ***, size_t *, __iconv_bool); void __iconv_free_list(char **, size_t); size_t __iconv(iconv_t, const char **, size_t *, char **, size_t *, __uint32_t, size_t *); Modified: head/lib/libc/iconv/citrus_iconv_local.h ============================================================================== --- head/lib/libc/iconv/citrus_iconv_local.h Fri Sep 6 09:08:40 2013 (r255296) +++ head/lib/libc/iconv/citrus_iconv_local.h Fri Sep 6 09:46:44 2013 (r255297) @@ -31,6 +31,7 @@ #define _CITRUS_ICONV_LOCAL_H_ #include <iconv.h> +#include <stdbool.h> #define _CITRUS_ICONV_GETOPS_FUNC_BASE(_n_) \ int _n_(struct _citrus_iconv_ops *) Modified: head/lib/libiconv_modules/Makefile ============================================================================== --- head/lib/libiconv_modules/Makefile Fri Sep 6 09:08:40 2013 (r255296) +++ head/lib/libiconv_modules/Makefile Fri Sep 6 09:46:44 2013 (r255297) @@ -2,6 +2,9 @@ .include <bsd.own.mk> +CFLAGS+= -Dbool=_Bool +.export CFLAGS + SUBDIR= BIG5 DECHanyu EUC EUCTW GBK2K HZ ISO2022 JOHAB MSKanji UES UTF1632 \ UTF7 UTF8 VIQR ZW iconv_none iconv_std mapper_646 mapper_none \ mapper_parallel mapper_serial mapper_std mapper_zone _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"