From: Brandon Casey Date: Fri, 05 Jun 2009 23:36:12 GMT Subject: [PATCH 4/8] On Solaris choose the OLD_ICONV iconv() declaration based on the UNIX spec Message-ID: <67hZHClrEWQHxCRdWosE28bOBU_EdMUdyv6uENKCaQfOLQjhGBq3kLwxe6mMrfW4HauaUwWt5eM@cipher.nrlssc.navy.mil> In-Reply-To: <67hZHClrEWQHxCRdWosE24FbCSWPktK230jx86LzLj0Aqa5g5XoJb3Iv805pzfx5wCPameuSp6M@cipher.nrlssc.navy.mil> From: Brandon Casey OLD_ICONV is only necessary on Solaris until UNIX03. This is indicated by the private macro _XPG6 which is set in /usr/include/sys/feature_tests.h. Signed-off-by: Brandon Casey --- Makefile | 3 --- utf8.c | 2 +- 2 files changed, 1 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 40642f7..375cf2a 100644 --- a/Makefile +++ b/Makefile @@ -714,9 +714,6 @@ ifeq ($(uname_S),SunOS) NO_MEMMEM = YesPlease NO_MKDTEMP = YesPlease NO_MKSTEMPS = YesPlease - ifneq ($(uname_R),5.11) - OLD_ICONV = UnfortunatelyYes - endif ifeq ($(uname_R),5.8) NO_UNSETENV = YesPlease NO_SETENV = YesPlease diff --git a/utf8.c b/utf8.c index ddfdc5e..db706ac 100644 --- a/utf8.c +++ b/utf8.c @@ -354,7 +354,7 @@ int is_encoding_utf8(const char *name) * with iconv. If the conversion fails, returns NULL. */ #ifndef NO_ICONV -#ifdef OLD_ICONV +#if defined(OLD_ICONV) || (defined(__sun__) && !defined(_XPG6)) typedef const char * iconv_ibp; #else typedef char * iconv_ibp; -- 1.6.3.1.24.g152f4