This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cygwin-1.7.28 getpwent header declaration changes ?


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:
> > 
> >     <http://www.sqlite.org/src/artifact/fdab572b3567d587?ln=198-200>
> > 
> > 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 <sys/file.h> 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

Attachment: pgplX_p8tWJGL.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]