Browse Source

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.
maint
Johannes Sixt 17 years ago committed by Junio C Hamano
parent
commit
c5445fe090
  1. 3
      git-compat-util.h

3
git-compat-util.h

@ -206,6 +206,9 @@ void *gitmemmem(const void *haystack, size_t haystacklen, @@ -206,6 +206,9 @@ void *gitmemmem(const void *haystack, size_t haystacklen,
#endif

#ifdef FREAD_READS_DIRECTORIES
#ifdef fopen
#undef fopen
#endif
#define fopen(a,b) git_fopen(a,b)
extern FILE *git_fopen(const char*, const char*);
#endif

Loading…
Cancel
Save