From d1c9bfc1970d1ccb597d323290c636c968d6cce0 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Thu, 26 May 2011 12:28:51 +0200 Subject: [PATCH] mbsrchr: Avoid collision with system function on Interix. * lib/string.in.h (mbsrchr): Define as rpl_mbsrchr also on Interix. Reported by Markus Duft . (cherry picked from commit 4ed9779262a129dea15e31e301389c09e9b876bf) --- ChangeLog | 6 ++++++ lib/string.in.h | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 951081676..b736cb31c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2011-05-26 Bruno Haible + + mbsrchr: Avoid collision with system function on Interix. + * lib/string.in.h (mbsrchr): Define as rpl_mbsrchr also on Interix. + Reported by Markus Duft . + 2011-05-25 Eric Blake getcwd: work around mingw bug diff --git a/lib/string.in.h b/lib/string.in.h index f120a1b09..eef9db04a 100644 --- a/lib/string.in.h +++ b/lib/string.in.h @@ -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))); -- 2.11.0