Re: [msysGit] [PATCH 07/17] Fix __stdcall/WINAPI placement and function prototype

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Johannes Schindelin said the following on 15.09.2009 02:24:
Hi,

On Mon, 14 Sep 2009, Johannes Sixt wrote:

On Montag, 14. September 2009, Marius Storm-Olsen wrote:
WINAPI is a macro which translates into the proper calling convention, so
replace __stdcall with that.
I've already pointed out elsewhere that the documentation of _beginthreadex explicitly says that the calling convention of the function pointer must be __stdcall. It does not mention WINAPI. Therefore, I think that these two changes are not correct:

-static __stdcall unsigned ticktack(void *dummy)
+static unsigned WINAPI ticktack(void *dummy)
-static __stdcall unsigned run_thread(void *data)
+static unsigned WINAPI run_thread(void *data)
You should s/WINAPI/__stdcall/.

I don't think that comments by our most proficient MSys guy should be disregarded as thee comments were.

I also pointed out that WINAPI is just a define for __stdcall (since _MSC_VER >= 800; VC 6.0 being _MSC_VER == 1200 and VC 2008 being _MSC_VER == 1500), and that's probably never going to change now. So, the change is not as bad as Hannes portrays it to be, and makes things less convoluted by using the same convention all over.

However, I'll cave for the pressure, and reroll the commit :)

--
.marius


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]