# [PATCH] Fix symlink __stdcall problem at MSVC

3 messages from 2009-08-20 to 2009-08-20. Participants: Frank Li, Johannes Schindelin.
Thread: https://gitlist.dev/t/20672

## Frank Li, 2009-08-20 13:24

Subject: [PATCH] Fix symlink __stdcall problem at MSVC
Message-ID: <1250774680-4720-1-git-send-email-lznuaa@gmail.com>
URL: https://gitlist.dev/e/1250774680-4720-1-git-send-email-lznuaa%40gmail.com

```
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(-)

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, 2009-08-20 13:47

Subject: Re: [PATCH] Fix symlink __stdcall problem at MSVC
Message-ID: <alpine.DEB.1.00.0908201546500.4719@intel-tinevez-2-302>
URL: https://gitlist.dev/e/alpine.DEB.1.00.0908201546500.4719%40intel-tinevez-2-302
In-Reply-To: <1250774680-4720-1-git-send-email-lznuaa@gmail.com>

```
Hi,

On Thu, 20 Aug 2009, Frank Li wrote:

> 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

```

## Frank Li, 2009-08-20 14:16

Subject: Re: [PATCH] Fix symlink __stdcall problem at MSVC
Message-ID: <1976ea660908200716u6643ff3fgd30f6cd859260316@mail.gmail.com>
URL: https://gitlist.dev/e/1976ea660908200716u6643ff3fgd30f6cd859260316%40mail.gmail.com
In-Reply-To: <alpine.DEB.1.00.0908201546500.4719@intel-tinevez-2-302>

```
>
> Like what?  Seems you did not paste my complete commit message.
>
Yes, Sorry about this

```
