Remove the 'restrict' module, and modify everybody to use AC_C_RESTRICT
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 9 Aug 2006 22:52:40 +0000 (22:52 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 9 Aug 2006 22:52:40 +0000 (22:52 +0000)
rather than gl_C_RESTRICT.

24 files changed:
ChangeLog
MODULES.html.sh
m4/ChangeLog
m4/argp.m4
m4/base64.m4
m4/gc.m4
m4/getaddrinfo.m4
m4/glob.m4
m4/inet_ntop.m4
m4/inet_pton.m4
m4/memxor.m4
m4/restrict.m4 [deleted file]
modules/argp
modules/base64
modules/gc
modules/getaddrinfo
modules/glob
modules/inet_ntop
modules/inet_pton
modules/memxor
modules/regex
modules/restrict [deleted file]
modules/strtok_r
modules/time_r

index c640f96f976a5fb340204640bd53e611236b3a14..94a8901b57ff3155b4589dd642e91409594a26de 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * modules/restrict: Remove; no longer needed now that we assume
+       Autoconf 2.59 or later.
+       * MODULES.html.sh: Remove 'restrict'.
+       * modules/argp (Depends-on): Remove 'restrict'.
+       * modules/base64 (Depends-on): Likewise.
+       * modules/gc (Depends-on): Likewise.
+       * modules/getaddrinfo (Depends-on): Likewise.
+       * modules/glob (Depends-on): Likewise.
+       * modules/inet_ntop (Depends-on): Likewise.
+       * modules/inet_pton (Depends-on): Likewise.
+       * modules/memxor (Depends-on): Likewise.
+       * modules/regex (Depends-on): Likewise.
+       * modules/strtok_r (Depends-on): Likewise.
+       * modules/time_r (Depends-on): Likewise.
+
 2006-08-08  Eric Blake  <ebb9@byu.net>
 
        * modules/verror: New module.
index 31d5b35cac165da0754ca76696feb8c915331378..923f61a32bf15945ecdb81e90373d63b75692ea1 100755 (executable)
@@ -1666,16 +1666,6 @@ func_all_modules ()
   func_wrap H2
   func_echo "$element"
 
-  element="Keywords"
-  element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
-  func_section_wrap isoc_sup_keywords
-  func_wrap H3
-  func_echo "$element"
-
-  func_begin_table
-  func_module restrict
-  func_end_table
-
   element="Sizes of integer types <limits.h>"
   element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
   func_section_wrap isoc_sup_limits
index bb522472e4aaf508067ff749fc2d0744cb5c6c65..d26f5dacfd7a7c29327a8339fd7f3d54c169b4b2 100644 (file)
@@ -1,5 +1,14 @@
 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
 
+       * argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
+       * gc.m4 (gl_PREREQ_GC): Likewise.
+       * glob.m4 (gl_PREREQ_GLOB): Likewise.
+       * inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
+       * inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
+       * memxor.m4 (gl_MEMXOR): Likewise.
+       * restrict.m4: Remove; no longer needed.  All remaining uses of
+       gl_C_RESTRICT replaced by AC_C_RESTRICT.
+
        Merge from coreutils.
        * regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
        gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
index 7d761ae979b1f688d6b0f72c1743525c87973887..3cd609b4197184a22c2cfa1b40625f04f6ebd09e 100644 (file)
@@ -1,4 +1,4 @@
-# argp.m4 serial 6
+# argp.m4 serial 7
 dnl Copyright (C) 2003-2006 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -7,6 +7,7 @@ dnl with or without modifications, as long as this notice is preserved.
 AC_DEFUN([gl_ARGP],
 [
   AC_REQUIRE([AC_C_INLINE])
+  AC_REQUIRE([AC_C_RESTRICT])
   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
   AC_REQUIRE([gl_GETOPT_SUBSTITUTE])
 
index 49bd32592c96e7482a7e2ca43aaef077c0a75612..24801efa334635bca9765be3187e773acd18740b 100644 (file)
@@ -1,5 +1,5 @@
-# base64.m4 serial 2
-dnl Copyright (C) 2004 Free Software Foundation, Inc.
+# base64.m4 serial 3
+dnl Copyright (C) 2004, 2006 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -12,5 +12,5 @@ AC_DEFUN([gl_FUNC_BASE64],
 # Prerequisites of lib/base64.c.
 AC_DEFUN([gl_PREREQ_BASE64], [
   AC_REQUIRE([AC_C_INLINE])
-  AC_REQUIRE([gl_C_RESTRICT])
+  AC_REQUIRE([AC_C_RESTRICT])
 ])
index e01ae29d614bc84e7ee51bf45f0e31e6f9befbcd..359b9f12ad54884e8cd72d24d7f801040000877b 100644 (file)
--- a/m4/gc.m4
+++ b/m4/gc.m4
@@ -1,4 +1,4 @@
-# gc.m4 serial 2
+# gc.m4 serial 3
 dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -21,4 +21,8 @@ AC_DEFUN([gl_GC],
 ])
 
 # Prerequisites of lib/gc.h
-AC_DEFUN([gl_PREREQ_GC], [:])
+AC_DEFUN([gl_PREREQ_GC],
+[
+  AC_REQUIRE([AC_C_RESTRICT])
+  :
+])
index 8d57bb32765d17fdfe2e61789b15ebc2e5abe350..db285d94238641f3eb0fd9e80d6f706536036640 100644 (file)
@@ -1,4 +1,4 @@
-# getaddrinfo.m4 serial 10
+# getaddrinfo.m4 serial 11
 dnl Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -52,7 +52,7 @@ AC_DEFUN([gl_PREREQ_GETADDRINFO], [
       LIBS="$LIBS -lws2_32"
     fi
     ])
-  AC_REQUIRE([gl_C_RESTRICT])
+  AC_REQUIRE([AC_C_RESTRICT])
   AC_REQUIRE([gl_SOCKET_FAMILIES])
   AC_REQUIRE([gl_HEADER_SYS_SOCKET])
   AC_REQUIRE([AC_C_INLINE])
index fd1fb3bd2f342421ba745667f9baa7fd1605a83d..497677cc5890e11b2aaca633a8357cc51f767963 100644 (file)
@@ -1,4 +1,4 @@
-# glob.m4 serial 5
+# glob.m4 serial 6
 dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -73,6 +73,7 @@ if (glob ("conf*-globtest", 0, NULL, &found) == GLOB_NOMATCH) return 1;]]),
 # Prerequisites of lib/glob.*.
 AC_DEFUN([gl_PREREQ_GLOB],
 [ AC_REQUIRE([gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE])dnl
+  AC_REQUIRE([AC_C_RESTRICT])dnl
   AC_REQUIRE([AC_GNU_SOURCE])dnl
   AC_CHECK_HEADERS_ONCE([sys/cdefs.h unistd.h])dnl
   AC_CHECK_FUNCS_ONCE([getlogin_r getpwnam_r])dnl
index 5eec8692e7bc924d017f053fd8723c63e1f9b707..bb02d2298b9ad34079228dee5a4ccfabe07a1fdc 100644 (file)
@@ -1,4 +1,4 @@
-# inet_ntop.m4 serial 2
+# inet_ntop.m4 serial 3
 dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -15,4 +15,5 @@ AC_DEFUN([gl_PREREQ_INET_NTOP], [
   AC_CHECK_HEADERS_ONCE([netinet/in.h arpa/inet.h])
   AC_CHECK_DECLS([inet_ntop],,,[#include <arpa/inet.h>])
   AC_REQUIRE([gl_SOCKET_FAMILIES])
+  AC_REQUIRE([AC_C_RESTRICT])
 ])
index dd8c31854d118defee9431e61390ac8fdb7e73fd..85e802c8bd643a063682a35f7b25be14301ed8fa 100644 (file)
@@ -1,4 +1,4 @@
-# inet_pton.m4 serial 1
+# inet_pton.m4 serial 2
 dnl Copyright (C) 2006 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -15,4 +15,5 @@ AC_DEFUN([gl_PREREQ_INET_PTON], [
   AC_CHECK_HEADERS_ONCE([netinet/in.h arpa/inet.h])
   AC_CHECK_DECLS([inet_pton],,,[#include <arpa/inet.h>])
   AC_REQUIRE([gl_SOCKET_FAMILIES])
+  AC_REQUIRE([AC_C_RESTRICT])
 ])
index 96764cfbf629ef0905be8a7d83a3a9490e5856bd..bf88a410dc07e53cc85701ee8204d7ba16c3084f 100644 (file)
@@ -1,5 +1,5 @@
-# memxor.m4 serial 1
-dnl Copyright (C) 2005 Free Software Foundation, Inc.
+# memxor.m4 serial 2
+dnl Copyright (C) 2006 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -8,4 +8,5 @@ AC_DEFUN([gl_MEMXOR],
 [
   AC_LIBSOURCES([memxor.h, memxor.c])
   AC_LIBOBJ([memxor])
+  AC_REQUIRE([AC_C_RESTRICT])
 ])
diff --git a/m4/restrict.m4 b/m4/restrict.m4
deleted file mode 100644 (file)
index 1f3bbb9..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-#serial 1003
-dnl Copyright (C) 2003 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-# This macro can be removed once we can rely on Autoconf 2.57a or later,
-# since we can then use its AC_C_RESTRICT.
-
-# gl_C_RESTRICT
-# --------------
-# Determine whether the C/C++ compiler supports the "restrict" keyword
-# introduced in ANSI C99, or an equivalent.  Do nothing if the compiler
-# accepts it.  Otherwise, if the compiler supports an equivalent,
-# define "restrict" to be that.  Here are some variants:
-# - GCC supports both __restrict and __restrict__
-# - older DEC Alpha C compilers support only __restrict
-# - _Restrict is the only spelling accepted by Sun WorkShop 6 update 2 C
-# Otherwise, define "restrict" to be empty.
-AC_DEFUN([gl_C_RESTRICT],
-[AC_CACHE_CHECK([for C/C++ restrict keyword], gl_cv_c_restrict,
-  [gl_cv_c_restrict=no
-   # Try the official restrict keyword, then gcc's __restrict, and
-   # the less common variants.
-   for ac_kw in restrict __restrict __restrict__ _Restrict; do
-     AC_COMPILE_IFELSE([AC_LANG_SOURCE(
-      [float * $ac_kw x;])],
-      [gl_cv_c_restrict=$ac_kw; break])
-   done
-  ])
- case $gl_cv_c_restrict in
-   restrict) ;;
-   no) AC_DEFINE(restrict,,
-       [Define to equivalent of C99 restrict keyword, or to nothing if this
-       is not supported.  Do not define if restrict is supported directly.]) ;;
-   *)  AC_DEFINE_UNQUOTED(restrict, $gl_cv_c_restrict) ;;
- esac
-])
index 7c5066d169cf697e85a56993a70c7a959e583b22..170b88083aba284680f08021d421b6529116b4c3 100644 (file)
@@ -25,7 +25,6 @@ strchrnul
 sysexits
 mempcpy
 strndup
-restrict
 strcase
 extensions
 vsnprintf
index 01662aad3acbd53526a56d7787e690f3c409d7a8..4150d5673efcd846a3ec61d869fc53c6814c09bd 100644 (file)
@@ -8,7 +8,6 @@ m4/base64.m4
 
 Depends-on:
 stdbool
-restrict
 
 configure.ac:
 gl_FUNC_BASE64
index be59785e704d8f849bae91b335538fb43f7faf8e..f084b8f0dc7572355ea4db7eb01a3c6350326e32 100644 (file)
@@ -9,7 +9,6 @@ m4/gc.m4
 
 Depends-on:
 havelib
-restrict
 
 configure.ac:
 gl_GC
index 540ba0dbb0102bf1fefbb98ed549cba45b5fddbb..1fa1f18a0653d39e3146243e96da15ceadf4139c 100644 (file)
@@ -8,7 +8,6 @@ lib/gai_strerror.c
 m4/getaddrinfo.m4
 
 Depends-on:
-restrict
 gettext-h
 snprintf
 socklen
index 6537f178dfa11b2a8f1315c45e659f20ffe81f63..8317a67eae6558c7c31b612039ea6eea3b1f96dd 100644 (file)
@@ -15,7 +15,6 @@ extensions
 fnmatch
 getlogin_r
 mempcpy
-restrict
 stat-macros
 stdbool
 strdup
index bef89bba3fc6d067cc2f78715ca2866e208fb286..a31a86b23cc4f9e06537415e074cf862c1e5771b 100644 (file)
@@ -7,7 +7,6 @@ lib/inet_ntop.c
 m4/inet_ntop.m4
 
 Depends-on:
-restrict
 socklen
 sys_socket
 arpa_inet
index c715f02659dc3738b091ad384c0178d27bb9a71f..1ac280e42b359fb7e9f8c5d721aff3d9e3b7e3ef 100644 (file)
@@ -7,7 +7,6 @@ lib/inet_pton.c
 m4/inet_pton.m4
 
 Depends-on:
-restrict
 socklen
 sys_socket
 arpa_inet
index d2db999cf50578aca277d1d07812fe3534dfee3b..2fdcb3e4af5360513f9b0106631286675ce16117 100644 (file)
@@ -7,7 +7,6 @@ lib/memxor.c
 m4/memxor.m4
 
 Depends-on:
-restrict
 
 configure.ac:
 gl_MEMXOR
index ca33d427ad8f45acef76bde2921c0627c14883b8..3f88f40515dead35e8e1e5b5dff67f52569049d8 100644 (file)
@@ -16,7 +16,6 @@ alloca
 extensions
 gettext-h
 malloc
-restrict
 strcase
 ssize_t
 
diff --git a/modules/restrict b/modules/restrict
deleted file mode 100644 (file)
index 0b5ff35..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-Description:
-The C99 'restrict' keyword.
-
-Files:
-m4/restrict.m4
-
-Depends-on:
-
-configure.ac:
-gl_C_RESTRICT
-
-Makefile.am:
-
-Include:
-
-License:
-LGPL
-
-Maintainer:
-Paul Eggert and Jim Meyering
index 92aa8eb91d0376760bafb0a6a89ccd992fdc38d8..32134ba074dcd8721260295d529f9df3288458b4 100644 (file)
@@ -7,7 +7,6 @@ lib/strtok_r.h
 m4/strtok_r.m4
 
 Depends-on:
-restrict
 
 configure.ac:
 gl_FUNC_STRTOK_R
index fa27b48b84c6cc43e2cdd5b5f0dbe69ba332eb9c..96df2f781556d3882f9b1021fb8fef9bd8462dc8 100644 (file)
@@ -8,7 +8,6 @@ m4/time_r.m4
 
 Depends-on:
 extensions
-restrict
 
 configure.ac:
 gl_TIME_R