]> granicus.if.org Git - zziplib/commitdiff
introduce _zzip_FNM_NOESCAPE/_PATHNAME/_PERIOD #6
authorGuido Draheim <guidod@gmx.de>
Thu, 1 Mar 2018 21:51:13 +0000 (22:51 +0100)
committerGuido Draheim <guidod@gmx.de>
Thu, 1 Mar 2018 21:51:13 +0000 (22:51 +0100)
zzip/__fnmatch.h

index 90d36dc24f5c7605148039d3c1e53aa8d58bf077..6e9443c0fea8c12a5ac1aaf720ef58c749dd25c2 100644 (file)
@@ -7,18 +7,30 @@
 #include <string.h>
 
 #ifdef ZZIP_HAVE_FNMATCH_H
-#include <fnmatch.h>
-#endif
-
-#ifdef ZZIP_HAVE_FNMATCH_H
-#define _zzip_fnmatch fnmatch
+# include <fnmatch.h>
+# define _zzip_fnmatch fnmatch
 # ifdef FNM_CASEFOLD
 # define _zzip_FNM_CASEFOLD FNM_CASEFOLD
 # else
 # define _zzip_FNM_CASEFOLD 0
 # endif
+# ifdef FNM_NOESCAPE
+# define _zzip_FNM_NOESCAPE FNM_NOESCAPE
+# else
+# define _zzip_FNM_NOESCAPE 0
+# endif
+# ifdef FNM_PATHNAME
+# define _zzip_FNM_PATHNAME FNM_PATHNAME
+# else
+# define _zzip_FNM_PATHNAME 0
+# endif
+# ifdef FNM_PERIOD
+# define _zzip_FNM_PERIOD FNM_PERIOD
+# else
+# define _zzip_FNM_PERIOD 0
+# endif
+
 #else
-# define _zzip_FNM_CASEFOLD 0
 /* if your system does not have fnmatch, we fall back to strcmp: */
 static int _zzip_fnmatch(char* pattern, char* string, int flags)
 { 
@@ -27,6 +39,11 @@ static int _zzip_fnmatch(char* pattern, char* string, int flags)
 #   endif
     return strcmp (pattern, string); 
 }
+
+# define _zzip_FNM_CASEFOLD 0
+# define _zzip_FNM_NOESCAPE 0
+# define _zzip_FNM_PATHNAME 0
+# define _zzip_FNM_PERIOD 0
 #endif
 
 #endif