Hi Will, I've pushed the patch to gettext master, with the #ifdef modification: http://git.savannah.gnu.org/cgit/gettext.git/commit/?id=d5c2a516 I've tested it on Fedora 21, and also FreeBSD 10 where HAVE_DECL_FGETS_UNLOCKED is 0.
The attached is a diff from glibc master. By the way, is it intentional that intl/l10nflist.c is not in sync? Thanks, -- Daiki Ueno
>From dce2bfca06f5a9a846e9cafbc75b964621267fb0 Mon Sep 17 00:00:00 2001 From: Daiki Ueno <u...@gnu.org> Date: Wed, 21 Jan 2015 17:26:58 +0900 Subject: [PATCH] intl: Adjust after the last sync with gettext * intl/localealias.c: Check the value of HAVE_DECL_FGETS_UNLOCKED and HAVE_DECL_FEOF_UNLOCKED for non-glibc platforms. See <https://lists.gnu.org/archive/html/bug-gettext/2014-12/msg00027.html>. * intl/plural-exp.c: Fix minor formatting. --- ChangeLog | 7 +++++++ intl/localealias.c | 6 ++++-- intl/plural-exp.c | 4 ++-- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7392f2f..bf8d14d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2015-01-21 Daiki Ueno <u...@gnu.org> + + * intl/localealias.c: Check the value of HAVE_DECL_FGETS_UNLOCKED + and HAVE_DECL_FEOF_UNLOCKED for non-glibc platforms. See + <https://lists.gnu.org/archive/html/bug-gettext/2014-12/msg00027.html>. + * intl/plural-exp.c: Fix minor formatting. + 2015-01-18 Chung-Lin Tang <clt...@codesourcery.com> Sandra Loosemore <san...@codesourcery.com> Andrew Jenner <and...@codesourcery.com> diff --git a/intl/localealias.c b/intl/localealias.c index 687b900..3a4d094 100644 --- a/intl/localealias.c +++ b/intl/localealias.c @@ -110,11 +110,13 @@ char *alloca (); # define freea(p) free (p) #endif -#if defined _LIBC_REENTRANT || defined HAVE_DECL_FGETS_UNLOCKED +#if defined _LIBC_REENTRANT \ + || (defined HAVE_DECL_FGETS_UNLOCKED && HAVE_DECL_FGETS_UNLOCKED) # undef fgets # define fgets(buf, len, s) fgets_unlocked (buf, len, s) #endif -#if defined _LIBC_REENTRANT || defined HAVE_DECL_FEOF_UNLOCKED +#if defined _LIBC_REENTRANT \ + || (defined HAVE_DECL_FEOF_UNLOCKED && HAVE_DECL_FEOF_UNLOCKED) # undef feof # define feof(s) feof_unlocked (s) #endif diff --git a/intl/plural-exp.c b/intl/plural-exp.c index 2361dae..d483853 100644 --- a/intl/plural-exp.c +++ b/intl/plural-exp.c @@ -25,8 +25,8 @@ #include "plural-exp.h" -#if (defined __GNUC__ && !(defined __APPLE_CC_ && __APPLE_CC__ > 1) && \ - !defined __cplusplus) \ +#if (defined __GNUC__ && !(defined __APPLE_CC_ && __APPLE_CC__ > 1) \ + && !defined __cplusplus) \ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) /* These structs are the constant expression for the germanic plural -- 2.1.0