@matheusbsbs / matheus-bagliano / commits / 309dbc82e3
Fork 0

On Solaris choose the OLD_ICONV iconv() declaration based on the UNIX spec

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 <drafnel@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Brandon Casey committed Jun 5, 2009 at 18:36 UTC 309dbc82e39ea0b402ea06579fd9246df5cf6a01
2 files changed +2 -2
Makefile
+1 -1
@@ -705,7 +705,7 @@ ifeq ($(uname_S),SunOS)
705 NO_STRCASESTR = YesPlease
706 NO_MEMMEM = YesPlease
707 NO_MKDTEMP = YesPlease
708 - OLD_ICONV = UnfortunatelyYes
708 + NO_MKSTEMPS = YesPlease
709 ifeq ($(uname_R),5.8)
710 NO_UNSETENV = YesPlease
711 NO_SETENV = YesPlease
utf8.c
+1 -1
@@ -354,7 +354,7 @@ int is_encoding_utf8(const char *name)
354 * with iconv. If the conversion fails, returns NULL.
355 */
356 #ifndef NO_ICONV
357 -#ifdef OLD_ICONV
357 +#if defined(OLD_ICONV) || (defined(__sun__) && !defined(_XPG6))
358 typedef const char * iconv_ibp;
359 #else
360 typedef char * iconv_ibp;