summaryrefslogtreecommitdiffstats
path: root/include/iconv.h
diff options
context:
space:
mode:
authortheraven <theraven@FreeBSD.org>2013-09-06 09:46:44 +0000
committertheraven <theraven@FreeBSD.org>2013-09-06 09:46:44 +0000
commitc04dfb0b1932e7a84103ade5ccddab95eb4d5a28 (patch)
treef507ed7cb6b08b5b63fc242bc2de8c7e231b28ea /include/iconv.h
parent178dd060a80512b07630eb7f22500ed9871ca84c (diff)
downloadFreeBSD-src-c04dfb0b1932e7a84103ade5ccddab95eb4d5a28.zip
FreeBSD-src-c04dfb0b1932e7a84103ade5ccddab95eb4d5a28.tar.gz
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.
Diffstat (limited to 'include/iconv.h')
-rw-r--r--include/iconv.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/iconv.h b/include/iconv.h
index 3423a24..69cc2c7 100644
--- a/include/iconv.h
+++ b/include/iconv.h
@@ -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 *);
OpenPOWER on IntegriCloud