From: Paul Eggert Date: Sun, 2 Oct 2005 22:44:15 +0000 (+0000) Subject: * modules/exclude (Depends-on): Depend on verify. X-Git-Tag: cvs-readonly~2863 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=52116d1510321c620865d5643d9fa6dd17afbf48;p=gnulib.git * modules/exclude (Depends-on): Depend on verify. * modules/strtoimax (Depends-on): Likewise. * modules/utimecmp (Depends-on): Likewise. * lib/exclude.c: Include verify.h. (verify): Remove. All callers changed to use verify.h's version. * lib/strtoimax.c: Likewise. * lib/utimecmp.c: Likewis.e --- diff --git a/ChangeLog b/ChangeLog index dc84fd14a..b3593068f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-10-02 Paul Eggert + + * modules/exclude (Depends-on): Depend on verify. + * modules/strtoimax (Depends-on): Likewise. + * modules/utimecmp (Depends-on): Likewise. + 2005-09-27 Paul Eggert * modules/regex (Depends-on): Add strcase. diff --git a/lib/exclude.c b/lib/exclude.c index de1a5c3f3..6a0c14974 100644 --- a/lib/exclude.c +++ b/lib/exclude.c @@ -37,6 +37,7 @@ #include "fnmatch.h" #include "strcase.h" #include "xalloc.h" +#include "verify.h" #if USE_UNLOCKED_IO # include "unlocked-io.h" @@ -54,9 +55,6 @@ is_space (unsigned char c) return IN_CTYPE_DOMAIN (c) && isspace (c); } -/* Verify a requirement at compile-time (unlike assert, which is runtime). */ -#define verify(name, assertion) struct name { char a[(assertion) ? 1 : -1]; } - /* Non-GNU systems lack these options, so we don't need to check them. */ #ifndef FNM_CASEFOLD # define FNM_CASEFOLD 0 @@ -65,11 +63,10 @@ is_space (unsigned char c) # define FNM_LEADING_DIR 0 #endif -verify (EXCLUDE_macros_do_not_collide_with_FNM_macros, - (((EXCLUDE_ANCHORED | EXCLUDE_INCLUDE | EXCLUDE_WILDCARDS) - & (FNM_PATHNAME | FNM_NOESCAPE | FNM_PERIOD | FNM_LEADING_DIR - | FNM_CASEFOLD)) - == 0)); +verify (((EXCLUDE_ANCHORED | EXCLUDE_INCLUDE | EXCLUDE_WILDCARDS) + & (FNM_PATHNAME | FNM_NOESCAPE | FNM_PERIOD | FNM_LEADING_DIR + | FNM_CASEFOLD)) + == 0); /* An exclude pattern-options pair. The options are fnmatch options ORed with EXCLUDE_* options. */ diff --git a/lib/strtoimax.c b/lib/strtoimax.c index 43a690d24..a15b84af3 100644 --- a/lib/strtoimax.c +++ b/lib/strtoimax.c @@ -32,8 +32,7 @@ #include -/* Verify a requirement at compile-time (unlike assert, which is runtime). */ -#define verify(name, assertion) struct name { char a[(assertion) ? 1 : -1]; } +#include "verify.h" #ifdef UNSIGNED # ifndef HAVE_DECL_STRTOULL @@ -68,15 +67,13 @@ INT strtoimax (char const *ptr, char **endptr, int base) { #if HAVE_LONG_LONG - verify (size_is_that_of_long_or_long_long, - (sizeof (INT) == sizeof (long int) - || sizeof (INT) == sizeof (long long int))); + verify (sizeof (INT) == sizeof (long int) + || sizeof (INT) == sizeof (long long int)); if (sizeof (INT) != sizeof (long int)) return strtoll (ptr, endptr, base); #else - verify (size_is_that_of_long, - sizeof (INT) == sizeof (long int)); + verify (sizeof (INT) == sizeof (long int)); #endif return strtol (ptr, endptr, base); diff --git a/lib/utimecmp.c b/lib/utimecmp.c index 7308929f4..9d07e9fd3 100644 --- a/lib/utimecmp.c +++ b/lib/utimecmp.c @@ -39,11 +39,9 @@ #include "stat-time.h" #include "timespec.h" #include "utimens.h" +#include "verify.h" #include "xalloc.h" -/* Verify a requirement at compile-time (unlike assert, which is runtime). */ -#define verify(name, assertion) struct name { char a[(assertion) ? 1 : -1]; } - #ifndef MAX # define MAX(a, b) ((a) > (b) ? (a) : (b)) #endif @@ -139,8 +137,8 @@ utimecmp (char const *dst_name, time_t might be unsigned. */ - verify (time_t_is_integer, TYPE_IS_INTEGER (time_t)); - verify (twos_complement_arithmetic, TYPE_TWOS_COMPLEMENT (int)); + verify (TYPE_IS_INTEGER (time_t)); + verify (TYPE_TWOS_COMPLEMENT (int)); /* Destination and source time stamps. */ time_t dst_s = dst_stat->st_mtime; diff --git a/m4/ChangeLog b/m4/ChangeLog index 41cee1be1..6c1f166a2 100644 --- a/m4/ChangeLog +++ b/m4/ChangeLog @@ -1,3 +1,23 @@ +2005-10-02 Paul Eggert + + Sync from coreutils. + * openat.m4 (gl_FUNC_OPENAT): Check for fdopendir. + * ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely + defines ULONG_MAX_LT_ULLONG_MAX. Thomas M.Ott reports that + ULLONG_MAX doesn't work with 2.7.2.1. + +2005-10-02 Jim Meyering + + Sync from coreutils. + * utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes + from glibc-2.2.5 that fails for read-only files. + +2005-10-02 Alfred M. Szmidt + + Sync from coreutils. + * chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path... + against `yes', rather than just testing for nonempty. + 2005-10-01 Simon Josefsson * getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD diff --git a/modules/exclude b/modules/exclude index 976e49426..78efea5d7 100644 --- a/modules/exclude +++ b/modules/exclude @@ -11,6 +11,7 @@ xalloc strcase fnmatch-gnu stdbool +verify configure.ac: gl_EXCLUDE diff --git a/modules/strtoimax b/modules/strtoimax index c63319ee9..dc48d2d72 100644 --- a/modules/strtoimax +++ b/modules/strtoimax @@ -11,6 +11,7 @@ m4/strtoimax.m4 Depends-on: strtoll +verify configure.ac: gl_FUNC_STRTOIMAX @@ -24,4 +25,3 @@ GPL Maintainer: Paul Eggert - diff --git a/modules/utimecmp b/modules/utimecmp index 49d4411d7..6cd77faf9 100644 --- a/modules/utimecmp +++ b/modules/utimecmp @@ -14,6 +14,7 @@ timespec utimens xalloc stdbool +verify configure.ac: gl_UTIMECMP