mbsrchr: Avoid collision with system function on Interix.
authorBruno Haible <bruno@clisp.org>
Thu, 26 May 2011 10:28:51 +0000 (12:28 +0200)
committerIan Beckwith <ianb@erislabs.net>
Thu, 9 Jun 2011 19:32:11 +0000 (20:32 +0100)
* lib/string.in.h (mbsrchr): Define as rpl_mbsrchr also on Interix.
Reported by Markus Duft <mduft@gentoo.org>.
(cherry picked from commit 4ed9779262a129dea15e31e301389c09e9b876bf)

ChangeLog
lib/string.in.h

index 9510816..b736cb3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-05-26  Bruno Haible  <bruno@clisp.org>
+
+       mbsrchr: Avoid collision with system function on Interix.
+       * lib/string.in.h (mbsrchr): Define as rpl_mbsrchr also on Interix.
+       Reported by Markus Duft <mduft@gentoo.org>.
+
 2011-05-25  Eric Blake  <eblake@redhat.com>
 
        getcwd: work around mingw bug
index f120a1b..eef9db0 100644 (file)
@@ -736,9 +736,9 @@ _GL_CXXALIASWARN (mbschr);
    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)));