diff options
author | Bruno Haible <bruno@clisp.org> | 2010-12-07 03:32:46 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2010-12-07 03:32:46 +0100 |
commit | 64911207854610668b480939469282fdaeb96f74 (patch) | |
tree | fc1d9e6687ba0ad6a81268bbe82b95c13395c57d | |
parent | 19ce3a779b841b64c3f69038efbd7c36834fe260 (diff) | |
download | gnulib-64911207854610668b480939469282fdaeb96f74.tar.gz |
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.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | lib/unistr.in.h | 7 | ||||
-rw-r--r-- | modules/unistr/u8-strcmp | 2 |
3 files changed, 15 insertions, 1 deletions
@@ -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. diff --git a/lib/unistr.in.h b/lib/unistr.in.h index e574f9477e..2e7c6184ce 100644 --- a/lib/unistr.in.h +++ b/lib/unistr.in.h @@ -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 diff --git a/modules/unistr/u8-strcmp b/modules/unistr/u8-strcmp index 32ea95beb9..8d81f4dcc9 100644 --- a/modules/unistr/u8-strcmp +++ b/modules/unistr/u8-strcmp @@ -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 |