From b3d2e56d64780134576d961c7f8f4c47179aac84 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 23 Aug 2003 14:50:59 +0000 Subject: [PATCH] Persuade also Solaris to declare the *_unlocked() functions. --- gettext-tools/m4/ChangeLog | 10 ++++++++++ gettext-tools/m4/Makefile.am | 1 + gettext-tools/m4/extensions.m4 | 15 +++++++++++++++ gettext-tools/m4/unlocked-io.m4 | 8 ++++---- 4 files changed, 30 insertions(+), 4 deletions(-) create mode 100644 gettext-tools/m4/extensions.m4 diff --git a/gettext-tools/m4/ChangeLog b/gettext-tools/m4/ChangeLog index 51c3f9963..41ee008a1 100644 --- a/gettext-tools/m4/ChangeLog +++ b/gettext-tools/m4/ChangeLog @@ -1,3 +1,13 @@ +2003-08-23 Bruno Haible + + * Makefile.am (EXTRA_DIST): Add extensions.m4. + +2003-08-08 Paul Eggert + + * extensions.m4: New file. + * unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): + Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE. + 2003-07-01 Paul Eggert * xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since diff --git a/gettext-tools/m4/Makefile.am b/gettext-tools/m4/Makefile.am index 32e11c303..42e77e02c 100644 --- a/gettext-tools/m4/Makefile.am +++ b/gettext-tools/m4/Makefile.am @@ -39,6 +39,7 @@ backupfile.m4 \ canonicalize.m4 \ eaccess.m4 \ error.m4 \ +extensions.m4 \ flex.m4 \ fnmatch.m4 \ gcj.m4 \ diff --git a/gettext-tools/m4/extensions.m4 b/gettext-tools/m4/extensions.m4 new file mode 100644 index 000000000..7faaa833b --- /dev/null +++ b/gettext-tools/m4/extensions.m4 @@ -0,0 +1,15 @@ +# gl_USE_SYSTEM_EXTENSIONS +# ------------------------ +# Enable extensions on systems that normally disable them, +# typically due to standards-conformance issues. +AC_DEFUN([gl_USE_SYSTEM_EXTENSIONS], [ + AC_REQUIRE([AC_GNU_SOURCE]) + AH_VERBATIM([__EXTENSIONS__], +[/* Enable extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# undef __EXTENSIONS__ +#endif]) + AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl + AC_BEFORE([$0], [AC_RUN_IFELSE])dnl + AC_DEFINE([__EXTENSIONS__]) +]) diff --git a/gettext-tools/m4/unlocked-io.m4 b/gettext-tools/m4/unlocked-io.m4 index f0c15d990..f8e98f1d1 100644 --- a/gettext-tools/m4/unlocked-io.m4 +++ b/gettext-tools/m4/unlocked-io.m4 @@ -1,4 +1,4 @@ -#serial 7 -*- autoconf -*- +#serial 8 -*- autoconf -*- dnl From Jim Meyering. dnl @@ -10,9 +10,9 @@ dnl on Solaris 2.6). AC_DEFUN([jm_FUNC_GLIBC_UNLOCKED_IO], [ - dnl Persuade glibc to declare fgets_unlocked(), fputs_unlocked() - dnl etc. - AC_REQUIRE([AC_GNU_SOURCE]) + dnl Persuade glibc and Solaris to declare + dnl fgets_unlocked(), fputs_unlocked() etc. + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) AC_CHECK_DECLS_ONCE( [clearerr_unlocked feof_unlocked ferror_unlocked -- 2.47.3