threads / patch / 20672

patchFix symlink __stdcall problem at MSVC

Subject: [PATCH] Fix symlink __stdcall problem at MSVC

## tl;dr

3 messages between Aug 20, 2009 and Aug 20, 2009. Diffs are folded; open one to read it.

replies: 2people: 2as markdown or json

Frank Li· Aug 20, 2009, 13:24 UTC · lore

MSVC requires that __stdcall be between return value and function name. Further, all Win32 API definitions look like this:

Signed-off-by: Frank Li <lznuaa@gmail.com>
---
 compat/mingw.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Show changes to compat/mingw.c +1 −1
diff --git a/compat/mingw.c b/compat/mingw.c
index fd642e4..4256243 100644
--- a/compat/mingw.c
+++ b/compat/mingw.c
@@ -1421,7 +1421,7 @@ int link(const char *oldpath, const char *newpath)
 
 int symlink(const char *oldpath, const char *newpath)
 {
-	typedef BOOL WINAPI (*symlink_fn)(const char*, const char*, DWORD);
+	typedef BOOL (WINAPI *symlink_fn)(const char*, const char*, DWORD);
 	static symlink_fn create_symbolic_link = NULL;
 	if (!create_symbolic_link) {
 		create_symbolic_link = (symlink_fn) GetProcAddress(
-- 
1.6.4.msysgit.0
Johannes Schindelin· Aug 20, 2009, 13:47 UTC · re: Frank Li · lore

Re: [PATCH] Fix symlink __stdcall problem at MSVC

Hi,
On Thu, 20 Aug 2009, Frank Li wrote:
Show 5 quoted lines
> MSVC requires that __stdcall be between return value and function name.
> Further, all Win32 API definitions look like this:
> 
> Signed-off-by: Frank Li <lznuaa@gmail.com>
> ---
Like what?  Seems you did not paste my complete commit message.

Ciao, Dscho

← back to recent threads