X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fexclude.c;h=6a0c14974dd425c96644e875d5a079066bce0275;hb=58aa025deca628dabf381fe57bda38dd690bfa59;hp=955c289563d03658c198b4d2116a3d0fe8fd89fc;hpb=359c0a71713e606f440d40f55a43c77349df2aaa;p=gnulib.git diff --git a/lib/exclude.c b/lib/exclude.c index 955c28956..6a0c14974 100644 --- a/lib/exclude.c +++ b/lib/exclude.c @@ -20,7 +20,7 @@ /* Written by Paul Eggert */ -#if HAVE_CONFIG_H +#ifdef HAVE_CONFIG_H # include #endif @@ -35,7 +35,9 @@ #include "exclude.h" #include "fnmatch.h" +#include "strcase.h" #include "xalloc.h" +#include "verify.h" #if USE_UNLOCKED_IO # include "unlocked-io.h" @@ -53,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 @@ -64,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. */