diff options
| author | Scott J. Goldman <scottjgo@gmail.com> | 2012-05-09 22:30:57 -0700 |
|---|---|---|
| committer | Scott J. Goldman <scottjgo@gmail.com> | 2012-05-10 09:52:49 -0700 |
| commit | ec42eafd4adea021d86c6fa2cbde92b87177bf3d (patch) | |
| tree | 15350fc0a404028bc7946cbb8a06cde391a792e0 /src | |
| parent | a9d9965b35710f865d77a13da1cf084d0c870b55 (diff) | |
| download | libgit2-ec42eafd4adea021d86c6fa2cbde92b87177bf3d.tar.gz | |
Hook up Windows compat fnmatch() for Solaris
Since Solaris does not support some of the same flags as glibc fnmatch(),
we just use the implementation we have for Windows.
Now that it's no longer a windows-specific thing, I moved it into compat/
instead of win32/
Diffstat (limited to 'src')
| -rw-r--r-- | src/compat/fnmatch.c (renamed from src/win32/fnmatch.c) | 0 | ||||
| -rw-r--r-- | src/compat/fnmatch.h (renamed from src/win32/fnmatch.h) | 4 | ||||
| -rw-r--r-- | src/unix/posix.h | 8 | ||||
| -rw-r--r-- | src/win32/posix.h | 2 |
4 files changed, 9 insertions, 5 deletions
diff --git a/src/win32/fnmatch.c b/src/compat/fnmatch.c index 835d811b..835d811b 100644 --- a/src/win32/fnmatch.c +++ b/src/compat/fnmatch.c diff --git a/src/win32/fnmatch.h b/src/compat/fnmatch.h index eb7c5f6f..7faef09b 100644 --- a/src/win32/fnmatch.h +++ b/src/compat/fnmatch.h @@ -4,8 +4,8 @@ * This file is part of libgit2, distributed under the GNU GPL v2 with * a Linking Exception. For full terms see the included COPYING file. */ -#ifndef INCLUDE_fnmatch__w32_h__ -#define INCLUDE_fnmatch__w32_h__ +#ifndef INCLUDE_fnmatch__compat_h__ +#define INCLUDE_fnmatch__compat_h__ #include "common.h" diff --git a/src/unix/posix.h b/src/unix/posix.h index 9973acf3..6d0d0dfa 100644 --- a/src/unix/posix.h +++ b/src/unix/posix.h @@ -7,7 +7,12 @@ #ifndef INCLUDE_posix__w32_h__ #define INCLUDE_posix__w32_h__ -#include <fnmatch.h> +#ifndef __sun +# include <fnmatch.h> +# define p_fnmatch(p, s, f) fnmatch(p, s, f) +#else +# include "compat/fnmatch.h" +#endif #define p_lstat(p,b) lstat(p,b) #define p_readlink(a, b, c) readlink(a, b, c) @@ -16,7 +21,6 @@ #define p_mkdir(p,m) mkdir(p, m) #define p_fsync(fd) fsync(fd) #define p_realpath(p, po) realpath(p, po) -#define p_fnmatch(p, s, f) fnmatch(p, s, f) #define p_vsnprintf(b, c, f, a) vsnprintf(b, c, f, a) #define p_snprintf(b, c, f, ...) snprintf(b, c, f, __VA_ARGS__) #define p_mkstemp(p) mkstemp(p) diff --git a/src/win32/posix.h b/src/win32/posix.h index 2666fccb..baa4a3b4 100644 --- a/src/win32/posix.h +++ b/src/win32/posix.h @@ -8,7 +8,7 @@ #define INCLUDE_posix__w32_h__ #include "common.h" -#include "fnmatch.h" +#include "compat/fnmatch.h" #include "utf-conv.h" GIT_INLINE(int) p_link(const char *old, const char *new) |
