changeset 14828:90514fe74451

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>.
author Bruno Haible <bruno@clisp.org>
date Thu, 26 May 2011 12:28:51 +0200
parents 5e5b5b8d3078
children 280dc62a2e0f
files ChangeLog lib/string.in.h
diffstat 2 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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-15  James Youngman  <jay@gnu.org>
 
 	getopt: for ambiguous options, enumerate the possibilities.
--- a/lib/string.in.h
+++ b/lib/string.in.h
@@ -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)));