1*8feb0f0bSmrg /* Copyright (C) 1991-2020 Free Software Foundation, Inc. 21debfc3dSmrg 31debfc3dSmrg NOTE: The canonical source of this file is maintained with the GNU C Library. 41debfc3dSmrg Bugs can be reported to bug-glibc@prep.ai.mit.edu. 51debfc3dSmrg 61debfc3dSmrg This program is free software; you can redistribute it and/or modify it 71debfc3dSmrg under the terms of the GNU General Public License as published by the 81debfc3dSmrg Free Software Foundation; either version 2, or (at your option) any 91debfc3dSmrg later version. 101debfc3dSmrg 111debfc3dSmrg This program is distributed in the hope that it will be useful, 121debfc3dSmrg but WITHOUT ANY WARRANTY; without even the implied warranty of 131debfc3dSmrg MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 141debfc3dSmrg GNU General Public License for more details. 151debfc3dSmrg 161debfc3dSmrg You should have received a copy of the GNU General Public License 171debfc3dSmrg along with this program; if not, write to the Free Software 181debfc3dSmrg Foundation, 51 Franklin Street - Fifth Floor, 191debfc3dSmrg Boston, MA 02110-1301, USA. */ 201debfc3dSmrg 211debfc3dSmrg #ifndef _FNMATCH_H 221debfc3dSmrg 231debfc3dSmrg #define _FNMATCH_H 1 241debfc3dSmrg 251debfc3dSmrg #ifdef __cplusplus 261debfc3dSmrg extern "C" { 271debfc3dSmrg #endif 281debfc3dSmrg 291debfc3dSmrg #if defined (__cplusplus) || (defined (__STDC__) && __STDC__) 301debfc3dSmrg #undef __P 311debfc3dSmrg #define __P(args) args 321debfc3dSmrg #else /* Not C++ or ANSI C. */ 331debfc3dSmrg #undef __P 341debfc3dSmrg #define __P(args) () 351debfc3dSmrg /* We can get away without defining `const' here only because in this file 361debfc3dSmrg it is used only inside the prototype for `fnmatch', which is elided in 371debfc3dSmrg non-ANSI C where `const' is problematical. */ 381debfc3dSmrg #endif /* C++ or ANSI C. */ 391debfc3dSmrg 401debfc3dSmrg 411debfc3dSmrg /* We #undef these before defining them because some losing systems 421debfc3dSmrg (HP-UX A.08.07 for example) define these in <unistd.h>. */ 431debfc3dSmrg #undef FNM_PATHNAME 441debfc3dSmrg #undef FNM_NOESCAPE 451debfc3dSmrg #undef FNM_PERIOD 461debfc3dSmrg 471debfc3dSmrg /* Bits set in the FLAGS argument to `fnmatch'. */ 481debfc3dSmrg #define FNM_PATHNAME (1 << 0) /* No wildcard can ever match `/'. */ 491debfc3dSmrg #define FNM_NOESCAPE (1 << 1) /* Backslashes don't quote special chars. */ 501debfc3dSmrg #define FNM_PERIOD (1 << 2) /* Leading `.' is matched only explicitly. */ 511debfc3dSmrg 521debfc3dSmrg #if !defined (_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 2 || defined (_GNU_SOURCE) 531debfc3dSmrg #define FNM_FILE_NAME FNM_PATHNAME /* Preferred GNU name. */ 541debfc3dSmrg #define FNM_LEADING_DIR (1 << 3) /* Ignore `/...' after a match. */ 551debfc3dSmrg #define FNM_CASEFOLD (1 << 4) /* Compare without regard to case. */ 561debfc3dSmrg #endif 571debfc3dSmrg 581debfc3dSmrg /* Value returned by `fnmatch' if STRING does not match PATTERN. */ 591debfc3dSmrg #define FNM_NOMATCH 1 601debfc3dSmrg 611debfc3dSmrg /* Match STRING against the filename pattern PATTERN, 621debfc3dSmrg returning zero if it matches, FNM_NOMATCH if not. */ 631debfc3dSmrg extern int fnmatch __P ((const char *__pattern, const char *__string, 641debfc3dSmrg int __flags)); 651debfc3dSmrg 661debfc3dSmrg #ifdef __cplusplus 671debfc3dSmrg } 681debfc3dSmrg #endif 691debfc3dSmrg 701debfc3dSmrg #endif /* fnmatch.h */ 71