Re: [PATCH] Win32: simplify loading of DLL functions

2017-09-21 Thread Junio C Hamano
Jonathan Nieder writes: > Johannes Schindelin wrote: >> On Tue, 19 Sep 2017, Jonathan Nieder wrote: > >>> Could this example go near the top of the header instead? That way, >>> it's easier for people reading the header to see how to use it. >> >> Funny, I am *so* used to

Re: [PATCH] Win32: simplify loading of DLL functions

2017-09-20 Thread Jonathan Nieder
Johannes Schindelin wrote: > On Tue, 19 Sep 2017, Jonathan Nieder wrote: >> Could this example go near the top of the header instead? That way, >> it's easier for people reading the header to see how to use it. > > Funny, I am *so* used to examples being at the very end, from tutorials to > man

Re: [PATCH] Win32: simplify loading of DLL functions

2017-09-20 Thread Johannes Schindelin
Hi Jonathan, On Tue, 19 Sep 2017, Jonathan Nieder wrote: > Johannes Schindelin wrote: > > > Dynamic loading of DLL functions is duplicated in several places in Git > > for Windows' source code. > > > > This patch adds a pair of macros to simplify the process: the > > DECLARE_PROC_ADDR(, , , > >

Re: [PATCH] Win32: simplify loading of DLL functions

2017-09-19 Thread Junio C Hamano
Jonathan Nieder writes: > ... > strerror(ENOSYS) is "Function not implemented". Cute. > > Reviewed-by: Jonathan Nieder Thanks, both. Will queue.

Re: [PATCH] Win32: simplify loading of DLL functions

2017-09-19 Thread Jonathan Nieder
Hi, Johannes Schindelin wrote: > Dynamic loading of DLL functions is duplicated in several places in Git > for Windows' source code. > > This patch adds a pair of macros to simplify the process: the > DECLARE_PROC_ADDR(, , , > ..) macro to be used at the beginning of a > code block, and the

[PATCH] Win32: simplify loading of DLL functions

2017-09-19 Thread Johannes Schindelin
Dynamic loading of DLL functions is duplicated in several places in Git for Windows' source code. This patch adds a pair of macros to simplify the process: the DECLARE_PROC_ADDR(, , , ..) macro to be used at the beginning of a code block, and the INIT_PROC_ADDR() macro to call before using