From 3e1218682966f9d8f92240d4185cc2218d7bf29f Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 9 Aug 2006 22:52:40 +0000 Subject: [PATCH] Remove the 'restrict' module, and modify everybody to use AC_C_RESTRICT rather than gl_C_RESTRICT. --- ChangeLog | 17 +++++++++++++++++ MODULES.html.sh | 10 ---------- m4/ChangeLog | 9 +++++++++ m4/argp.m4 | 3 ++- m4/base64.m4 | 6 +++--- m4/gc.m4 | 8 ++++++-- m4/getaddrinfo.m4 | 4 ++-- m4/glob.m4 | 3 ++- m4/inet_ntop.m4 | 3 ++- m4/inet_pton.m4 | 3 ++- m4/memxor.m4 | 5 +++-- m4/restrict.m4 | 38 -------------------------------------- modules/argp | 1 - modules/base64 | 1 - modules/gc | 1 - modules/getaddrinfo | 1 - modules/glob | 1 - modules/inet_ntop | 1 - modules/inet_pton | 1 - modules/memxor | 1 - modules/regex | 1 - modules/restrict | 20 -------------------- modules/strtok_r | 1 - modules/time_r | 1 - 24 files changed, 48 insertions(+), 92 deletions(-) delete mode 100644 m4/restrict.m4 delete mode 100644 modules/restrict diff --git a/ChangeLog b/ChangeLog index c640f96f9..94a8901b5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +2006-08-09 Paul Eggert + + * 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 * modules/verror: New module. diff --git a/MODULES.html.sh b/MODULES.html.sh index 31d5b35ca..923f61a32 100755 --- a/MODULES.html.sh +++ b/MODULES.html.sh @@ -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 " element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"` func_section_wrap isoc_sup_limits diff --git a/m4/ChangeLog b/m4/ChangeLog index bb522472e..d26f5dacf 100644 --- a/m4/ChangeLog +++ b/m4/ChangeLog @@ -1,5 +1,14 @@ 2006-08-09 Paul Eggert + * 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. diff --git a/m4/argp.m4 b/m4/argp.m4 index 7d761ae97..3cd609b41 100644 --- a/m4/argp.m4 +++ b/m4/argp.m4 @@ -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]) diff --git a/m4/base64.m4 b/m4/base64.m4 index 49bd32592..24801efa3 100644 --- a/m4/base64.m4 +++ b/m4/base64.m4 @@ -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]) ]) diff --git a/m4/gc.m4 b/m4/gc.m4 index e01ae29d6..359b9f12a 100644 --- 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]) + : +]) diff --git a/m4/getaddrinfo.m4 b/m4/getaddrinfo.m4 index 8d57bb327..db285d942 100644 --- a/m4/getaddrinfo.m4 +++ b/m4/getaddrinfo.m4 @@ -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]) diff --git a/m4/glob.m4 b/m4/glob.m4 index fd1fb3bd2..497677cc5 100644 --- a/m4/glob.m4 +++ b/m4/glob.m4 @@ -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 diff --git a/m4/inet_ntop.m4 b/m4/inet_ntop.m4 index 5eec8692e..bb02d2298 100644 --- a/m4/inet_ntop.m4 +++ b/m4/inet_ntop.m4 @@ -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 ]) AC_REQUIRE([gl_SOCKET_FAMILIES]) + AC_REQUIRE([AC_C_RESTRICT]) ]) diff --git a/m4/inet_pton.m4 b/m4/inet_pton.m4 index dd8c31854..85e802c8b 100644 --- a/m4/inet_pton.m4 +++ b/m4/inet_pton.m4 @@ -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 ]) AC_REQUIRE([gl_SOCKET_FAMILIES]) + AC_REQUIRE([AC_C_RESTRICT]) ]) diff --git a/m4/memxor.m4 b/m4/memxor.m4 index 96764cfbf..bf88a410d 100644 --- a/m4/memxor.m4 +++ b/m4/memxor.m4 @@ -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 index 1f3bbb92c..000000000 --- a/m4/restrict.m4 +++ /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 -]) diff --git a/modules/argp b/modules/argp index 7c5066d16..170b88083 100644 --- a/modules/argp +++ b/modules/argp @@ -25,7 +25,6 @@ strchrnul sysexits mempcpy strndup -restrict strcase extensions vsnprintf diff --git a/modules/base64 b/modules/base64 index 01662aad3..4150d5673 100644 --- a/modules/base64 +++ b/modules/base64 @@ -8,7 +8,6 @@ m4/base64.m4 Depends-on: stdbool -restrict configure.ac: gl_FUNC_BASE64 diff --git a/modules/gc b/modules/gc index be59785e7..f084b8f0d 100644 --- a/modules/gc +++ b/modules/gc @@ -9,7 +9,6 @@ m4/gc.m4 Depends-on: havelib -restrict configure.ac: gl_GC diff --git a/modules/getaddrinfo b/modules/getaddrinfo index 540ba0dbb..1fa1f18a0 100644 --- a/modules/getaddrinfo +++ b/modules/getaddrinfo @@ -8,7 +8,6 @@ lib/gai_strerror.c m4/getaddrinfo.m4 Depends-on: -restrict gettext-h snprintf socklen diff --git a/modules/glob b/modules/glob index 6537f178d..8317a67ea 100644 --- a/modules/glob +++ b/modules/glob @@ -15,7 +15,6 @@ extensions fnmatch getlogin_r mempcpy -restrict stat-macros stdbool strdup diff --git a/modules/inet_ntop b/modules/inet_ntop index bef89bba3..a31a86b23 100644 --- a/modules/inet_ntop +++ b/modules/inet_ntop @@ -7,7 +7,6 @@ lib/inet_ntop.c m4/inet_ntop.m4 Depends-on: -restrict socklen sys_socket arpa_inet diff --git a/modules/inet_pton b/modules/inet_pton index c715f0265..1ac280e42 100644 --- a/modules/inet_pton +++ b/modules/inet_pton @@ -7,7 +7,6 @@ lib/inet_pton.c m4/inet_pton.m4 Depends-on: -restrict socklen sys_socket arpa_inet diff --git a/modules/memxor b/modules/memxor index d2db999cf..2fdcb3e4a 100644 --- a/modules/memxor +++ b/modules/memxor @@ -7,7 +7,6 @@ lib/memxor.c m4/memxor.m4 Depends-on: -restrict configure.ac: gl_MEMXOR diff --git a/modules/regex b/modules/regex index ca33d427a..3f88f4051 100644 --- a/modules/regex +++ b/modules/regex @@ -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 index 0b5ff3563..000000000 --- a/modules/restrict +++ /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 diff --git a/modules/strtok_r b/modules/strtok_r index 92aa8eb91..32134ba07 100644 --- a/modules/strtok_r +++ b/modules/strtok_r @@ -7,7 +7,6 @@ lib/strtok_r.h m4/strtok_r.m4 Depends-on: -restrict configure.ac: gl_FUNC_STRTOK_R diff --git a/modules/time_r b/modules/time_r index fa27b48b8..96df2f781 100644 --- a/modules/time_r +++ b/modules/time_r @@ -8,7 +8,6 @@ m4/time_r.m4 Depends-on: extensions -restrict configure.ac: gl_TIME_R -- 2.11.0