@matheusbsbs / matheus-bagliano / commits / c5445fe090
Fork 0

compat-util: avoid macro redefinition warning

Some systems define fopen as a macro based on compiler settings, and unconditionally redefining it triggers a compilation warning.

Johannes Sixt committed May 8, 2008 at 09:34 UTC c5445fe0908d0bd8a062e0d29d9dcf4e4962e3c8
1 file changed +3
git-compat-util.h
+3
@@ -206,6 +206,9 @@ void *gitmemmem(const void *haystack, size_t haystacklen,
206 #endif
207
208 #ifdef FREAD_READS_DIRECTORIES
209 +#ifdef fopen
210 +#undef fopen
211 +#endif
212 #define fopen(a,b) git_fopen(a,b)
213 extern FILE *git_fopen(const char*, const char*);
214 #endif