This is the mail archive of the
newlib@sources.redhat.com
mailing list for the newlib project.
[PATCH] libc/include/sys/fcntl.h
- From: Corinna Vinschen <vinschen at redhat dot com>
- To: newlib at sources dot redhat dot com
- Date: Mon, 1 Dec 2003 18:30:10 +0100
- Subject: [PATCH] libc/include/sys/fcntl.h
- Reply-to: newlib at sources dot redhat dot com
Hi,
the struct flock as used in newlib isn't 64 bit aware. To allow
to use the old as well as the new structure with old and new
Cygwin applications, I've dropped defining struct flock in fcntl.h
when compiling for Cygwin. I've moved the definition of both
structures to cygwin/types.h, which is included in sys/fcntl.h.
Corinna
* libc/include/sys/fcntl.h: Don't define struct flock when on
Cygwin. This is done in winsup/cygwin/include/cygwin/types.h now.
Index: libc/include/sys/fcntl.h
===================================================================
RCS file: /cvs/src/src/newlib/libc/include/sys/fcntl.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -p -r1.4 -r1.5
--- libc/include/sys/fcntl.h 26 Nov 2003 19:15:17 -0000 1.4
+++ libc/include/sys/fcntl.h 1 Dec 2003 17:27:01 -0000 1.5
@@ -135,6 +135,7 @@ extern "C" {
/*#include <sys/stdtypes.h>*/
+#ifndef __CYGWIN__
/* file segment locking set data type - information passed to system by user */
struct flock {
short l_type; /* F_RDLCK, F_WRLCK, or F_UNLCK */
@@ -144,6 +145,7 @@ struct flock {
short l_pid; /* returned with F_GETLK */
short l_xxx; /* reserved for future use */
};
+#endif /* __CYGWIN__ */
#ifndef _POSIX_SOURCE
/* extended file segment locking set data type */
--
Corinna Vinschen
Cygwin Developer
Red Hat, Inc.