git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2] Fix symlink __stdcall problem at MSVC

From
Frank Li <lznuaa@gmail.com>
Date
Aug 20, 2009, 14:21 UTC
Message-ID
<1250778072-4324-1-git-send-email-lznuaa@gmail.com>

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

	TYPE WINAPI function_name...
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
Next: Frank Li
Message 1 of 3 in “Fix symlink __stdcall problem at MSVC”
  1. Fix symlink __stdcall problem at MSVCFrank Li, Aug 20, 2009
  2. Frank LiAug 21, 2009
  3. Frank LiAug 21, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.