Fix for GCC 5.0 which appears not to define _GNU_SOURCE, define _ANSI_SOURCE and define _POSIX_SOURCE

Simon D Hughes 2016-06-09 11:13:56 +01:00
parent 2f50cd4755
commit 837f0baa37
2 changed files with 1 additions and 8 deletions

View File

@ -23,7 +23,7 @@
#define CFSTORE_CONFIG_BACKEND_UVISOR_ENABLED 0 #define CFSTORE_CONFIG_BACKEND_UVISOR_ENABLED 0
#define CFSTORE_CONFIG_MBED_OS_VERSION 3 #define CFSTORE_CONFIG_MBED_OS_VERSION 3
/* default build config overridden by package manager configuarion /* default build config overridden by package manager configuration
* *
* __MBED__ * __MBED__
* Morpheus build system (mbed-classic) defines the __MBED__ symbol * Morpheus build system (mbed-classic) defines the __MBED__ symbol

View File

@ -39,18 +39,11 @@
#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)
#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
//todo: #include <sys/cdefs.h>
//#include <cdefs.h>
//__BEGIN_DECLS
int fnmatch(const char *, const char *, int); int fnmatch(const char *, const char *, int);
//__END_DECLS
#endif /* !_FNMATCH_H_ */ #endif /* !_FNMATCH_H_ */