Re: [msysGit] [PATCH] mingw: redefine the wrapper macro after the corresponding function

2014-06-06 Thread Stepan Kasal
Hello, On Fri, Jun 06, 2014 at 12:00:51AM +0200, Karsten Blees wrote: Am 05.06.2014 18:56, schrieb Johannes Sixt: Within mingw.c, if some other function inside mingw.c wants to use mingw_unlink, then it should be written as 'mingw_unlink(foo)', not 'unlink(foo)'. I very much like this

Re: [msysGit] [PATCH] mingw: redefine the wrapper macro after the corresponding function

2014-06-06 Thread Karsten Blees
Am 06.06.2014 10:32, schrieb Stepan Kasal: Hello, On Fri, Jun 06, 2014 at 12:00:51AM +0200, Karsten Blees wrote: Am 05.06.2014 18:56, schrieb Johannes Sixt: Within mingw.c, if some other function inside mingw.c wants to use mingw_unlink, then it should be written as 'mingw_unlink(foo)', not

Re: [msysGit] [PATCH] mingw: redefine the wrapper macro after the corresponding function

2014-06-06 Thread Stepan Kasal
Hi Karsten, On Fri, Jun 06, 2014 at 11:43:03AM +0200, Karsten Blees wrote: [...] Assume all other callers are written 'mingw_foo', as suggested by Hannes, and no one except 'mingw_foo' has the need to call MSVCRT's 'foo' directly. Then its irrelevant whether the #undef is at the top or

Re: [msysGit] [PATCH] mingw: redefine the wrapper macro after the corresponding function

2014-06-06 Thread Karsten Blees
Am 06.06.2014 13:10, schrieb Stepan Kasal: Hi Karsten, On Fri, Jun 06, 2014 at 11:43:03AM +0200, Karsten Blees wrote: Thinking about this some more, the best solution is probably to eliminate the problem altogether by adding inline-wrappers for required CRT-functions, e.g.: Yes, this is

Re: [msysGit] [PATCH] mingw: redefine the wrapper macro after the corresponding function

2014-06-05 Thread Johannes Sixt
Am 05.06.2014 10:05, schrieb Stepan Kasal: mingw.c defines several wrapper functionsi, like mingw_unlink(). These wrappers are deployed by macros like this: #define unlink mingw_unlink The function itself is preceded by #undef, leaving the wrapper out of the game for the rest of

Re: [msysGit] [PATCH] mingw: redefine the wrapper macro after the corresponding function

2014-06-05 Thread Karsten Blees
Am 05.06.2014 18:56, schrieb Johannes Sixt: Am 05.06.2014 10:05, schrieb Stepan Kasal: mingw.c defines several wrapper functionsi, like mingw_unlink(). These wrappers are deployed by macros like this: #define unlink mingw_unlink The function itself is preceded by #undef, leaving the