Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2004:
[Freeciv-Dev] (PR#9433) Patch: MSVC compile fixes
Home

[Freeciv-Dev] (PR#9433) Patch: MSVC compile fixes

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: resqu@xxxxxx
Subject: [Freeciv-Dev] (PR#9433) Patch: MSVC compile fixes
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 19 Jul 2004 20:11:57 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=9433 >

> [resqu@xxxxxx - Tue Jul 20 02:11:39 2004]:
> 
> A few changes to the server and the GTK 2.0 client to allow compilation 
> with MSVC:
> - VC doesn't know dynamic array sizes; instead, alloca() has to be used. 
> Added a macro(FC_DYNSIZE_ARRAY) to utility/mem.h that wraps GCC's 
> dynamic sized resp. alloca() as appopriate.

Alloca is terrible.  Dynamic array sizes are part of C99.  Are you sure
MSVC doesn't support it?

> - VC doesn't know variable argument macros; for now, the patch 
> effectively disables all functionality provided by such macros.

This is also part of C99.  But MSVC probably has some unique way (as gcc
did) to handle this.

> - In the GTK2 client, a struct initialization flavor was used that VC 
> doesn't support.

Also C99, I think.

> - Added some includes needed by VC resp. disabled some not supported.
> - The Win32 constant for the maximum path length is MAX_PATH, not
PATH_MAX.
> 
> NB: To compile FreeCiv with MSVC those changes alone aren't enough. 
> Project files and a special config.h are needed, too.

Is it worth it?

jason



[Prev in Thread] Current Thread [Next in Thread]