Skip to contentSkip to conversation

Fix symlink __stdcall problem at MSVC

PATCH In review Frank Li 2 participants 3 messages Jun 15, 2016

lore
Share & tools
lore

Frank Li

author
#0 lore raw

PATCH 1/1 Fix symlink __stdcall problem at MSVC

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

---
 compat/mingw.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
compat/mingw.c +1 -1
index fd642e4..4256243 100644
@@ -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(
Signature · 1 line
1.6.4.msysgit.0
#1 lore raw

Hi,

Quoted 5 lines · Frank Li

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

---

Like what? Seems you did not paste my complete commit message.

Ciao,
Dscho

author
#2 lore raw
Quoted 3 lines

Like what?  Seems you did not paste my complete commit message.

Yes, Sorry about this