summaryrefslogtreecommitdiff
path: root/include/osl
AgeCommit message (Collapse)AuthorFilesLines
2024-07-20Remove now unneeded osl/diagnose.hGabor Kelemen1-1/+0
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
2024-06-07tdf#43157 Use SAL_WARN_IF instead of OSL_PRECONDGabor Kelemen1-1/+1
Change-Id: I9876ac2bb83f8dc96c41c20dfd2bf779ffe105fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167997 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2024-04-04Introduce ResettableMutexGuardScopedReleaserMike Kaganski1-0/+21
And use it to guarantee reretting a guard, without having to do that explicitly in exception handlers. Change-Id: I4727cb5b7f37b25e203396957797d24a093e0797 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165775 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-08-25WNT -> _WIN32Mike Kaganski1-2/+2
Change-Id: I09b1744c568b39c5b4160154536730962feb3a8c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156089 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-01-27Remove support for AIXStephan Bergmann1-7/+0
As discussed in the mailing list thread starting at <https://lists.freedesktop.org/archives/libreoffice/2023-January/089808.html> "Plan to remove dead C++ UNO bridge implementations (bridges/source/cpp_uno/*)", the bridge implementation at bridges/source/cpp_uno/gcc3_aix_powerpc is apparently dead and should thus be removed. However, that was the only bridge implementation for AIX, which implies that support for the AIX platform as a whole is dead and should thus be removed. Change-Id: I96de3f7f97d4fd770ff78256f0ea435383688be9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146057 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-12-28Introduce lo_get_app_data_dir() for Emscripten, tooTor Lillqvist1-0/+26
And not just Android. Hardcoded to return "/instdir" to match what is in the emscripten_fs_image. Change-Id: I26d4ec5e02ec9900e35ca47f1565a13ad2b723b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144849 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2022-09-13Turn this into a doxygen commentStephan Bergmann1-2/+3
Change-Id: Icd310f663bcb83947c3ad40e3243bd8e37b4872e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139869 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-09-13cid#1509290, cid#1509240: Silence "Use of 32-bit time_t (Y2K38_SAFETY)" for nowStephan Bergmann1-1/+4
We'll eventually need to do something about the 32 bit TimeValue::Seconds, but as it is unsigned we should be fine for another 80 years (until "06:28:15 UTC on Sunday, 7 February 2106", according to <https://en.wikipedia.org/wiki/Year_2038_problem#Solutions>). Change-Id: I74e680be0b2f0ef8cd84d6bc0faef436efc8d3cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139859 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-07-05sal: fix invalid doxygenChris Sherlock5-5/+10
Change-Id: Ib26a695c88d02a0ce5a3c9974fae9f88d8ae89ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136783 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-01-18Drop config_global.h from osl/module.hJan-Marek Glogowski1-2/+0
Quoting sberg: "an include file like this one that is part of the published URE interface must not include an include file like config_host/config_global.h that is not part of the published URE interface." I did grep for other config files in include, but that missed the "ifdef LIBO_INTERNAL_ONLY" protection; most time this file will be included via some other header, so just drop it. Change-Id: I18b0792de3f8351efd00557a66d4ef8979ca6550 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128555 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> Tested-by: Jenkins
2022-01-18Add HAVE_(UNIX_)DLAPI config header defineJan-Marek Glogowski1-0/+2
..., add the configure test flags and rename DLOPEN_LIBS to UNIX_DLAPI_LIBS. Initinally convert two dlsym callers to use HAVE_DLAPI and osl_getAsciiFunctionSymbol. There are a lot of places, which still use -ldl and even more direct dlsym calls; good opportunity for many simple EasyHacks. Change-Id: I4f2d2f7cb079a075af8f9d01eb5ee45de40c7f03 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128523 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-12-14osl_replaceFile: fallback to osl_moveFile in more cases on WindowsMike Kaganski1-1/+1
E.g., calling it with files residing on different volumes, ReplaceFileW will fail with ERROR_UNABLE_TO_MOVE_REPLACEMENT. Handle that error, and also the two other error codes specifically described at [1], to allow more universal use of osl_replaceFile / osl::File::replace, which is "atomic" on Windows, since it uses ReplaceFileW that is suggested as a replacement for Transactional NTFS [2]. [1] https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-replacefilew [2] https://docs.microsoft.com/en-us/windows/win32/fileio/deprecation-of-txf Change-Id: I501c267e5bdd88a33560d2bb916db1a0b6e01831 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126800 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-09-01clang-tidy:readability-redundant-member-initNoel Grandin1-1/+1
Change-Id: I78339f1df1f0c55c7edaa552940b07d1ada3aeb5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121386 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-27[API CHANGE] Drop obsolete osl_demultiplexSocketEvents et alStephan Bergmann1-80/+0
...which were deprecated in 0a126b4c661d65860fd2de92f8cc49bdb65a957c "Deprecate osl_demultiplexSocketEvents et al" towards LO 7.2 (and leave aborting stubs in place for backwards compatibility) Change-Id: Ice6032eb2f351af87dd56eecb002aa2a91e79373 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119560 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-06-02Revert "sb138: #i115619# fix for MinGW"Mike Kaganski1-2/+2
This reverts commit 6727dc5d9414e77975b9fd765993c6e207f872f3. We now don't support compiling using MinGW. Change-Id: I0dee00780bfb4b7deceddd8cd30af03b7f7ed212 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116591 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-05-25Deprecate osl_demultiplexSocketEvents et alStephan Bergmann1-0/+16
The oslSocketSet/osl_*SocketSet/osl_demultiplexSocketEvents functionality is based on the POSIX fd_set/FD_*/select functionality, which suffers from the issue that it has undefined behavior for file descriptors with numerical values greater than or equal to FD_SETSIZE. (And this can be a real issue e.g. on Linux, where tools::extendApplicationEnvironment in tools/source/misc/extendapplicationenvironment.cxx bumps the soft RLIMIT_NOFILE to the hard limit---so that file descriptors can likely have large values---, but where the GNU C library sets FD_SETSIZE to only 1024 and ignores larger descriptors.) This functionality is unused at least by LO itself, and also likely unused by third-party code. So instead of fixing the Unix-based implementation in sal/osl/unx/socket.cxx (by e.g. switching it from select to poll), just mark the functionality as deprecated (with the option of eventually removing the functionality completely from sal/osl/{unx,w32}/socket.cxx, leaving just stubs in sal/osl/all/compat.cxx). Change-Id: I2b97f8a37b45f298da9328660006f3c14361c9a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116089 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-05-05WASM: add initial support for Emscripten cross buildJan-Marek Glogowski1-0/+2
- configure with: - --host=wasm64-local-emscripten - had to make a few externals optional, so adding: - --disable-nss - --disable-cmis - --disable-curl Change-Id: I48d1c73d2675ad2e2beaf2c341578199efbd24ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111130 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2021-05-02throw() -> noexcept, part 2/3: Automatic loplugin:noexcept rewriteStephan Bergmann1-1/+1
Change-Id: I076f16d0536b534abf0ced4d76051eadb4c0e033 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114949 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-04-19[API CHANGE] Do not call getaddrinfo if we just want the hostnameSamuel Mehrbrodt1-2/+1
Similiar to afc41a467fdfabb2cd0879be3e4f1879a1d1dc91 , don't call getaddrinfo in getLocalHostname which calls DNS. This causes a lag when creating the lockfile on opening a document if the network is flaky/disabled. See tdf#97931 and tdf#47179 for some problems caused by this. For the one case where it is expected to call DNS, add a separate function to restore the old behavior. The (semantic) [API CHANGE] is in osl_getLocalHostname, it does no longer return a FQDN. Change-Id: I43455715a474ff6770351d1ce007c28aeb08f32e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107554 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2021-04-08allow more trivial #if's for including headers in PCHsLuboš Luňák1-1/+3
Change-Id: I734ac1832bafe0f4e5710b9b27bd03833179e2d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113800 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-02-05Revert "Fix typo in code"Stephan Bergmann1-2/+2
This reverts commit 3ed9bba283a6a67864c0928186e277240be0d9ba. osl_Pos_Absolut (include/osl/file.h) is part of the stable URE interface; it must not be changed. Change-Id: I1f49923a9351e4be5aee39b10720d38b424feb9b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110435 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-02-04Fix typo in codeAndrea Gelmini1-2/+2
Change-Id: Ib8b306a27d25a34e784aeeb72708b0d5d1511f3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110394 Tested-by: Jenkins Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2021-02-02tdf#130978 Added comment to all published APImsrijita1830-0/+117
Change-Id: I744788bde9778f85ccd9d7667e19d16842900a29 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110248 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-01-30Simplify osl_getGlobalMutex to use function-local staticMike Kaganski1-0/+3
Change-Id: I36df8be817d0f0cb75efa00b0b523f379f67d1d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110126 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-01-27tdf#96505 Get rid of cargo cult 'long' integer literalsAlchemist1-21/+21
Change-Id: I8746b7b32cbebd275fe9f47cce9c80aa87fbc583 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108809 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-11-21tdf#123936 Formatting files in module include with clang-formatPhilipp Hofer3-30/+22
Change-Id: I0507dd797cd5a35e0ae14f4b69ee4e172d08a71a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105681 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Jenkins
2020-09-17osl+tools: fix Windows Arm64 buildJan-Marek Glogowski1-1/+1
Change-Id: I17cbc1c8474880024921f476aa602d61978da868 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102851 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2020-09-12Replace remaining uses of sal_CharJulien Nabet3-22/+22
+ remove sal_Char check on compilerplugins Change-Id: I0f7da14e620f0c3d031d038aa8345ba4080fb3e9 Change-Id: Ia6dba4f27b47bc9e0c89159182ad80a5aee17166 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102499 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-09-06Fix warn "unbalanced grouping commands" in socket.hJulien Nabet1-0/+3
Change-Id: I290d96f8c2bcc9688e1d7acba95564b6bc97b64b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102097 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-08-26[API CHANGE] Drop OSL_THIS_FUNC, directly use C++11 __func__Stephan Bergmann1-19/+0
It had been documented as "the macro OSL_THIS_FUNC is intended to be an office internal macro for now", so take the liberty of removing it, even if technically that can be considered an incompatible API change. Change-Id: I7580a932e1da54845934378a650e894f3f3a9062 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101406 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-08-24Fix typosAndrea Gelmini2-3/+3
Change-Id: I9385704bea54ff504457f7ac1ec39ed98cfdaf97 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101276 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-08-17[API CHANGE] remove OSL_SIGNAL_USER_RESOURCEFAILURENoel Grandin1-1/+0
which is unused since commit 00657aef09d854c74fb426a935a3e8b1fc390bb0 Date: Sun Jun 11 20:56:30 2017 +0100 migrate to boost::gettext Change-Id: Ia66a3a729dc4999c95b96ae1754b07c372121370 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100810 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-15loplugin:buriedassign in salNoel Grandin2-3/+14
Change-Id: I5a7bc9378ceacb9116c03e3a9fc01c5675c40908 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92243 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-24Fix typoAndrea Gelmini1-1/+1
Change-Id: I5a430d2e681b0c95476b4b59ca5281da6a05ee8e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90924 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-02-05Fix typoAndrea Gelmini1-1/+1
Change-Id: Ia64904100110472464e9025b1e53ef65bd2416c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88001 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2020-02-05Fix typoAndrea Gelmini1-1/+1
Change-Id: I1a241b6d84d4129f94cf19ba764b3a40ec2a7887 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88000 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-11-19Fix multiple documentation sections (osl)Julien Nabet2-3/+0
Fix these warnings: Line 45: /cygdrive/c/BLP/core/instdir/sdk/include/osl/file.h:1308: warning: return value 'osl_File_E_LOOP' of osl_removeFile has multiple documentation sections Line 49: /cygdrive/c/BLP/core/instdir/sdk/include/osl/file.hxx:1893: warning: return value 'E_BUSY' of osl::Directory::remove has multiple documentation sections Line 50: /cygdrive/c/BLP/core/instdir/sdk/include/osl/file.hxx:1361: warning: return value 'E_LOOP' of osl::File::remove has multiple documentation sections Change-Id: Id82280efd9c6d1e33df966159dbef677839f6083 Reviewed-on: https://gerrit.libreoffice.org/83229 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-10-10Adapt osl_replaceFile documentationStephan Bergmann2-2/+2
...to eedf523c123a82bf3cbc5f389783e22d75b2e2c5 "tdf#127069 sal: preserve gid of files in the unx osl_replaceFile()" Change-Id: I47627418a9cd662802e4de3aa4cad4128af82ad4 Reviewed-on: https://gerrit.libreoffice.org/80606 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-08-30new loplugin:noexceptmoveNoel Grandin4-8/+8
idea from mike kaganski look for places where we can mark move operators as noexcept, which makes some STL operations more efficient Change-Id: Id732b89d1fcadd5ceb0ea2b9d159fed06136330f Reviewed-on: https://gerrit.libreoffice.org/78251 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-20Fix typosAndrea Gelmini1-1/+1
Change-Id: Iac38284daf0196d6a7f29aaa6e2103c1d76d7cc4 Reviewed-on: https://gerrit.libreoffice.org/77755 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-07-14Fix typoAndrea Gelmini1-1/+1
Change-Id: If136ac948234ec77d67058fc47922dc2154b1831 Reviewed-on: https://gerrit.libreoffice.org/75593 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-07-14Fix typoAndrea Gelmini1-3/+3
Change-Id: I151f472d5c542b989e858da22b29140c8e1b9b5b Reviewed-on: https://gerrit.libreoffice.org/75584 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-07-14Fix typoAndrea Gelmini1-2/+2
Change-Id: Icbd1d5f76611734e66481f18ec0239d159fea5d6 Reviewed-on: https://gerrit.libreoffice.org/75592 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-07-14Fix typoAndrea Gelmini1-2/+2
Change-Id: I0444435d86014891462adababc8de5ccb06fa6cd Reviewed-on: https://gerrit.libreoffice.org/75591 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-07-14Fix typoAndrea Gelmini1-3/+3
Change-Id: I8fa5e8afe6de453f20c241e9b03f06841f63ed5d Reviewed-on: https://gerrit.libreoffice.org/75590 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-07-14Fix typoAndrea Gelmini1-2/+2
Change-Id: I39efb064f94354ad3b8881f875311f0422fe6925 Reviewed-on: https://gerrit.libreoffice.org/75583 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-05-10an is used before a vowel soundCaolán McNamara2-2/+2
not before vowels with a consonant sound so its a url not an url Change-Id: Ic27ff3bee67469284d460c31ced6f63cb3633db2 Reviewed-on: https://gerrit.libreoffice.org/72062 Reviewed-by: Jens Carl <j.carl43@gmx.de> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-04-11[API CHANGE] Restore old exteral API behaviourJan-Marek Glogowski1-4/+15
Commit d38f9934f08939032cca64a32de58fa3901a88d5 ("[API CHANGE] Asserts to never clear already cleared guard") changes the API in a way, which can silently break compiling code for no reason. As discussed on the mailing list, this uses LIBO_INTERNAL_ONLY to restores the old behaviour for external API users. Change-Id: I43c9b955c1c8f5402588fcea2bfc38ab6fa9f263 Reviewed-on: https://gerrit.libreoffice.org/70528 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
2019-04-10Fix typoAndrea Gelmini1-1/+1
Change-Id: I2df9e24ff0d4683819db8fa17bd6a0dfda223e13 Reviewed-on: https://gerrit.libreoffice.org/70534 Reviewed-by: himajin100000 <himajin100000@gmail.com> Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-04-10Unify deleted function templates and improve docsJan-Marek Glogowski1-17/+29
... and doesn't change any code or API. Change-Id: Ic769831130bb78b8192ffd33375760bef9b76911 Reviewed-on: https://gerrit.libreoffice.org/70466 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>