[Freeciv-Dev] Re: Trouble compiling SVN code
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
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
- [Freeciv-Dev] Re: Trouble compiling SVN code,
Jason Dorje Short <=
|
|