diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2003-12-01 17:26:28 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2003-12-01 17:26:28 +0000 |
commit | dc3998682acd295299bffc3c544af74503e1dc02 (patch) | |
tree | 9d483f863e7902630121a627e6db18f632e3ad60 /winsup/cygwin/include | |
parent | 6c2b7846124572ffed3ce4fea074cc89e732651c (diff) | |
download | cygnal-dc3998682acd295299bffc3c544af74503e1dc02.tar.gz cygnal-dc3998682acd295299bffc3c544af74503e1dc02.tar.bz2 cygnal-dc3998682acd295299bffc3c544af74503e1dc02.zip |
* Makefile.in (OBSOLETE_FUNCTIONS): Add fcntl.
(NEW_FUNCTIONS): Add fcntl64.
* cygwin.din: Export fcntl64. Make fcntl being SIGFE.
* fcntl.cc (fcntl_worker): New function.
(fcntl64): New function.
(_fcntl): Call fcntl_worker. Convert 32 bit flock structure into
64 bit flock structure and vice versa.
* fhandler.cc (fhandler_base::lock): Change 2nd parameter to
struct __flock64 *.
* fhandler_disk_file.cc (fhandler_disk_file::lock): Ditto. Rework
to be 64 bit aware.
* fhandler.h: Accomodate above method argument changes.
* include/cygwin/types.h: Add struct __flock32 and __flock64.
Define struct flock according to setting of __CYGWIN_USE_BIG_TYPES__.
* include/cygwin/version.h: Bump API minor number.
Diffstat (limited to 'winsup/cygwin/include')
-rw-r--r-- | winsup/cygwin/include/cygwin/types.h | 32 | ||||
-rw-r--r-- | winsup/cygwin/include/cygwin/version.h | 3 |
2 files changed, 34 insertions, 1 deletions
diff --git a/winsup/cygwin/include/cygwin/types.h b/winsup/cygwin/include/cygwin/types.h index 103337457..fc803aca1 100644 --- a/winsup/cygwin/include/cygwin/types.h +++ b/winsup/cygwin/include/cygwin/types.h @@ -99,6 +99,38 @@ typedef __ino32_t ino_t; #endif #endif /*__ino_t_defined*/ +#if defined (__INSIDE_CYGWIN__) +struct __flock32 { + short l_type; /* F_RDLCK, F_WRLCK, or F_UNLCK */ + short l_whence; /* flag to choose starting offset */ + _off_t l_start; /* relative offset, in bytes */ + _off_t l_len; /* length, in bytes; 0 means lock to EOF */ + short l_pid; /* returned with F_GETLK */ + short l_xxx; /* reserved for future use */ +}; + +struct __flock64 { + short l_type; /* F_RDLCK, F_WRLCK, or F_UNLCK */ + short l_whence; /* flag to choose starting offset */ + _off_t l_start; /* relative offset, in bytes */ + _off64_t l_len; /* length, in bytes; 0 means lock to EOF */ + pid_t l_pid; /* returned with F_GETLK */ +}; +#endif + +struct flock { + short l_type; /* F_RDLCK, F_WRLCK, or F_UNLCK */ + short l_whence; /* flag to choose starting offset */ + off_t l_start; /* relative offset, in bytes */ + off_t l_len; /* length, in bytes; 0 means lock to EOF */ +#ifdef __CYGWIN_USE_BIG_TYPES__ + pid_t l_pid; /* returned with F_GETLK */ +#else + short l_pid; /* returned with F_GETLK */ + short l_xxx; /* reserved for future use */ +#endif +}; + #ifndef __key_t_defined #define __key_t_defined typedef long long key_t; diff --git a/winsup/cygwin/include/cygwin/version.h b/winsup/cygwin/include/cygwin/version.h index 76130833b..246e7a45c 100644 --- a/winsup/cygwin/include/cygwin/version.h +++ b/winsup/cygwin/include/cygwin/version.h @@ -231,12 +231,13 @@ details. */ 104: Export msgctl, msgget, msgrcv, msgsnd, semctl, semget, semop. 105: Export sigwait. 106: Export flock. + 107: Export fcntl64. */ /* Note that we forgot to bump the api for ualarm, strtoll, strtoull */ #define CYGWIN_VERSION_API_MAJOR 0 -#define CYGWIN_VERSION_API_MINOR 106 +#define CYGWIN_VERSION_API_MINOR 107 /* There is also a compatibity version number associated with the shared memory regions. It is incremented when incompatible |