summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--lib/exclude.c13
-rw-r--r--lib/strtoimax.c11
-rw-r--r--lib/utimecmp.c8
-rw-r--r--m4/ChangeLog20
-rw-r--r--modules/exclude1
-rw-r--r--modules/strtoimax2
-rw-r--r--modules/utimecmp1
8 files changed, 41 insertions, 21 deletions
diff --git a/ChangeLog b/ChangeLog
index dc84fd14a2..b3593068f8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
+
+ * modules/exclude (Depends-on): Depend on verify.
+ * modules/strtoimax (Depends-on): Likewise.
+ * modules/utimecmp (Depends-on): Likewise.
+
2005-09-27 Paul Eggert <eggert@cs.ucla.edu>
* modules/regex (Depends-on): Add strcase.
diff --git a/lib/exclude.c b/lib/exclude.c
index de1a5c3f3b..6a0c14974d 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 43a690d24b..a15b84af3a 100644
--- a/lib/strtoimax.c
+++ b/lib/strtoimax.c
@@ -32,8 +32,7 @@
#include <stdlib.h>
-/* 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 7308929f43..9d07e9fd3e 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 41cee1be13..6c1f166a2f 100644
--- a/m4/ChangeLog
+++ b/m4/ChangeLog
@@ -1,3 +1,23 @@
+2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
+
+ 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 <jim@meyering.net>
+
+ 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 <ams@gnu.org>
+
+ 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 <jas@extundo.com>
* getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
diff --git a/modules/exclude b/modules/exclude
index 976e494263..78efea5d7e 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 c63319ee9a..dc48d2d72e 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 49d4411d7e..6cd77faf9f 100644
--- a/modules/utimecmp
+++ b/modules/utimecmp
@@ -14,6 +14,7 @@ timespec
utimens
xalloc
stdbool
+verify
configure.ac:
gl_UTIMECMP