Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
05a8216d
Kaydet (Commit)
05a8216d
authored
Şub 29, 2012
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
STAR_ENABLE_FILE_LOCKING was a secret
üst
7029ccec
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
50 deletions
+1
-50
file.cxx
sal/osl/unx/file.cxx
+1
-1
strmunx.cxx
tools/source/stream/strmunx.cxx
+0
-49
No files found.
sal/osl/unx/file.cxx
Dosyayı görüntüle @
05a8216d
...
...
@@ -837,7 +837,7 @@ struct Locking_Impl
Locking_Impl
()
:
m_enabled
(
0
)
{
#ifndef HAVE_O_EXLOCK
m_enabled
=
(
(
getenv
(
"SAL_ENABLE_FILE_LOCKING"
)
!=
0
)
||
(
getenv
(
"STAR_ENABLE_FILE_LOCKING"
)
!=
0
)
);
m_enabled
=
(
getenv
(
"SAL_ENABLE_FILE_LOCKING"
)
!=
0
);
#endif
/* HAVE_O_EXLOCK */
}
};
...
...
tools/source/stream/strmunx.cxx
Dosyayı görüntüle @
05a8216d
...
...
@@ -34,7 +34,6 @@
#include <errno.h>
#include <unistd.h>
#include <limits.h>
#include <stdlib.h> // fuer getenv()
#include <tools/debug.hxx>
#include <tools/fsys.hxx>
...
...
@@ -500,8 +499,6 @@ void SvFileStream::FlushData()
// lokal gibt es nicht
}
static
char
*
pFileLockEnvVar
=
(
char
*
)
1
;
/*************************************************************************
|*
|* SvFileStream::LockRange()
...
...
@@ -510,11 +507,6 @@ static char *pFileLockEnvVar = (char*)1;
sal_Bool
SvFileStream
::
LockRange
(
sal_Size
nByteOffset
,
sal_Size
nBytes
)
{
struct
flock
aflock
;
aflock
.
l_start
=
nByteOffset
;
aflock
.
l_whence
=
SEEK_SET
;
aflock
.
l_len
=
nBytes
;
int
nLockMode
=
0
;
if
(
!
IsOpen
()
)
...
...
@@ -559,47 +551,6 @@ sal_Bool SvFileStream::LockRange( sal_Size nByteOffset, sal_Size nBytes )
return
sal_False
;
}
// HACK: File-Locking nur via Environmentvariable einschalten
// um einen Haenger im Zusammenspiel mit einem Linux
// NFS-2-Server (kein Lockdaemon) zu verhindern.
// File-Locking ?ber NFS ist generell ein Performancekiller.
// HR, 22.10.1997 fuer SOLARIS
// HR, 18.05.1998 Environmentvariable
if
(
pFileLockEnvVar
==
(
char
*
)
1
)
pFileLockEnvVar
=
getenv
(
"STAR_ENABLE_FILE_LOCKING"
);
if
(
!
pFileLockEnvVar
)
return
sal_True
;
aflock
.
l_type
=
nLockMode
;
sal_IntPtr
iFileHandle
;
oslFileError
rc
=
osl_getFileOSHandle
(
pInstanceData
->
rHandle
,
&
iFileHandle
);
if
(
rc
!=
osl_File_E_None
)
{
SetError
(
::
GetSvError
(
rc
));
return
sal_False
;
}
if
(
fcntl
((
int
)
iFileHandle
,
F_GETLK
,
&
aflock
)
==
-
1
)
{
#if defined SOLARIS
if
(
errno
==
ENOSYS
)
return
sal_True
;
#endif
SetError
(
::
GetSvError
(
errno
));
return
sal_False
;
}
if
(
aflock
.
l_type
!=
F_UNLCK
)
{
SetError
(
SVSTREAM_LOCKING_VIOLATION
);
return
sal_False
;
}
aflock
.
l_type
=
nLockMode
;
if
(
fcntl
((
int
)
iFileHandle
,
F_SETLK
,
&
aflock
)
==
-
1
)
{
SetError
(
::
GetSvError
(
errno
));
return
sal_False
;
}
return
sal_True
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment