From 8bdb1f61556bd480ddbb8c0eb993a3548effbf0b Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Tue, 27 Aug 2013 18:29:30 +0000 Subject: Get rid of madness about fnmatch: BLI_fnmatch did not do the OS checks, they had to be done in every file using fnmatch (autoexec.c did not, wonder how it could work under unix???). Thanks to Brecht for noting this! --- source/blender/blenlib/BLI_fnmatch.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source/blender/blenlib/BLI_fnmatch.h') diff --git a/source/blender/blenlib/BLI_fnmatch.h b/source/blender/blenlib/BLI_fnmatch.h index 6c466759010..f69f5b39869 100644 --- a/source/blender/blenlib/BLI_fnmatch.h +++ b/source/blender/blenlib/BLI_fnmatch.h @@ -28,6 +28,8 @@ extern "C" { #endif +#if defined WIN32 && !defined _LIBC || defined __sun + #if defined(__cplusplus) || (defined(__STDC__) && __STDC__) #undef __P #define __P(protos) protos @@ -65,6 +67,13 @@ extern "C" { extern int fnmatch __P((const char *__pattern, const char *__string, int __flags)); +#else +# ifndef _GNU_SOURCE +# define _GNU_SOURCE +# endif +# include +#endif /* defined WIN32 && !defined _LIBC || defined __sun */ + #ifdef __cplusplus } #endif -- cgit v1.2.3