/*1* SPDX-License-Identifier: ISC2*3* Copyright (c) 2011 Todd C. Miller <[email protected]>4*5* Permission to use, copy, modify, and distribute this software for any6* purpose with or without fee is hereby granted, provided that the above7* copyright notice and this permission notice appear in all copies.8*9* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES10* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF11* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR12* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES13* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN14* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF15* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.16*/1718#ifndef COMPAT_FNMATCH_H19#define COMPAT_FNMATCH_H2021#define FNM_NOMATCH 1 /* String does not match pattern */2223#define FNM_PATHNAME (1 << 0) /* Globbing chars don't match '/' */24#define FNM_PERIOD (1 << 1) /* Leading '.' in string must exactly */25#define FNM_NOESCAPE (1 << 2) /* Backslash treated as ordinary char */26#define FNM_LEADING_DIR (1 << 3) /* Only match the leading directory */27#define FNM_CASEFOLD (1 << 4) /* Case insensitive matching */2829sudo_dso_public int sudo_fnmatch(const char *pattern, const char *string, int flags);3031#define fnmatch(_a, _b, _c) sudo_fnmatch((_a), (_b), (_c))3233#endif /* COMPAT_FNMATCH_H */343536