Feature test macros overhaul: fnmatch.h
Use the proper internal macro for GNU extensions. Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
This commit is contained in:
parent
d2df6d381b
commit
d94d983d1b
|
@ -33,21 +33,21 @@
|
||||||
#ifndef _FNMATCH_H_
|
#ifndef _FNMATCH_H_
|
||||||
#define _FNMATCH_H_
|
#define _FNMATCH_H_
|
||||||
|
|
||||||
|
#include <sys/cdefs.h>
|
||||||
|
|
||||||
#define FNM_NOMATCH 1 /* Match failed. */
|
#define FNM_NOMATCH 1 /* Match failed. */
|
||||||
|
|
||||||
#define FNM_NOESCAPE 0x01 /* Disable backslash escaping. */
|
#define FNM_NOESCAPE 0x01 /* Disable backslash escaping. */
|
||||||
#define FNM_PATHNAME 0x02 /* Slash must be matched by slash. */
|
#define FNM_PATHNAME 0x02 /* Slash must be matched by slash. */
|
||||||
#define FNM_PERIOD 0x04 /* Period must be matched by period. */
|
#define FNM_PERIOD 0x04 /* Period must be matched by period. */
|
||||||
|
|
||||||
#if defined(_GNU_SOURCE) || !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
|
#if __GNU_VISIBLE
|
||||||
#define FNM_LEADING_DIR 0x08 /* Ignore /<tail> after Imatch. */
|
#define FNM_LEADING_DIR 0x08 /* Ignore /<tail> after Imatch. */
|
||||||
#define FNM_CASEFOLD 0x10 /* Case insensitive search. */
|
#define FNM_CASEFOLD 0x10 /* Case insensitive search. */
|
||||||
#define FNM_IGNORECASE FNM_CASEFOLD
|
#define FNM_IGNORECASE FNM_CASEFOLD
|
||||||
#define FNM_FILE_NAME FNM_PATHNAME
|
#define FNM_FILE_NAME FNM_PATHNAME
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
|
||||||
|
|
||||||
__BEGIN_DECLS
|
__BEGIN_DECLS
|
||||||
int fnmatch(const char *, const char *, int);
|
int fnmatch(const char *, const char *, int);
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
|
|
|
@ -39,21 +39,21 @@
|
||||||
#ifndef _FNMATCH_H_
|
#ifndef _FNMATCH_H_
|
||||||
#define _FNMATCH_H_
|
#define _FNMATCH_H_
|
||||||
|
|
||||||
|
#include <sys/cdefs.h>
|
||||||
|
|
||||||
#define FNM_NOMATCH 1 /* Match failed. */
|
#define FNM_NOMATCH 1 /* Match failed. */
|
||||||
#define FNM_NOSYS 2 /* Function not supported (unused). */
|
#define FNM_NOSYS 2 /* Function not supported (unused). */
|
||||||
|
|
||||||
#define FNM_NOESCAPE 0x01 /* Disable backslash escaping. */
|
#define FNM_NOESCAPE 0x01 /* Disable backslash escaping. */
|
||||||
#define FNM_PATHNAME 0x02 /* Slash must be matched by slash. */
|
#define FNM_PATHNAME 0x02 /* Slash must be matched by slash. */
|
||||||
#define FNM_PERIOD 0x04 /* Period must be matched by period. */
|
#define FNM_PERIOD 0x04 /* Period must be matched by period. */
|
||||||
#ifndef _POSIX_SOURCE
|
#if __GNU_VISIBLE
|
||||||
#define FNM_LEADING_DIR 0x08 /* Ignore /<tail> after Imatch. */
|
#define FNM_LEADING_DIR 0x08 /* Ignore /<tail> after Imatch. */
|
||||||
#define FNM_CASEFOLD 0x10 /* Case insensitive search. */
|
#define FNM_CASEFOLD 0x10 /* Case insensitive search. */
|
||||||
#define FNM_IGNORECASE FNM_CASEFOLD
|
#define FNM_IGNORECASE FNM_CASEFOLD
|
||||||
#define FNM_FILE_NAME FNM_PATHNAME
|
#define FNM_FILE_NAME FNM_PATHNAME
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
|
||||||
|
|
||||||
__BEGIN_DECLS
|
__BEGIN_DECLS
|
||||||
int fnmatch __P((const char *, const char *, int));
|
int fnmatch __P((const char *, const char *, int));
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
|
|
|
@ -38,6 +38,7 @@
|
||||||
#if defined(LIBC_SCCS) && !defined(lint)
|
#if defined(LIBC_SCCS) && !defined(lint)
|
||||||
static char sccsid[] = "@(#)fnmatch.c 8.2 (Berkeley) 4/16/94";
|
static char sccsid[] = "@(#)fnmatch.c 8.2 (Berkeley) 4/16/94";
|
||||||
#endif /* LIBC_SCCS and not lint */
|
#endif /* LIBC_SCCS and not lint */
|
||||||
|
#include "winsup.h"
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__FBSDID("$FreeBSD: head/lib/libc/gen/fnmatch.c 288309 2015-09-27 12:52:18Z jilles $");
|
__FBSDID("$FreeBSD: head/lib/libc/gen/fnmatch.c 288309 2015-09-27 12:52:18Z jilles $");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue