Age | Commit message (Collapse) | Author |
|
For state-less containers there is no benefit in fsync'ing,
file data is safe when it is up-loaded back to storage - but
profiling shows latency from stray fsyncs.
Change-Id: I9f03d5866dec05e5507deb56b0dca93b6876225e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167490
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
(cherry picked from commit 90bd45d7a96c8c7084db13e4b6f86753db67655a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172947
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Jenkins
|
|
Change-Id: Iebe15d0323253ebb06b26fc42e78993be5fa92d1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172771
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
Change-Id: I2e92313a2428252422b68dd5fd353425add21025
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172696
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
Change-Id: I349ee3b02d25b43571c66ae9dcfcaa1e7dbea8e1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172638
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
|
|
Change-Id: I90676cf47d7eef441cfabe5a77dfaf81986a1f89
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171924
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
This allows optimizations when 'this' is empty, avoiding allocations, and
making it possible to not special-case it in other places, as was done in
ContentNode::Insert in commit 8ab44b114c6706ab2e3d8a19884daeb544d3c2e1
(tdf#161846 avoid allocation in ContentNode::Insert, 2024-07-30).
A couple of disambiguation templated overloads was introduced.
Change-Id: I2b5e94c2175379b2696c34e600393d32731f0ab6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171271
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
followup to commit 57c228803e55ed343c6693de7d0857ad7d3cd9e3
Change-Id: Iebfb23bb65e2bf898bf27f367cc9641f47a14cf3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167998
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Jenkins
|
|
Change-Id: Ie9b6961a2786a518876db7b26258e67e8afee848
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169760
Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Tested-by: Jenkins
|
|
Change-Id: I8ab203baa6276cb950e5a6168af32cb4a9fa24d3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166915
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
|
|
upgrade OSL_ASSERT to assert and add a few more
Change-Id: Ib52ca573d9e0878fef94dec40410f71bc94dea04
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166914
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
which means we don't have to explicitly handle OOM, and the resulting
code is much cleaner
Change-Id: I958d6678bb2d6878dda9de6bf82c5314f168db17
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166855
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I0d3192dbac5ca73cd93051bcdf812bbe34a77c8b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166828
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
Change-Id: I7732a77fc5ac8d1f5c53052e0f4b6c7e7d70f054
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166739
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
|
|
This is vital for lok when used in a jail with no random device,
but with an inherited file-handle to /dev/urandom.
Use 'dup' to avoid changing code that wants to 'close' the handle
after use.
Change-Id: I15f40fb251f180a2394af030f56e47f2bf9651d4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166113
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Change-Id: Id8d94af9e03d0c8553d0a7949e4a9259159481cf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165732
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
(which is an obsolescent XSI-STREAMS Posix extension). It's only use is in the
big switch in UnixErrnoString in sal/osl/unx/uunxapi.cxx, so if any platform
should actually lack it, we should rather #ifdef its use there than introduce it
here.
(This started to cause
> sal/osl/unx/system.hxx:190:12: error: macro 'ETIME' has been marked as deprecated: ETIME is deprecated in ISO C++ [-Werror,-Wdeprecated-pragma]
> 190 | # ifndef ETIME
> | ^
> ~/llvm/inst/bin/../include/c++/v1/cerrno:51:67: note: macro marked 'deprecated' here
> 51 | # pragma clang deprecated(ETIME, "ETIME is deprecated in ISO C++")
> | ^
with recent LLVM 19 trunk on macOS now.)
Change-Id: I01a586f08a4d9e4643c797fce5ce53c5f3ce8b81
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165303
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
|
|
...as seen with recent LLVM 19 trunk on macOS now,
> In file included from sal/osl/unx/uunxapi.mm:1:
> sal/osl/unx/uunxapi.cxx:612:14: error: macro 'ENOSTR' has been marked as deprecated: ENOSTR is deprecated in ISO C++ [-Werror,-Wdeprecated-pragma]
> 612 | case ENOSTR:
> | ^
> ~/llvm/inst/bin/../include/c++/v1/cerrno:48:69: note: macro marked 'deprecated' here
> 48 | # pragma clang deprecated(ENOSTR, "ENOSTR is deprecated in ISO C++")
> | ^
etc. (And -Wdeprecated-pragma was only added towards Clang 14 with
<https://github.com/llvm/llvm-project/commit/26c695b7893071d5e69afbaa70c4850ab2e468be>
"Support macro deprecation #pragma clang deprecated", so wrap it in
__has_warning.)
Change-Id: I8db1f00a48bb647573d287c3410137182570f82b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165304
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
|
|
Change-Id: Ia86ac0e022579d155e92de3b853d57860b5b97e5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165272
Tested-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
|
|
Change-Id: I93a69c57856169aeff613e34d5c0bf7fa08a0de7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165251
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
|
|
so we get nice stacktraces with function names and line numbers on
jenkins
Change-Id: Id1bfee014d713ead501e5164e5206d9189ec72a1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164967
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
The syntax is a stripped-down subset of what is available for variable
expansion in bootstrap ini-files: It only supports "${name}", to be replaced
with the contents of an environment variable of that name (which itself is not
expanded further). If no such environment variable exists, it is replaced with
the empty string. If the name contains a NUL character, or if there is a syntax
error (i.e., missing opening or closing curly brace), the corresponding text is
left unchanged.
Also, backslash quoting is supported to allow for verbatim, uninterpreted
"${name}" content. But logging.ini is typically used to specify Windows-style
LogFilePath=C:\log.txt
pathnames containing backslashes, so restrict backslash quoting to just "\$"
(replaced with "$") and "\\" (replaced with "\"), and leave all other
backslashes alone.
(It is not possible to reuse the bootstrap macro expansion code here, as that
would cause recursive dependencies. Therefore, this only implements this
stripped-down subset.)
Change-Id: I8c949a1637a7f14e0672a9cc1c79014edfa336bd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164759
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
|
|
...and clean up the use of macros here
Change-Id: Iede9ff705992d5e229b44b48cd88f5b495f6cee4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164571
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
|
|
...which, according to
<https://lists.freedesktop.org/archives/libreoffice/2024-March/091666.html> "32
bit build failure (smb, narrowing)", started to fail with
> /<<PKGBUILDDIR>>/sal/osl/unx/file.cxx: In function ‘void osl_file_adjustLockFlags(const rtl::OString&, int*, sal_uInt32*)’:
> /<<PKGBUILDDIR>>/sal/osl/unx/file.cxx:71:26: error: narrowing conversion of ‘4283649346’ from ‘unsigned int’ to ‘int’ [-Wnarrowing]
> 71 | #define CIFS_SUPER_MAGIC 0xFF534D42
> | ^~~~~~~~~~
> /<<PKGBUILDDIR>>/sal/osl/unx/file.cxx:795:14: note: in expansion of macro ‘CIFS_SUPER_MAGIC’
> 795 | case CIFS_SUPER_MAGIC:
> | ^~~~~~~~~~~~~~~~
etc. My Fedora 39 "Linux man-pages 6.05" statfs(2) man page explains about the
struct statfs f_type field of __fsword_t type: "The __fsword_t type used for
various fields in the statfs structure definition is a glibc internal type, not
intended for public use. This leaves the programmer in a bit of a conundrum
when trying to copy or compare these fields to local variables in a program.
Using unsigned int for such variables suffices on most systems." But the
underlying __FSWORD_T_TYPE looks like it is actually defined as a signed type in
/usr/include/bits/typesizes.h.
Change-Id: Ida3ae84031c4e48b0d6e69d76b66b4e4facfa1ae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164561
Tested-by: René Engelhard <rene@debian.org>
Reviewed-by: René Engelhard <rene@debian.org>
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
|
|
Change-Id: I660631d43230d9fcc58c405be5138e7d0b7605fb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163928
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: If6d40c818e021b3241d6b6b33aceca07c6393511
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163926
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
And use a buffer of 32767 characters, which is the approximate maximum
of Windows API, as documented in
https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation
Change-Id: I7b5329d48c936ce0090f0c7908a9d08b56b5a734
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163918
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: Icc7589bdf5d2e3d061dfa3d34761316d9e9323be
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163653
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: Ic9dcff74c16e5f9c107ca060a3d22866f552c398
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163632
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
They seem to have never been useful, ever since commits
4e093f7f3404d09ee302b119190a968f4f109427 (INTEGRATION: CWS sal05 (1.1.2);
FILE ADDED, 2004-02-03) and 0318a882ecfa17030bcccbc05d6c34e3293b0ef2
(INTEGRATION: CWS sal05 (1.1.2); FILE ADDED, 2004-02-03).
Change-Id: Ia68ee2f6facd9b64a098c630c3fed0d227e92e2b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163587
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
There is an unfortunate interaction between file locking and backup
creation at save time.
openFilePath has logic to lock a file when opening. This goes through
fcntl to set a write lock on the file. Later on, when the user wants to
save changes, a backup copy might be created (very likely now since this
is the defaults in the settings). To create this backup, the file is
opened again for reading. Unfortunately this open call fails due to the
lock (even though it is a write lock).
This commit changes the behavior. osl_file_adjustLockFlags now checks if
the file is on a mounted samba share. If that's the case we force the
osl_File_OpenFlag_NoLock flag. No issue is then exhibited at backup
creation, allowing the save to proceed properly.
Change-Id: Ieab252f9f68598834e13339fc5fcea440f0a4c2f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162935
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
|
|
Windows and Linux paths can be passed as parameters to this function
and those paths may not always be UTF8 encoded like macOS paths.
Change-Id: I83f5ab491d3c0ddd938e512fbab3213af9ea16fd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163223
Tested-by: Jenkins
Reviewed-by: Patrick Luby <guibomacdev@gmail.com>
|
|
Change-Id: I29535d3562fe1b8d05b8df1d6c9ab83e4ead0f74
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163227
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
|
|
which is useful to speed up exec'ing/spawning subprograms, and
avoids various leakage issues.
Change-Id: Ie06ceb6b377e9d5cca8c017c5666564f6bed482f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162647
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Jenkins
|
|
Change-Id: Id931281ff716ed0fd26fda1972eb6f5defde7422
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162249
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
|
|
Change-Id: I7b8b020bdbcd5b4db4cb478cc5fe1225f19ae0cf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161268
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
|
|
Change-Id: Ie9848c31ee4969d61470dfb5b570e45848f0914d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160992
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Change-Id: I85ecdf188dc394d6175a2dd7338147a057fa7766
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160392
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
|
|
Change-Id: Ic8a02784acb9f8981249689541bb6cba1b7fbfb7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159682
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I79a1902fb1241f95fd4fa963918207154ae2347b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159134
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I7a928a2385286f6d1ab3887c8d315af3f47c052d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159135
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I14c0d223b5f92456c9f160933e3f1eb99bfc6cd4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159133
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: If4a7951fd3f9f7f2e081e6b8ba482566260c3235
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158209
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
...now that warning about O[U]String vars that could be O[U]StringLiteral is no
longer useful
Change-Id: I389e72038171f28482049b41f6224257dd11f452
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157992
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Because I cannot keep what is inside what #ifdef straight in my head
Change-Id: Ie986a6928df179fc0e30ca12c6d2a6866ed82078
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157861
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I347e48e9da69c8c9b15581a5afa5c61cdd1d380d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157411
Reviewed-by: Patrick Luby <plubius@neooffice.org>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Patrick Luby <plubius@neooffice.org>
|
|
Change-Id: I416db8a528b4db3f4d4449ec371c0935b29568ff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157350
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
Change-Id: I3fbcf15924b30e2c7fe5501e706cdaf32921e103
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157263
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: I11a54c1ddf73c16ce46a0d1c375bf43157870db7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155856
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Change-Id: Icc9cd3410cde2589ea51385c651243e11cc2f1d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155855
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Change-Id: I8fae71e5053950441a2e0920590264c2cb858924
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155546
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|