diff options
author | lenz@mysql.com <> | 2002-07-15 18:26:11 +0200 |
---|---|---|
committer | lenz@mysql.com <> | 2002-07-15 18:26:11 +0200 |
commit | 3258f23d9925fe2f4405e5ffbcb3527e2ec07b21 (patch) | |
tree | 7bbc1431086d8f60702c6d6e2ad89eec7fe88075 /mysys/my_os2file64.c | |
parent | c620486287474966db38e44f8be891622e9af495 (diff) | |
download | mariadb-git-3258f23d9925fe2f4405e5ffbcb3527e2ec07b21.tar.gz |
- Updated OS/2 port with files provided by Yuri Dario <mc6530@mclink.it>
from TeamOS/2 Italy
- removed some obsolete files on Yuri's request
- Added missing os2 related files outside the os2 subdirectory
to the distribution
Diffstat (limited to 'mysys/my_os2file64.c')
-rw-r--r-- | mysys/my_os2file64.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/mysys/my_os2file64.c b/mysys/my_os2file64.c index b7ee40d292e..2f41d344e32 100644 --- a/mysys/my_os2file64.c +++ b/mysys/my_os2file64.c @@ -22,6 +22,7 @@ void _OS2errno( APIRET rc); longlong _lseek64( int fd, longlong offset, int seektype); int _lock64( int fd, int locktype, my_off_t start, my_off_t length, myf MyFlags); +int _sopen64( const char *name, int oflag, int shflag, int mask); // // this class is used to define a global c++ variable, that @@ -191,8 +192,17 @@ inline _SetFileLocksL(HFILE hFile, ULONG timeout, ULONG flags) { - if (_DosSetFileLocksL) - return _DosSetFileLocksL( hFile, pflUnlock, pflLock, timeout, flags); + if (_DosSetFileLocksL) { + APIRET rc; + rc = _DosSetFileLocksL( hFile, pflUnlock, pflLock, timeout, flags); + + // on FAT/HPFS/LAN a INVALID_PARAMETER is returned, seems that + // only JFS can handle >2GB ranges. + if (rc != 87) + return rc; + + // got INVALID_PARAMETER, fallback to standard call + } FILELOCK flUnlock = { pflUnlock->lOffset, pflUnlock->lRange }; FILELOCK flLock = { pflLock->lOffset, pflLock->lRange }; @@ -254,7 +264,7 @@ int _lock64( int fd, int locktype, my_off_t start, return(-1); } -int _sopen( const char *name, int oflag, int shflag, int mask) +int sopen( const char *name, int oflag, int shflag, int mask) { int fail_errno; APIRET rc = 0; |