Re: [RFC PATCH 2/2] MSVC: Fix an "incompatible pointer types" compiler warning
- From
Johannes Sixt <j.sixt@viscovery.net>
- Date
- Dec 4, 2009, 07:44 UTC
- Message-ID
- <4B18BDE7.3050004@viscovery.net>
- In-Reply-To
- <4B1806FB.2050401@ramsay1.demon.co.uk>
Ramsay Jones schrieb:
> In order to avoid the compiler warning, we use the appropriate > structure type names (and function names) from the msvc headers. > This allows us to compile with -D_USE_32BIT_TIME_T if necessary.
"if necessary"? Who defines when -D_USE_32BIT_TIME_T is necessary?
> Also, I added the "&& defined(_stati64)" in the hope that it would work with > older msvc/sdk versions.
I think that this is an unnecessary complication and I did wonder why you added this extra check. Anybody doing some serious development with MS's tools is using VS2005 at least. But isn't the .vcproj file made for VS2008 anyway?
> The reason for the RFC is: > > - maybe we don't need the flexibility of compiling with/without the 32-bit > time_t definition (which *works* BTW) and can revert to the original patch?
Indeed I'm wondering why we should cater for 64 bit time_t. It is an unnessary complication as long as MinGW gcc supports only 32 bit time_t and the old MSVCRT.DLL.
> - I *think* this will work with older msvc, but I can't test it!
This should not be a concern, IMHO.
> - I've tried to be careful not to break the MinGW build, but again I can't > test it. (I will be shocked if I have ;-)
It compiles without warnings and doesn't break t/t[01]* ;)
-- Hannes