+2003-08-23 Bruno Haible <bruno@clisp.org>
+
+ * Makefile.am (EXTRA_DIST): Add extensions.m4.
+
+2003-08-08 Paul Eggert <eggert@twinsun.com>
+
+ * 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 <eggert@twinsun.com>
* xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
canonicalize.m4 \
eaccess.m4 \
error.m4 \
+extensions.m4 \
flex.m4 \
fnmatch.m4 \
gcj.m4 \
--- /dev/null
+# 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__])
+])
-#serial 7 -*- autoconf -*-
+#serial 8 -*- autoconf -*-
dnl From Jim Meyering.
dnl
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])
+ dnl Persuade glibc and Solaris <stdio.h> to declare
+ dnl fgets_unlocked(), fputs_unlocked() etc.
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
AC_CHECK_DECLS_ONCE(
[clearerr_unlocked feof_unlocked ferror_unlocked