summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2003-08-08 20:15:52 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2003-08-08 20:15:52 +0000
commit6544b9e91b88b9e4d0ee5a061515e4e6a756e2cf (patch)
tree541e899041d1d2f02acd51e9d3f2b2709934b7f8
parentfae47e13d487c642bfefe8b1b274b4fe95567b87 (diff)
downloadgnulib-6544b9e91b88b9e4d0ee5a061515e4e6a756e2cf.tar.gz
New module 'extensions', used by timespec and unlocked-io
for portability to Solaris.
-rw-r--r--ChangeLog6
-rwxr-xr-xMODULES.html.sh2
-rw-r--r--m4/ChangeLog12
-rw-r--r--m4/extensions.m415
-rw-r--r--m4/timespec.m45
-rw-r--r--m4/unlocked-io.m48
-rw-r--r--modules/extensions18
-rw-r--r--modules/gnu-source18
-rw-r--r--modules/timespec1
-rw-r--r--modules/unlocked-io1
10 files changed, 79 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 8ed6f44608..74c380fa79 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2003-08-08 Paul Eggert <eggert@twinsun.com>
+
+ * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
+ * modules/extensions, modules/gnu-source: New files.
+ * modules/timespec, modules/unlocked-io: Depend on extensions.
+
2003-08-07 Paul Eggert <eggert@twinsun.com>
* modules/restrict: New file.
diff --git a/MODULES.html.sh b/MODULES.html.sh
index 11cc04c8e0..36162a94d0 100755
--- a/MODULES.html.sh
+++ b/MODULES.html.sh
@@ -1884,10 +1884,12 @@ func_all_modules ()
func_module exitfail
func_module c-stack
func_module error
+ func_module extensions
func_module fatal
func_module getloadavg
func_module getpagesize
func_module getusershell
+ func_module gnu-source
func_module physmem
func_module posixver
func_module quotearg
diff --git a/m4/ChangeLog b/m4/ChangeLog
index 2db9e8e7da..5871661ad4 100644
--- a/m4/ChangeLog
+++ b/m4/ChangeLog
@@ -1,3 +1,11 @@
+2003-08-08 Paul Eggert <eggert@twinsun.com>
+
+ * extensions.m4: New file.
+ * timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
+ Require gl_USE_SYSTEM_EXTENSIONS.
+ * unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
+ Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
+
2003-08-07 Paul Eggert <eggert@twinsun.com>
* restrict.m4: New file.
@@ -114,7 +122,7 @@
* rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
* userspec.m4 (gl_USERSPEC): Likewise.
* xreadlink.m4 (gl_XREADLINK): Likewise.
- * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
+ * xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
* quote.m4 (gl_QUOTE): Don't check for stddef.h.
2003-05-26 Jim Meyering <jim@meyering.net>
@@ -955,7 +963,7 @@
2002-02-15 Paul Eggert <eggert@twinsun.com>
- * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
+ * prereq.m4 (jm_PREREQ_POSIXVER): New macro.
(jm_PREREQ): Use it.
2002-01-26 Jim Meyering <meyering@lucent.com>
diff --git a/m4/extensions.m4 b/m4/extensions.m4
new file mode 100644
index 0000000000..7faaa833bd
--- /dev/null
+++ b/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/m4/timespec.m4 b/m4/timespec.m4
index 5df984f347..5ca16d48dc 100644
--- a/m4/timespec.m4
+++ b/m4/timespec.m4
@@ -1,4 +1,4 @@
-#serial 6
+#serial 7
dnl From Jim Meyering
@@ -21,6 +21,9 @@ dnl in time.h or sys/time.h.
AC_DEFUN([jm_CHECK_TYPE_STRUCT_TIMESPEC],
[
+ dnl Persuade pedantic Solaris to declare struct timespec.
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
AC_REQUIRE([AC_HEADER_TIME])
AC_CHECK_HEADERS_ONCE(sys/time.h)
AC_CACHE_CHECK([for struct timespec], fu_cv_sys_struct_timespec,
diff --git a/m4/unlocked-io.m4 b/m4/unlocked-io.m4
index f0c15d990c..f8e98f1d12 100644
--- a/m4/unlocked-io.m4
+++ b/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 <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
diff --git a/modules/extensions b/modules/extensions
new file mode 100644
index 0000000000..5d88c0c650
--- /dev/null
+++ b/modules/extensions
@@ -0,0 +1,18 @@
+Description:
+Enable extensions in standard headers
+
+Files:
+m4/extensions.m4
+
+Depends-on:
+
+configure.ac:
+gl_USE_SYSTEM_EXTENSIONS
+
+Makefile.am:
+
+Include:
+
+Maintainer:
+Paul Eggert and Jim Meyering
+
diff --git a/modules/gnu-source b/modules/gnu-source
new file mode 100644
index 0000000000..fc81d05c86
--- /dev/null
+++ b/modules/gnu-source
@@ -0,0 +1,18 @@
+Description:
+Enable GNU extensions in standard headers
+
+Files:
+m4/gnu-source.m4
+
+Depends-on:
+
+configure.ac:
+AC_GNU_SOURCE
+
+Makefile.am:
+
+Include:
+
+Maintainer:
+Paul Eggert and Jim Meyering
+
diff --git a/modules/timespec b/modules/timespec
index fe8e3d8c0d..e9efb5f48f 100644
--- a/modules/timespec
+++ b/modules/timespec
@@ -7,6 +7,7 @@ m4/st_mtim.m4
m4/timespec.m4
Depends-on:
+extensions
configure.ac:
gl_TIMESPEC
diff --git a/modules/unlocked-io b/modules/unlocked-io
index 3c649a3a39..ce29ac4c0a 100644
--- a/modules/unlocked-io
+++ b/modules/unlocked-io
@@ -6,6 +6,7 @@ lib/unlocked-io.h
m4/unlocked-io.m4
Depends-on:
+extensions
configure.ac:
jm_FUNC_GLIBC_UNLOCKED_IO