Skip to content

Commit 309dbc8

Browse files
drafnelgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 70cf991 commit 309dbc8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ ifeq ($(uname_S),SunOS)
705705
NO_STRCASESTR = YesPlease
706706
NO_MEMMEM = YesPlease
707707
NO_MKDTEMP = YesPlease
708-
OLD_ICONV = UnfortunatelyYes
708+
NO_MKSTEMPS = YesPlease
709709
ifeq ($(uname_R),5.8)
710710
NO_UNSETENV = YesPlease
711711
NO_SETENV = YesPlease

utf8.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ int is_encoding_utf8(const char *name)
354354
* with iconv. If the conversion fails, returns NULL.
355355
*/
356356
#ifndef NO_ICONV
357-
#ifdef OLD_ICONV
357+
#if defined(OLD_ICONV) || (defined(__sun__) && !defined(_XPG6))
358358
typedef const char * iconv_ibp;
359359
#else
360360
typedef char * iconv_ibp;

0 commit comments

Comments
 (0)