On Feb 6 15:28, Corinna Vinschen wrote: > On Feb 6 15:15, Jan Nijtmans wrote: > > 2014-02-06 15:02 GMT+01:00 Corinna Vinschen: > > > In sys/_default_fcntl.h, the LOCK_xx macros are defined if > > > __BSD_VISIBLE is defined, which *is* defined by default, unless you > > > define one of > > > > > > _ANSI_SOURCE > > > _C99_SOURCE > > > _C11_SOURCE > > > _POSIX_C_SOURCE > > > _XOPEN_SOURCE > > > > Yes, SQLite defines _XOPEN_SOURCE in sqliteInt.h: > > > > > > > > I could add a !defined(__CYGWIN__) there, but I prefer > > just to define __BSD_VISIBLE. > > On second thought, Linux defines the LOCK_xx macros unconditionally > in sys/file.h. What we could do is to define the macros in sys/file.h > if they are not already defined because __BSD_VISIBLE wasn't set. Jan, can you please check if SQlite builds *without* defining __BSD_VISIBLE, but adding the following lines to /usr/include/sys/file.h; Index: sys/file.h =================================================================== RCS file: /cvs/src/src/winsup/cygwin/include/sys/file.h,v retrieving revision 1.8 diff -u -p -r1.8 file.h --- sys/file.h 17 Jan 2014 11:01:46 -0000 1.8 +++ sys/file.h 6 Feb 2014 14:41:23 -0000 @@ -31,4 +31,16 @@ #define L_INCR SEEK_CUR #define L_XTND SEEK_END +/* Including always defines flock & macros. */ +#if __BSD_VISIBLE - 0 == 0 + +#define LOCK_SH 0x01 /* shared file lock */ +#define LOCK_EX 0x02 /* exclusive file lock */ +#define LOCK_NB 0x04 /* don't block when locking */ +#define LOCK_UN 0x08 /* unlock file */ + +extern int flock _PARAMS ((int, int)); + +#endif + #endif Thanks in advance, Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat