summaryrefslogtreecommitdiff
path: root/sal
AgeCommit message (Collapse)AuthorFilesLines
2015-10-02Better fail with E_EXIST if rename(3) failsStephan Bergmann1-1/+1
...it leads to better handling of the failure downstream, if e.g. this is an attempt to copy a file from the presets to an existing file of a previously partly generated UserInstallation, and the presets and the UserInstallation are on different drives and rename(3) fails with EXDEV. (Without this fix, removing the UserInstallation's registrymodifications.xcu caused restarting soffice to fail with "User installation could not be completed" in this case; regression introduced with 6edbcc1b231feb02f304ff646c323b5df051d9a4 "cid#1242936 handle rename failure.") Change-Id: I409698c4e2e6cc6ccd8b2be80a393c9657b5125d (cherry picked from commit d2a7abebf210cacf9ea357dd8b4a0772be7308df) Reviewed-on: https://gerrit.libreoffice.org/18899 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-06-30Do not forget to actually set newStr to an empty stringStephan Bergmann2-2/+15
(cherry picked from commit f7a7a9dd84d1cd8b49d59e1fb1853ea7e9f40edf) Conflicts: sal/qa/rtl/strings/test_strings_replace.cxx sal/rtl/ustring.cxx (cherry picked from commit e36ca8d3c69d0c08ad28ceea278b05a0af81e102) Conflicts: sal/qa/rtl/strings/test_strings_replace.cxx Change-Id: I745b09d8a248f08afdd3387f4cfcf69d71ec3c39 Reviewed-on: https://gerrit.libreoffice.org/16465 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-11-27Make osl_getExecutableFile work even without a prior osl_setCommandArgsStephan Bergmann4-89/+30
After 2ad716f406e0fdb9b9294876c64ae92fecbf5e27 "Revert 'pyuno: set up fake command line in getComponentContext(),'" e.g. PythonTest_sw_python would fail on Windows, where WinSalGraphics::GetDevFontList (vcl/win/source/gdi/salgdi3.cxx) calls osl_getExecutableFile and is itself called in a python process where osl_setCommandArgs has not been set up. This patch makes osl_getExecutableFile on all platforms if osl_setCommandArgs has not (yet) been set fall back to the code that was osl_bootstrap_getExecutableFile_Impl (which was called from sal/rtl/bootstrap.cxx, which can now call osl_getExecutableFile). Change-Id: I6c1bb59205041b3208c830a8b8406e28128b4566 (cherry picked from commit 41565560250294e22fc1c21bc4bab8286255d4cc)
2014-11-27Needless indirectionStephan Bergmann1-7/+2
Change-Id: Idf514941f4bb05834d8ac0d7bafbe86e34377611 (cherry picked from commit 85b5e24b903b6b4438ce422e6cb3eb8c7a02035f)
2014-11-26Adapt some logs and assertionsStephan Bergmann2-11/+14
...cf. previous 2ad716f406e0fdb9b9294876c64ae92fecbf5e27 "Revert 'pyuno: set up fake command line in getComponentContext().'" Change-Id: Ia77132465ada17a5839f9d4f9ccaf20f8b113075 (cherry picked from commit 54981ce9286073306513fa58405ebc7730eb6dfb)
2014-11-26Revert "pyuno: set up fake command line in getComponentContext()"Stephan Bergmann2-26/+10
This reverts commit 2386a92c1e6e8ec263edb4dc4fdcfeaa4673ce1f and its follow-ups 1acaa577b67158c060d2f57414f7aea86504a489 "sal: add special handling of argc==0 to osl_setCommandArgs()" and 01f27b5e5d428cc3c4aeabdcbbb8204494fbd435 "sal: fix osl_setCommandArgs() on WNT." The situation that osl_getCommandArgCount is called without a prior call to osl_setCommandArgs should be considered as harmless and can legitimately not only happen in the pyuno case discussed in the reverted commits, but also in case binary UNO is bootstrapped from within a Java process, as happens in test-javanative in ure/source/uretest/Makefile. Change-Id: I2829db390e37dfe5daeda33a4c0659b7d35e565a (cherry picked from commit 2ad716f406e0fdb9b9294876c64ae92fecbf5e27)
2014-11-20osl_getVolumeInformation: only stat if necessaryStephan Bergmann1-66/+71
...in the hope that that makes cid#706206 (TOCTOU) go away Change-Id: I4bc7b44e0268cf5d46aaf55fb4073dcdf67b324c
2014-11-20sal: fix build with clang and --enable-crashdumpMichael Stahl1-4/+4
Change-Id: I148005489e4ef31b55886c1dd3076650d3a2ec17
2014-11-20At least old Mac OS X does not know AT_FDCWDStephan Bergmann1-2/+5
...lets hope it is actually declared as a macro wherever it is known. Change-Id: If541d02af3ac5d9ad4f0ac1cb4dd9f9f4550a78a
2014-11-20Let attemptChangeMetadata work on symlink itselfStephan Bergmann1-10/+16
Change-Id: I42a81e70e76cb4699052815cfd415a8efd902b03
2014-11-20fdo#83529: Only preserve metadata of moved, not copied filesStephan Bergmann1-30/+22
Change-Id: If3e436d137b6989af22df43c3a9a247bb2c9ffe9
2014-11-20Introduce OStringBuffer::appendUninitializedStephan Bergmann2-4/+9
...corresponding to the OUStringBuffer couterpart Change-Id: I3ab03343696e6755cf1ccc470e4decc2f41d2558
2014-11-20len cannot be <= 1 hereStephan Bergmann2-2/+2
Change-Id: I482e6eeca09e7b15a8d95a866ebab35d06f13e9e
2014-11-20Needless assignment len -> nStephan Bergmann1-2/+1
Change-Id: I9051284b34e5a6f3f48ee58243d6481b072e0a80
2014-11-20Remove comment junkStephan Bergmann2-8/+0
Change-Id: Ifaed964d084d0b7a2dacbc23a93fb77eb7515ab4
2014-11-20Clean up Mac _imp_getProcessLocaleStephan Bergmann5-22/+42
Introduces OUStringBuffer::appendUninitialized. Change-Id: If225ec4d798e0df91cad60130e3f22ee26b88abb
2014-11-20Unused return valueStephan Bergmann2-4/+2
Change-Id: I963d001aee68f1218ba7273562cb41f3cf4c5e20
2014-11-20sal: fix --enable-crashdump build in new C++ world orderMichael Stahl1-4/+4
Change-Id: I95e4f43f4ef40e8c04b37002bbae03f4f23a9e34
2014-11-19Blind fix for AndroidStephan Bergmann1-1/+1
Change-Id: I091fa9f9fd4c2df1818aadcba7995b174b07f098
2014-11-19system.h -> system.hxxStephan Bergmann23-30/+24
Change-Id: I39a60d0b775bfe40fa89e8b5d5f7466d0db5d36e
2014-11-19Remove obsolete osl_searchPath_implStephan Bergmann3-81/+55
(obsoleting cid#983584) Change-Id: Icbf25bd364fdabb208abe201ddc146daa60f9b62
2014-11-19Fold file_path_helper.h into file_path_helper.hxxStephan Bergmann5-237/+200
Change-Id: Ifad9594eb6fa396e32818b6d2bafc16adb478994
2014-11-19signal.c -> signal.cxxStephan Bergmann2-19/+17
Change-Id: I1d7f47b81e558a071a6beb52999d0bca185f02d5
2014-11-19HAVE_FEATURE_CRASHDUMP instead of manual SAL_ENABLE_CRASH_REPORTStephan Bergmann2-12/+15
Change-Id: Ifaf971d77f11cef207706989bba11dbe2028ca79
2014-11-19Revert "-Werror,-Wc++11-compat-deprecated-writable-strings"Stephan Bergmann1-1/+1
This reverts commit 0e589394e8452ee8dea8e807d3b5ef6620a1c6c1, which was a misguided attempt at solving a problem already solved by Tor.
2014-11-19-Werror,-Wc++11-compat-deprecated-writable-stringsStephan Bergmann1-1/+1
Change-Id: I4a8cbbbebe9833625af4805074d0c68ef3623ebd
2014-11-19ISO C++11 does not allow conversion from string literal to 'char *'Tor Lillqvist1-1/+1
Change-Id: I098d0b8b3428cbf57a69c331515093df36e0c172
2014-11-19Fold uunxapi.h into uunxapi.hxxStephan Bergmann5-77/+41
Change-Id: Ic16758e436da13684320e7e3bf07b80d8d8c7c5d
2014-11-19sockimpl.h -> sockimpl.hxxStephan Bergmann4-35/+27
Change-Id: Ic11f5e0923b8b9d656b74b900f52ff154bb65971
2014-11-19secimpl.h -> secimpl.hxxStephan Bergmann4-18/+10
Change-Id: I0fb87c5658bd02e327df8fdf3e0aa79f20bbc111
2014-11-19saltime.h -> saltime.hxxStephan Bergmann3-12/+4
Change-Id: I930c581525ed5b02dd8850e9781b01eed12c857f
2014-11-19readwrite_helper.h -> readwrite_helper.hxxStephan Bergmann5-24/+15
Change-Id: If0d71f0660d60e3bcea4db3906ffe600e00f69f2
2014-11-19Fold procimpl.h into process.cxxStephan Bergmann2-44/+8
Change-Id: I1adcaeea7a1a3f7a3634897821f15443dbc78e94
2014-11-19nlsupport.h -> nlsupport.hxxStephan Bergmann4-13/+5
Change-Id: Iaee3f8a43cba1d4fd02b6a51d42f73c8ef9e99b7
2014-11-19file_url.h -> file_url.hxxStephan Bergmann10-20/+11
Change-Id: I2494779521d56edcab41f66a7c64e7dc5a9205ad
2014-11-19file_error_transl.h -> file_error_transl.hxxStephan Bergmann7-22/+13
Change-Id: Ia71097a3d0fbeb606b1f6cfb7e6edb86bd45082a
2014-11-19interlck.c -> interlck.cxxStephan Bergmann2-1/+1
Change-Id: I90ca3ddbc2e1d4b830ec6e536e36e924ee14416a
2014-11-19time.c -> time.cxxStephan Bergmann2-3/+1
Change-Id: If0f0e40964f7dc107e14753da49df5cdc77732be
2014-11-19system.c -> system.cxxStephan Bergmann2-1/+1
Change-Id: I4629a01a67dd57d5915403a89da90e98b5184503
2014-11-19socket.c -> socket.cxxStephan Bergmann2-9/+9
(At least some glibc make FD_ISSET happen to be of type bool in C++, that's why we explicitly cast it to bool instead of comparing != 0 to avoid loplugin:implicitboolconversion; cf. <https://sourceware.org/ml/libc-help/2014-11/msg00018.html> "Type of FD_ISSET happens to be bool in C++.") Change-Id: I6da67620067392f5866d053b074198413da814b1
2014-11-19readwrite_helper.c -> readwrite_helper.cxxStephan Bergmann2-3/+3
Change-Id: I6d9f43a18e13cb291cb678b6faeeed7c0ec9de1a
2014-11-19pipe.c -> pipe.cxxStephan Bergmann2-4/+4
Change-Id: I0c9659379e6120c0bf01b6436d3127b83ad01af1
2014-11-19nlsupport.c -> nlsupport.cxxStephan Bergmann2-3/+3
Change-Id: Ida0c3c0c521f71fd3f18a12c02cf98ac96c5b7a6
2014-11-19mutex.c -> mutex.cxxStephan Bergmann2-1/+1
Change-Id: I24ebffd1b055bdd6ad93d2f071d20480b549379f
2014-11-19memory.c -> memory.cxxStephan Bergmann2-1/+1
Change-Id: I87d977aabd09ff01cba0f25247dca43a2bf0dd2b
2014-11-19filepath.c -> filepath.cxxStephan Bergmann2-3/+1
Change-Id: I24545b92d7aa0898289d0dee19f34966769702a1
2014-11-18More iwyu suggested headers removalRiccardo Magliocchetti12-12/+1
Signed-off-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com> Signed-off-by: Stephan Bergmann <sbergman@redhat.com>, undid one remove that was detrimental to loplugin:unreffun Change-Id: I18d8252084d828f94ef7a954e1dbfb45743d7970
2014-11-17Build fix.Kohei Yoshida1-0/+1
Change-Id: Ifa6775384993900980c93df88162143aa7ac0a08
2014-11-17Missing includeStephan Bergmann1-0/+1
Change-Id: I767b9300568971c09c058347a9bbb66108dd792a
2014-11-17sal: clean up public headers with include-what-you-useMichael Stahl3-0/+4
Sadly cannot forward declare "struct {...} TimeValue;". rtl/(u)?string.hxx still include sal/log.hxx but removing osl/diagnose.h was painful enough for now... Change-Id: Id41e17f3870c4f24c53ce7b11f2c40a3d14d1f05