Skip to content

Commit

Permalink
On Solaris choose the OLD_ICONV iconv() declaration based on the UNIX…
Browse files Browse the repository at this point in the history
… 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>
  • Loading branch information
drafnel authored and gitster committed Jun 6, 2009
1 parent 70cf991 commit 309dbc8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -705,7 +705,7 @@ ifeq ($(uname_S),SunOS)
NO_STRCASESTR = YesPlease
NO_MEMMEM = YesPlease
NO_MKDTEMP = YesPlease
OLD_ICONV = UnfortunatelyYes
NO_MKSTEMPS = YesPlease
ifeq ($(uname_R),5.8)
NO_UNSETENV = YesPlease
NO_SETENV = YesPlease
Expand Down
2 changes: 1 addition & 1 deletion utf8.c
Expand Up @@ -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;
Expand Down

0 comments on commit 309dbc8

Please sign in to comment.