summaryrefslogtreecommitdiff
path: root/store
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2005-09-13 09:32:20 +0000
committerKurt Zenker <kz@openoffice.org>2005-09-13 09:32:20 +0000
commit29c4371a08118dd6fd5eadcc2b26681de70445f6 (patch)
tree4c7adc429e53baadaaeaf3c399e9ed262bf4604f /store
parentfab7cd0b4e96dc89a151c6e6f21db96f9fb8e82d (diff)
INTEGRATION: CWS mhu10 (1.4.10); FILE MERGED
2005/08/05 15:29:21 mhu 1.4.10.1: #i52956# #b6271301# Removed 'fcntl(...,F_SHARE,...)' workaround for SunOS <= 5.7 due to missing support in NFSv4.
Diffstat (limited to 'store')
-rw-r--r--store/source/fileunx.hxx64
1 files changed, 2 insertions, 62 deletions
diff --git a/store/source/fileunx.hxx b/store/source/fileunx.hxx
index 7ffe8db9d31b..e28851c416f2 100644
--- a/store/source/fileunx.hxx
+++ b/store/source/fileunx.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: fileunx.hxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: rt $ $Date: 2005-09-08 08:41:51 $
+ * last change: $Author: kz $ $Date: 2005-09-13 10:32:20 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -171,49 +171,6 @@ inline storeError __store_fopen (
return ERROR_FROM_NATIVE(errno);
}
-#ifdef SOLARIS /* see workaround comment below */
-
- /*
- * Workaround for SunOS <= 5.7:
- *
- * 'mmap()' fails on posix (advisory) locked (F_SETLK) NFS file handles.
- * Using non-posix F_SHARE / F_UNSHARE instead.
- */
-
- // Acquire (advisory) Share Access (Multiple Reader | Single Writer)
- struct fshare share;
-
- if (nMode & store_File_OpenWrite)
- {
- share.f_access = F_RWACC; /* Request own read and write access */
- share.f_deny = F_RWDNY; /* Deny other's read and write access */
- }
- else
- {
- share.f_access = F_RDACC; /* Request own read-only access */
- share.f_deny = F_WRDNY; /* Deny other's write access */
- }
-
- share.f_id = 0;
-
- if (::fcntl (rhFile, F_SHARE, &share) < 0)
- {
- // Save original result.
- storeError result;
- if ((errno == EACCES) || (errno == EAGAIN))
- result = store_E_LockingViolation;
- else
- result = ERROR_FROM_NATIVE(errno);
-
- // Close file handle.
- (void)::close (rhFile); rhFile = 0;
-
- // Finish.
- return (result);
- }
-
-#else /* POSIX */
-
// Acquire (advisory) Lock (Multiple Reader | Single Writer)
struct flock lock;
@@ -242,8 +199,6 @@ inline storeError __store_fopen (
return (result);
}
-#endif /* SOLARIS || POSIX */
-
int nFlags = ::fcntl (rhFile, F_GETFD, 0);
if (!(nFlags < 0))
{
@@ -369,19 +324,6 @@ inline storeError __store_fsync (HSTORE h)
*/
inline storeError __store_fclose (HSTORE h)
{
-#ifdef SOLARIS /* see comment in __store_fopen() */
-
- // Release (advisory) Share Access (Multiple Reader | Single Writer)
- struct fshare share;
-
- share.f_access = 0;
- share.f_deny = 0;
- share.f_id = 0;
-
- (void)::fcntl (h, F_UNSHARE, &share);
-
-#else /* POSIX */
-
// Release (advisory) Lock (Multiple Reader | Single Writer)
struct flock lock;
@@ -392,8 +334,6 @@ inline storeError __store_fclose (HSTORE h)
(void)::fcntl (h, F_SETLK, &lock);
-#endif /* SOLARIS || POSIX */
-
// Close file handle.
if (::close (h) == -1)
return ERROR_FROM_NATIVE(errno);