From 5b27b6bf76c6acbbf23dd1e461ec8941d1ec6c5a Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 12 May 2003 19:21:14 +0000 Subject: [PATCH] Module unlocked-io from gnulib. --- gettext-tools/m4/ChangeLog | 3 ++- gettext-tools/m4/Makefile.am | 1 + gettext-tools/m4/unlocked-io.m4 | 22 ++++++++++++++++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 gettext-tools/m4/unlocked-io.m4 diff --git a/gettext-tools/m4/ChangeLog b/gettext-tools/m4/ChangeLog index 346da4978..2a55ec64e 100644 --- a/gettext-tools/m4/ChangeLog +++ b/gettext-tools/m4/ChangeLog @@ -1,7 +1,8 @@ 2003-05-09 Bruno Haible * strerror_r.m4: New file, from gnulib. - * Makefile.am (EXTRA_DIST): Add it. + * unlocked-io.m4: New file, from gnulib. + * Makefile.am (EXTRA_DIST): Add them. 2003-04-29 Bruno Haible diff --git a/gettext-tools/m4/Makefile.am b/gettext-tools/m4/Makefile.am index 808470fc2..ec2310b61 100644 --- a/gettext-tools/m4/Makefile.am +++ b/gettext-tools/m4/Makefile.am @@ -56,4 +56,5 @@ strerror.m4 \ strerror_r.m4 \ tmpdir.m4 \ unionwait.m4 \ +unlocked-io.m4 \ xreadlink.m4 diff --git a/gettext-tools/m4/unlocked-io.m4 b/gettext-tools/m4/unlocked-io.m4 new file mode 100644 index 000000000..f0c15d990 --- /dev/null +++ b/gettext-tools/m4/unlocked-io.m4 @@ -0,0 +1,22 @@ +#serial 7 -*- autoconf -*- + +dnl From Jim Meyering. +dnl +dnl See if the glibc *_unlocked I/O macros or functions are available. +dnl Use only those *_unlocked macros or functions that are declared +dnl (because some of them were declared in Solaris 2.5.1 but were removed +dnl in Solaris 2.6, whereas we want binaries built on Solaris 2.5.1 to run +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]) + + AC_CHECK_DECLS_ONCE( + [clearerr_unlocked feof_unlocked ferror_unlocked + fflush_unlocked fgets_unlocked fputc_unlocked fputs_unlocked + fread_unlocked fwrite_unlocked getc_unlocked + getchar_unlocked putc_unlocked putchar_unlocked]) +]) -- 2.47.3