changeset 18782:416b8a261ec5

regex: port better to Solaris 10 Solaris 10 <locale.h> includes <libintl.h>, which #defines gettext, and this causes a double #define. Problem reported by Gavin Smith in: http://lists.gnu.org/archive/html/bug-gnulib/2017-04/msg00056.html * lib/regex_internal.h (gettext): #undef before #defining.
author Paul Eggert <eggert@cs.ucla.edu>
date Sun, 16 Apr 2017 12:43:20 -0700
parents 873ea29f4b3b
children e20f12b8499c
files ChangeLog lib/regex_internal.h
diffstat 2 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sat Apr 15 14:37:10 2017 -0700
+++ b/ChangeLog	Sun Apr 16 12:43:20 2017 -0700
@@ -1,3 +1,12 @@
+2017-04-16  Paul Eggert  <eggert@cs.ucla.edu>
+
+	regex: port better to Solaris 10
+	Solaris 10 <locale.h> includes <libintl.h>, which #defines
+	gettext, and this causes a double #define.
+	Problem reported by Gavin Smith in:
+	http://lists.gnu.org/archive/html/bug-gnulib/2017-04/msg00056.html
+	* lib/regex_internal.h (gettext): #undef before #defining.
+
 2017-04-15  Paul Eggert  <eggert@Penguin.CS.UCLA.EDU>
 
 	intprops: improve comments
--- a/lib/regex_internal.h	Sat Apr 15 14:37:10 2017 -0700
+++ b/lib/regex_internal.h	Sun Apr 16 12:43:20 2017 -0700
@@ -102,6 +102,7 @@
   __dcgettext (_libc_intl_domainname, msgid, LC_MESSAGES)
 # endif
 #else
+# undef gettext
 # define gettext(msgid) (msgid)
 #endif