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 ...
#endifit 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 ...
#endifwhich makes it look simpler.