summaryrefslogtreecommitdiff
path: root/lib/exclude.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2005-12-02 00:42:52 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2005-12-02 00:42:52 +0000
commit76bebf24a531f7019ba6369eb5eafe34c2992882 (patch)
tree49f0a2466e3dceb957fee8fb154d7cba140f2f87 /lib/exclude.c
parentb3c0bca1f8a793e886889f711a11d4490b8cab85 (diff)
downloadcoreutils-76bebf24a531f7019ba6369eb5eafe34c2992882.tar.xz
Import from gnulib.
Diffstat (limited to 'lib/exclude.c')
-rw-r--r--lib/exclude.c13
1 files changed, 5 insertions, 8 deletions
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. */