Thread (8 messages) flat view 8 messages, 5 authors, 2016-06-15

Re: [PATCH] Makefile: update the default build options for AIX

From: Brandon Casey <hidden>
Date: 2016-06-15 22:44:35

Possibly related (same subject, not in this thread)

Mike Ralphson wrote:
Indeed. Please add ascii-art diagrams and don't use long words. I may
then have a chance of understanding how this works,
I think this is simpler than you are making it out to be.

All the git source files currently #include git-compat-util.h. When a
platform is missing a function, we implement that function in the compat/
subdirectory and add an entry for it in git-compat-util.h.

In this case we found a problem that could be worked around by replacing every
call to fopen with an internal function. So we did the standard thing of
creating a new function in the compat/ subdirectory named git_fopen() and added
macro statements within git-compat-util.h to redefine fopen to be git_fopen.
But, git_fopen needs to call the _real_ fopen and it _also_ includes git-compat-util.h.
So, after including git-compat-util.h, we undefined the fopen macro to undo the
assignment that we had just performed. This doesn't work if the system is also setting
an fopen macro. So the fix is to avoid clobbering the system setting at all when
compiling compat/fopen.c

-brandon
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help