[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: patch on x86-interix
From: |
Bruno Haible |
Subject: |
Re: patch on x86-interix |
Date: |
Thu, 26 May 2011 12:30:32 +0200 |
User-agent: |
KMail/1.9.9 |
Markus Duft wrote:
> it complains that:
>
> In file included from localcharset.c:29:
> ./string.h:1059: error: conflicting types for 'mbsrchr'
> /usr/include/string.h:84: error: previous declaration of 'mbsrchr' was here
> make[4]: *** [localcharset.o] Error 1
>
> where /usr/include/string.h does:
>
> extern char * __cdecl mbsrchr(const char *, char);
I'm adding this workaround:
2011-05-26 Bruno Haible <address@hidden>
mbsrchr: Avoid collision with system function on Interix.
* lib/string.in.h (mbsrchr): Define as rpl_mbsrchr also on Interix.
Reported by Markus Duft <address@hidden>.
--- lib/string.in.h.orig Thu May 26 12:26:58 2011
+++ lib/string.in.h Thu May 26 12:26:48 2011
@@ -736,9 +736,9 @@
and return a pointer to it. Return NULL if C is not found in STRING.
Unlike strrchr(), this function works correctly in multibyte locales with
encodings such as GB18030. */
-# if defined __hpux
+# if defined __hpux || defined __INTERIX
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-# define mbsrchr rpl_mbsrchr /* avoid collision with HP-UX function */
+# define mbsrchr rpl_mbsrchr /* avoid collision with system function */
# endif
_GL_FUNCDECL_RPL (mbsrchr, char *, (const char *string, int c)
_GL_ARG_NONNULL ((1)));
--
In memoriam Jeane Gardiner <http://en.wikipedia.org/wiki/Jeane_Gardiner>