[Freeciv-Dev] (PR#14691) Re: Trouble compiling SVN code
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=14691 >
This is a patch that fixes some errors compiling under MinGW/win32.
----- Original Message -----
From: "Jason Dorje Short" <jdorje@xxxxxxxxxxxx>
To: "Homr Zodyssey" <programmer@xxxxxxxxxxxx>
Cc: <freeciv-dev@xxxxxxxxxxx>
Sent: Thursday, November 24, 2005 12:57 AM
Subject: Re: [Freeciv-Dev] Trouble compiling SVN code
> Homr Zodyssey wrote:
>> I've been trying for a couple days now to get the latest code from SVN to
>> compile under MinGW. I can compile 2.0.7 just fine. First I ran into a
>> problem that has been mentioned on the forums. "configure.ac" has some
>> line-endings that don't seem to groove with MinGW's autoheader.
>
> I've never heard of this problem...probably something to do with the
> cvs->svn conversion.
>
>> Then, I found some syntax errors in client/server.c. Possibly they went
>> undetected because they are inside an "#ifdef WIN32_NATIVE" section.
>
> Much of this code is new, so the chance for errors is high.
>
>> I'm still a noob, so I havent quite figured out a good way to make a
>> diff/patch. (Any pointers would help -- I'm using Eclipse with the
>> Subclipse plug-in to access Subversion). So anyway, I'll just describe
>> the needed changes.
>
> just type "svn diff"...then use the output as the patch. Usually "svn
> diff > patch.diff" will give the patchfile.
>
>> First off, we need to #include "rand.h" -- possibly within an "#ifdef
>> WIN32_NATIVE". myrand() is only called once in this file and its inside
>> the aforementioned "#ifdef WIN32_NATIVE" section.
>> Second, on line 334,
>> cat_snprintf(filename, sizeof(filename) "fctmp%d", myrand());
>> needs to change to
>> cat_snprintf(filename, sizeof(filename), "fctmp%d", myrand(1000)); /*
>> I just picked 1000 as it seemed lika good number to me. */
>> Third, on line 422, there is this line:
>> if (errno == EINPROGRESS) {
>> However, EINPROGRESS which is undefined in winsock. I changed it to
>> WSAEINPROGRESS, and it compiled. This should prolly look like this:
>> #ifdef HAVE_WINSOCK
>> if (errno == WSAEINPROGRESS) {
>> #else
>> if (errno == EINPROGRESS) {
>> #endif
>> If someone can tell my noob-butt how to make patch, I'll post one. Or,
>> if I'm just a doofus who doesnt know how to compile properly, you can
>> tell me that too.
>
> If you can post a patch of the changes that allow you to compile it, we
> can probably integrate them. Send it to bugs@xxxxxxxxxxxxxxxx even
> better, one patch per e-mail to that address.
>
> -jason
>
>
>
> --
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.362 / Virus Database: 267.13.7/180 - Release Date: 11/23/2005
>
>
patch.diff
Description: Binary data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] (PR#14691) Re: Trouble compiling SVN code,
Homr Zodyssey <=
|
|