summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2009-02-18 14:18:51 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2009-02-18 14:18:51 +0000
commitef79f943bfee1b842b6370f1f2d2ab969b657e57 (patch)
treeb9e9a8c8e66d5544887fbedf62baf93ef36c1b5a
parente0cc5947ec7d0038e88b4c327a4647afe0ec5188 (diff)
#i10000# Fix even more line ends
-rw-r--r--sal/osl/unx/file.cxx44
1 files changed, 22 insertions, 22 deletions
diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx
index 58fbb4b72..363c9b8c3 100644
--- a/sal/osl/unx/file.cxx
+++ b/sal/osl/unx/file.cxx
@@ -291,11 +291,11 @@ static int adjustLockFlags(const char * path, int flags)
flags &= ~O_EXLOCK;
flags |= O_SHLOCK;
}
- else
- {
- /* Needed flags to allow opening a webdav file */
- flags &= ~( O_EXLOCK | O_SHLOCK );
- }
+ else
+ {
+ /* Needed flags to allow opening a webdav file */
+ flags &= ~( O_EXLOCK | O_SHLOCK );
+ }
}
return flags;
@@ -702,17 +702,17 @@ oslFileError osl_openFile( rtl_uString* ustrFileURL, oslFileHandle* pHandle, sal
aflock.l_type = 0;
/* lock the file if flock.l_type is set */
-#ifdef MACOSX
- bLocked = ( F_WRLCK != aflock.l_type );
- if (!bLocked)
- {
- /* Mac OSX returns ENOTSUP for webdav drives. We should try read lock */
- if ( 0 == flock( fd, LOCK_EX | LOCK_NB ) || errno == ENOTSUP )
- bLocked = ( errno != ENOTSUP ) || ( 0 == flock( fd, LOCK_SH | LOCK_NB ) || errno == ENOTSUP );
- }
-#else /* MACOSX */
- bLocked = ( F_WRLCK != aflock.l_type || -1 != fcntl( fd, F_SETLK, &aflock ) );
-#endif /* MACOSX */
+#ifdef MACOSX
+ bLocked = ( F_WRLCK != aflock.l_type );
+ if (!bLocked)
+ {
+ /* Mac OSX returns ENOTSUP for webdav drives. We should try read lock */
+ if ( 0 == flock( fd, LOCK_EX | LOCK_NB ) || errno == ENOTSUP )
+ bLocked = ( errno != ENOTSUP ) || ( 0 == flock( fd, LOCK_SH | LOCK_NB ) || errno == ENOTSUP );
+ }
+#else /* MACOSX */
+ bLocked = ( F_WRLCK != aflock.l_type || -1 != fcntl( fd, F_SETLK, &aflock ) );
+#endif /* MACOSX */
}
@@ -780,12 +780,12 @@ oslFileError osl_closeFile( oslFileHandle Handle )
/* FIXME: check if file is really locked ? */
/* release the file share lock on this file */
-#ifdef MACOSX
- /* Mac OSX will return ENOTSUP for webdav drives. We should ignore the error */
- if ( 0 != flock( pHandleImpl->fd, LOCK_UN | LOCK_NB ) && errno != ENOTSUP )
-#else /* MACOSX */
- if( -1 == fcntl( pHandleImpl->fd, F_SETLK, &aflock ) )
-#endif /* MACOSX */
+#ifdef MACOSX
+ /* Mac OSX will return ENOTSUP for webdav drives. We should ignore the error */
+ if ( 0 != flock( pHandleImpl->fd, LOCK_UN | LOCK_NB ) && errno != ENOTSUP )
+#else /* MACOSX */
+ if( -1 == fcntl( pHandleImpl->fd, F_SETLK, &aflock ) )
+#endif /* MACOSX */
{
PERROR( "osl_closeFile", "unlock failed" );
}