projects
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eb120e6
)
compat-util: avoid macro redefinition warning
author
Johannes Sixt
<j.sixt@viscovery.net>
Thu, 8 May 2008 07:34:49 +0000
(09:34 +0200)
committer
Junio C Hamano
<gitster@pobox.com>
Fri, 9 May 2008 00:47:25 +0000
(17:47 -0700)
Some systems define fopen as a macro based on compiler settings, and
unconditionally redefining it triggers a compilation warning.
git-compat-util.h
patch
|
blob
|
history
diff --git
a/git-compat-util.h
b/git-compat-util.h
index 167c3fe63a4fd9ca4abf5c16694e22a9ae22717b..01c4045e89a2e156062255193ed5d865fdf8a922 100644
(file)
--- a/
git-compat-util.h
+++ b/
git-compat-util.h
@@
-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