From 73f2c5413d689c0b8cc958f90e55d7c3566d6684 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Fri, 7 Oct 2016 16:44:42 -0700 Subject: [PATCH] Fixed bug 2885 - SDL_stdinc.h doesn't need to include iconv.h Ryan C. Gordon We still include iconv.h in SDL_stdinc.h, probably because this header might have referenced the native iconv functions and types directly. Since these are hidden behind a stable ABI now and never just a #define for the system iconv, we shouldn't need this header included from a public SDL header anymore, slowing down external apps compiles and pulling tons of stuff into the namespace. --- include/SDL_stdinc.h | 3 --- src/stdlib/SDL_iconv.c | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/include/SDL_stdinc.h b/include/SDL_stdinc.h index 02c9e13997f7b..fdf96415fa145 100644 --- a/include/SDL_stdinc.h +++ b/include/SDL_stdinc.h @@ -83,9 +83,6 @@ #ifdef HAVE_FLOAT_H # include #endif -#if defined(HAVE_ICONV) && defined(HAVE_ICONV_H) -# include -#endif /** * The number of elements in an array. diff --git a/src/stdlib/SDL_iconv.c b/src/stdlib/SDL_iconv.c index 8f0403734057b..a5fc1ec03b1d3 100644 --- a/src/stdlib/SDL_iconv.c +++ b/src/stdlib/SDL_iconv.c @@ -31,6 +31,7 @@ #include "SDL_endian.h" #ifdef HAVE_ICONV +#include /* Depending on which standard the iconv() was implemented with, iconv() may or may not use const char ** for the inbuf param.