unistr/u8-strcmp: Avoid collision with libc function on Solaris 11.
authorBruno Haible <bruno@clisp.org>
Tue, 7 Dec 2010 02:32:46 +0000 (03:32 +0100)
committerBruno Haible <bruno@clisp.org>
Tue, 7 Dec 2010 02:32:46 +0000 (03:32 +0100)
* lib/unistr.in.h (u8_strcmp) [__sun]: Declare with real name
u8_strcmp_gnu.
* modules/unistr/u8-strcmp (configure.ac): Bump version number.

ChangeLog
lib/unistr.in.h
modules/unistr/u8-strcmp

index fc04230..b1ad470 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-12-07  Bruno Haible  <bruno@clisp.org>
+
+       unistr/u8-strcmp: Avoid collision with libc function on Solaris 11.
+       * lib/unistr.in.h (u8_strcmp) [__sun]: Declare with real name
+       u8_strcmp_gnu.
+       * modules/unistr/u8-strcmp (configure.ac): Bump version number.
+
 2010-12-06  Bruno Haible  <bruno@clisp.org>
 
        Update internal documentation.
index e574f94..2e7c618 100644 (file)
@@ -559,8 +559,15 @@ extern uint32_t *
 
 /* Compare S1 and S2.  */
 /* Similar to strcmp(), wcscmp().  */
+#ifdef __sun
+/* Avoid a collision with the u8_strcmp() function in Solaris 11 libc.  */
+extern int
+       u8_strcmp_gnu (const uint8_t *s1, const uint8_t *s2);
+# define u8_strcmp u8_strcmp_gnu
+#else
 extern int
        u8_strcmp (const uint8_t *s1, const uint8_t *s2);
+#endif
 extern int
        u16_strcmp (const uint16_t *s1, const uint16_t *s2);
 extern int
index 32ea95b..8d81f4d 100644 (file)
@@ -8,7 +8,7 @@ Depends-on:
 unistr/base
 
 configure.ac:
-gl_LIBUNISTRING_MODULE([0.9], [unistr/u8-strcmp])
+gl_LIBUNISTRING_MODULE([0.9.4], [unistr/u8-strcmp])
 
 Makefile.am:
 if LIBUNISTRING_COMPILE_UNISTR_U8_STRCMP