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

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
Previous: Ramsay JonesNext: Ramsay Jones
Message 2 of 5 in “MSVC: Fix an "incompatible pointer types" compiler warning”
  1. 2/2 MSVC: Fix an "incompatible pointer types" compiler warningRamsay Jones, Dec 3, 2009
  2. Johannes SixtDec 4, 2009
  3. Ramsay JonesDec 4, 2009
  4. Johannes SchindelinDec 4, 2009
  5. Ramsay JonesDec 4, 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.