]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Module unlocked-io from gnulib.
authorBruno Haible <bruno@clisp.org>
Mon, 12 May 2003 19:21:14 +0000 (19:21 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:10:29 +0000 (12:10 +0200)
gettext-tools/m4/ChangeLog
gettext-tools/m4/Makefile.am
gettext-tools/m4/unlocked-io.m4 [new file with mode: 0644]

index 346da497826acca8ce1fce324dcd4f0b3a3d232b..2a55ec64ef23b6ece104cad2b4ccba89b3df29dd 100644 (file)
@@ -1,7 +1,8 @@
 2003-05-09  Bruno Haible  <bruno@clisp.org>
 
        * 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  <bruno@clisp.org>
 
index 808470fc2d607c869bac2cf238e09f7ef04d9025..ec2310b61d5dea5b5c122bde5836d8ac9bbf567f 100644 (file)
@@ -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 (file)
index 0000000..f0c15d9
--- /dev/null
@@ -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 <stdio.h> 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])
+])