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

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 imm

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(

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 t

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

2014-06-05 Thread Karsten Blees
Am 05.06.2014 17:13, schrieb Stepan Kasal: > Hello Karsten, > > On Thu, Jun 05, 2014 at 04:51:39PM +0200, Karsten Blees wrote: >> In the current msysgit HEAD, most of these #undef's can simply be >> removed or have already been removed [...] > > not "most of." According to my quick count, 6 of 2

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

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 min

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

2014-06-05 Thread Stepan Kasal
Hello Karsten, On Thu, Jun 05, 2014 at 04:51:39PM +0200, Karsten Blees wrote: > In the current msysgit HEAD, most of these #undef's can simply be > removed or have already been removed [...] not "most of." According to my quick count, 6 of 20 have been removed, 2 more can be removed. The remain

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

2014-06-05 Thread Karsten Blees
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 min

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

2014-06-05 Thread 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 mingw.c. This was not probably intentional; for examp