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

Re: [PATCH 1/3] MSVC: Compile fix by not including sys/resources.h

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 22, 2011, 00:56 UTC
Message-ID
<7vk47x7sj6.fsf@alter.siamese.dyndns.org>
In-Reply-To
<4EA1C9C9.9010904@lyx.org>
>> ...
>> Subject: [PATCH 1/3] MSVC: Compile fix by not including sys/resources.h
>> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
........................................................^^^^^^
Could you refrain from doing that?  It breaks the patch text.
Vincent van Ravesteijn <vfr@lyx.org> writes:
Show 5 quoted lines
> Fix compilation when compiling with MSVC because sys/resource.h
> is not available. This patch causes a number of other headerfiles
> that are not available to be excluded as well.
>
> Signed-off-by: Vincent van Ravesteijn <vfr@lyx.org>
Instead of current
	#ifndef mingw32 is the only one that is strange
        ... everything for systems that is not strainge ...
        #else
        ... include mingw specific tweaks ...
        #endif
        #ifdef msvc is also strange
        ... include msvc specific tweaks ...
        #endif

it turns things around and says what it wants to achieve in a more direct way, i.e.

	#if mingw32
        #include "compat/mingw.h"
	#elif msvc
        #include "compat/msvc.h"
	#else
        ... all the others ...
	#endif
which makes it look simpler.
Previous: Vincent van Ravesteijn
Message 4 of 4 in “MSVC: Compile fix by not including sys/resources.h”
  1. 1/3 MSVC: Compile fix by not including sys/resources.hVincent van Ravesteijn, Oct 21, 2011
  2. 2/3 MSVC: Compile fix by including io.hVincent van Ravesteijn, Oct 21, 2011
  3. 3/3 MSVC: Remove unneeded header stubsVincent van Ravesteijn, Oct 21, 2011
  4. Junio C HamanoOct 22, 2011

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.