From 3258f23d9925fe2f4405e5ffbcb3527e2ec07b21 Mon Sep 17 00:00:00 2001 From: "lenz@mysql.com" <> Date: Mon, 15 Jul 2002 18:26:11 +0200 Subject: - Updated OS/2 port with files provided by Yuri Dario from TeamOS/2 Italy - removed some obsolete files on Yuri's request - Added missing os2 related files outside the os2 subdirectory to the distribution --- mysys/my_os2file64.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'mysys/my_os2file64.c') 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; -- cgit v1.2.1