Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2003:
[Freeciv-Dev] Re: win32 build failure in lockfile.c
Home

[Freeciv-Dev] Re: win32 build failure in lockfile.c

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: "Per I. Mathisen" <per@xxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx, Andreas Kemnade <akemnade@xxxxxxxxxxxxxxxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: win32 build failure in lockfile.c
From: Mike Kaufman <kaufman@xxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 21 Jul 2003 16:12:12 -0500

On Mon, Jul 21, 2003 at 08:44:18PM +0000, Per I. Mathisen wrote:
> gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../../common    -g -O2 -Wall
> -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wmissing-declarations
> -c `test -f 'lockfile.c' || echo './'`lockfile.c
> lockfile.c: In function `create_lock':
> lockfile.c:92: warning: implicit declaration of function `flock'
> lockfile.c:92: `LOCK_EX' undeclared (first use in this function)
> lockfile.c:92: (Each undeclared identifier is reported only once
> lockfile.c:92: for each function it appears in.)
> lockfile.c:92: `LOCK_NB' undeclared (first use in this function)
> lockfile.c: In function `remove_lock':
> lockfile.c:120: `LOCK_UN' undeclared (first use in this function)
> make[3]: *** [lockfile.o] Error 1
> make[3]: Leaving directory `/d/workspace/freeciv/freeciv/server/userdb'
> 
> Please advise.

this was expected. It is highly unlikely that win32 has flock() or fcntl()
There will have to be some #ifdef WIN32_NATIVEs in this file.

For now, I would suggest something like:

#ifdef WIN32_NATIVE
  #undef FILE_LOCKING
#endif

But more appropriate would be to apply Jason's autoconf patch (attached)
Perhaps you should look it over and commit it per.

-mike

Attachment: flock.diff
Description: Text document


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