summaryrefslogtreecommitdiff
path: root/sal/osl
AgeCommit message (Collapse)Author
2017-01-15FreeBSD PPC: Missing patchPedro Giffuni
Submitted by: Curtis Hamilton (cherry picked from commit 55ffac651c9996916680cdc05b32eb1b091a5ccf) Change-Id: I160ff9369a563d58469682ed96e25c792184708c
2017-01-11loplugin:externvar (clang-cl)Stephan Bergmann
Change-Id: I81877e46cf95dcc7de16b797fca33658036bf9e8
2017-01-10fix windows buildNoel Grandin
VS2013 does not like stack-allocated arrays with runtime size Change-Id: I58bd3a9feb6e2bef1b4a4f775669e5e3e03de5f7 Reviewed-on: https://gerrit.libreoffice.org/32922 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-10New loplugin:conststringvar: salStephan Bergmann
Change-Id: Ia66415ff9ee67958e84cfff7eda082cdbfc9b9b9
2017-01-10rename SAL_DEBUG_TRACE to SAL_DEBUG_BACKTRACENoel Grandin
since "trace" is such a generic term, this makes it easier to actually find the feature when you need it. And add feature to limit stack depth of the reported backtrace. Change-Id: Iab3e4ceb2e8480e7b5e2b920eb6c5d7631e21c43 Reviewed-on: https://gerrit.libreoffice.org/31752 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-09New loplugin:externvar: salStephan Bergmann
Change-Id: Iefc33784f21e7a0b88c8d6308618926e38ab8554
2016-12-30cleanup tailing backslashesJochen Nitschke
Change-Id: Idb4bfc97e7d758c58118742affd9a9345c7a99f2 Reviewed-on: https://gerrit.libreoffice.org/32491 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-20Don't malloc between for and execStephan Bergmann
...at least macOS doesn't like that; change from OSL_TRACE (effectively doing nothing unless running a debug build with SAL_LOG=+INFO) to SAL_INFO (calling std::stringstream -> malloc in debug builds, regardless of SAL_LOG env var) in a005fbeddc4e615cfff56a9bd84355f8d42c1c8c "OSL_TRACE->SAL in framework..sal" made the mistake obvious. Change-Id: I43d35524a0861998a1ef58c6f448085a2fb01cd5
2016-12-20add an option to pipe log output to fileMarkus Mohrhard
The target file and the option are controlled by SAL_LOG_FILE. The variable should contain the target file in a system dependent notation. Change-Id: Ie1ce9c39740c8b7a989e5af222be21a3e3142084 Reviewed-on: https://gerrit.libreoffice.org/32176 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-12-15teach sallogareas plugin to catch inconsistenciesNoel Grandin
Change-Id: I8bcea5ffc74d48148bea78da8c17744e288c069a Reviewed-on: https://gerrit.libreoffice.org/32004 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-14I guess FREEBSD doesn't need this implementation of fcvtStephan Bergmann
The only actual use of fcvt across the codebase has been removed in 2002 with 31cb31335f3bf7e6e57d70ca61bf5a2a536d1e6e "GetStringFromDouble: replaced that fcvt() and temporary LocaleDataWrapper instance crap" even before this implementation for FREEBSD was introduce in 2003 with c61bf41c39daa97d30016eedcd7a0b687c2d8558 "INTEGRATION: CWS ooo11rc: join: from ooo11beta2". Change-Id: Ieea9499f001c6eac6383c344afb9050dfc70f43c
2016-12-13Reuse existing sal.osl log areaStephan Bergmann
Change-Id: Ib1fc80c79355322489b7ebd37cbbbbb6614ec67a
2016-12-13fix windows build after OSL_TRACE->SAL changesNoel Grandin
Change-Id: I345343f84f66299e8b91b31af0290ed0c622bf8d
2016-12-13OSL_TRACE->SAL in avmedia..canvasNoel Grandin
Change-Id: Id9077ea29e7028c12f40abfd4c57756c863e3cd9
2016-12-13OSL_TRACE->SAL in framework..salNoel Grandin
Change-Id: I9a897af88aa9f6f7ca98ce521c69b5a4ee8462e9 Reviewed-on: https://gerrit.libreoffice.org/31903 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-06new loplugin/rewriter comparisonwithconstantNoel Grandin
As per sberg' suggestion Limit it to == and !=, because some people like the flow of inequalities like: "0 < a && a < 42" The changes to sal/ were made using the rewriter. The rewriter still has one bug, in pipe.cxx, it managed to pick up some random piece of macro. No idea why. Change-Id: I01305f9c5396a4b6c7421d6e92f1b4b529388e82 Reviewed-on: https://gerrit.libreoffice.org/30962 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-29Don't change ustrHostname in case of errorStephan Bergmann
Change-Id: I78e85db2794b01286be49e1be70b53ac4f058cbe
2016-11-21fix for 'warning C4702: unreachable code'Jochen Nitschke
on windows vista and higher only Change-Id: I19cc63ad7e96b58fa8eb341801f5ad55260abf85 Reviewed-on: https://gerrit.libreoffice.org/31021 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-08Use the larger stack size for ASan/UBSan builds on macOS, tooStephan Bergmann
At least on my macOS 10.12.1, PTHREAD_STACK_MIN is 8192 (so stacksize was substantially smaller than 12MB), and without this change there were randomly looking failures in e.g. JunitTest_chart2_unoapi with a -fsanitize=address build. Change-Id: Icfe989a0e5097a9a0ae76c6e0f6ffcca18271245
2016-11-02loplugin:unusedfieldsNoel Grandin
Change-Id: I96634c18ba6600f8f7d5d04a162dcd7e1e312923 Reviewed-on: https://gerrit.libreoffice.org/30474 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-26sal::detail::logFormat is no longer neededStephan Bergmann
...since 97354578d7195bce927f0c00c4e2ae9cd7344776 "Remove the obsolete functionality originally underlying osl/diagnose.h" Change-Id: I7c920bca9cdddb37fcbbc15d8629d01c21eb0787
2016-10-19loplugin:expandablemethodds in reportdesign..salNoel Grandin
Change-Id: Idb133e442b881d263fcb83a4858c4a08b451c0f0 Reviewed-on: https://gerrit.libreoffice.org/30032 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-13SOCKET_USE_AUTODIAL is dead codeStephan Bergmann
...ever since 010f71130b0d55079d01fbda38d45901de98b133 "INTEGRATION: CWS sal01: #105958# Remove usage of wininet.dll autodial functions" wrapped its central code in #ifdef SOCKET_USE_AUTODIAL instead of removing it properly. Change-Id: I4c077c71ce8eda3a3f8b83286178d0d7907a6e02 Reviewed-on: https://gerrit.libreoffice.org/29742 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-10-04At least MSVC 2015 doesn't find sal/osl/w32/time.hStephan Bergmann
...when included as <time.h> (our rather sick convention, for include files other than standard headers) rather than "time.h" Change-Id: I5aacfb81de95ae4254e39badffc9c83c7ac0f58f
2016-10-04clang-cl loplugin: salStephan Bergmann
Change-Id: If04d3f07dc8bffac8887773b5424c09848cd8f1a Reviewed-on: https://gerrit.libreoffice.org/29404 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-09-30sal: WNT: print errno when oslCreateThread failsMichael Stahl
Change-Id: Iad0a2a7ba68b3f43c22e0b5a3cee646f8baba30e
2016-09-30osl_getSocketOption shall return the new lengthStephan Bergmann
regression introduced with c89f22ffcd4191f7cb8ef0e68adb2a0f0ec6c74e "INTEGRATION: CWS pj72" Change-Id: Icea8bc43e346dbe4cf7cbfdf1176704d52b339f4
2016-09-15Remove outdated commentTor Lillqvist
Change-Id: I8547760d4ea24205e21f215f25f0c58757bd9329
2016-08-18Fix sal log for 32 bit Linux buildGiuseppe Castagno
Change-Id: I2644079cafa46db8689463e1d0abc1cf3bdf49de Reviewed-on: https://gerrit.libreoffice.org/28222 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2016-08-18Move comment block back where it wasTor Lillqvist
Change-Id: I020c1def83d7cc37f9d5e14f2fefacb31a56bbbf
2016-08-18If no WARN in SAL_LOG, use the INFO selection for WARNs, tooTor Lillqvist
Often the choice whether some particular message is displayed with SAL_INFO or SAL_WARN has not necessarily been that well thought through. Many SAL_WARNs are not actually warnings but purely informative. If you want to see the INFOs for an area it makes sense to want to see also the WARNs for it. So make it so, unless a specific WARN selection is specified. Change-Id: I6286c5f856b29e68bedb7f20efadf56953f94b72
2016-08-18Add handling of a +RELATIVETIMER flag in the SAL_LOG environment variableTor Lillqvist
Outputs a timestamp in decimal seconds (with millisecond accuracy). Simplified the handling of SAL_LOG if no "level" is specified. Now just a totally unset (or empty) SAL_LOG causes the default of "+WARN" to be used. Given how the code works, it would have become too unwieldy to check for all combinations of TIMESTAMP and RELATIVETIMER but no WARN or INFO. Change-Id: I7bb5bb665d4e764e7eee447e93486f6467042e97
2016-08-18No need for nested unnamed namespacesTor Lillqvist
Change-Id: I586c11d4fe61b56624ee158c04e365cfb0cc4012
2016-08-18Add handling of a +TIMESTAMP flag in the SAL_LOG environment variableTor Lillqvist
Change-Id: I9bdcd8b2d7b46a087d7f5461b6f7c3d9f02ec084
2016-08-05loplugin:countusersofdefaultparams in oox..sdNoel Grandin
Change-Id: I4504939a3957606979c6ac36af6611e1fe072d01 Reviewed-on: https://gerrit.libreoffice.org/27902 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-13Remove __cplusplus-checks from apparently-C++-only filesStephan Bergmann
Change-Id: I87e9ce45cf945e75e8140a9d4608da8abcddada6 Reviewed-on: https://gerrit.libreoffice.org/27187 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-07-05Clarify calculation precedence tdf#39440Muhammet Kara
Use parentheses to clarify the code. Change-Id: I864dc6dacadb5b9ba9dca8e0abd9fa4e6db1eddc Reviewed-on: https://gerrit.libreoffice.org/25677 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-06-29move #includes to top of fileNoel Grandin
instead of being randomly embedded somewhere deep inside the CXX code. Found with: git grep -nP '^#include' -- *.cxx | sort -g -k 2 -t : Change-Id: I9ee432d3b665ecb6ec600bd51cc4b735a1b1127a Reviewed-on: https://gerrit.libreoffice.org/26764 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-06-23tdf#99589 - tolower / toupper - dangerous to Turks ...Gökhan Gurbetoğlu
Change-Id: I8b0fe9354232a7b60f3605fa6f90f6741f7bf683 Reviewed-on: https://gerrit.libreoffice.org/26537 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-06-20switch to EHs on windowsMarkus Mohrhard
This seems to be a good idea based on several discussions in the project. In the end catching SEH exceptions is just going to cause strange platform dependent bahavior. This patch is based on on http://thread.gmane.org/gmane.comp.documentfoundation.libreoffice.scm/39102/focus=55516 and includes some additional cleanup of the sal signal code. Change-Id: Iedc998e37e6495afec445eccb60fa1c2b1a7defd Reviewed-on: https://gerrit.libreoffice.org/26497 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-06-19loplugin:salbool: Implicit conversions from non-Boolean fundamental typesStephan Bergmann
Change-Id: I67eac95686678e6f5a2d60798535b2c65a9ba5d7
2016-06-18move the code for tdf#99410 to the sal init windows codeMarkus Mohrhard
Change-Id: I4ead30fa1736a3a99fb3379e89367934c8df2809 Reviewed-on: https://gerrit.libreoffice.org/26444 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Jenkins <ci@libreoffice.org>
2016-06-17Revert "fdo#38913: Prevent invalid parameter handler crashes"Stephan Bergmann
This reverts commit a82e532ce006c54b2740de74d1da5d11307da7c1. That hack should no longer be necessary now that the root cause for tdf#38913 has probably been found and fixed with b5876bfcb69a65c87d602bae687b3c0634c0a1e7 "passing a NULL pointer to fileno is not allowed". Conflicts: sal/osl/w32/salinit.cxx Change-Id: Id3a3d3163945acc9b5d5e74a8d357dfa2ce63f37 Reviewed-on: https://gerrit.libreoffice.org/26411 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-05-30tdf#100021 - format argument issue in process.cxxRichard PALO
avoid warning whether pid_t is long or int Change-Id: I533175b53166cb233169902d277906f5ce979421 Signed-off-by: Richard PALO <richard@NetBSD.org> Reviewed-on: https://gerrit.libreoffice.org/25593 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2016-05-25SAL_FALLTRHOUGH in Windows-only codeStephan Bergmann
Change-Id: If35da46c209746a86687e1c3f60f72f2f08aa681
2016-05-18limit scanf string field widthJochen Nitschke
Change-Id: I9070bae914d923171b6eaf8209de00922dc87be7 Reviewed-on: https://gerrit.libreoffice.org/25052 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2016-05-16get breakpad signal handler working on windowsMarkus Mohrhard
The LibreOffice signal handler overwrites the breakpad signal handler. Just store the old handler and call that handler before we do any work in our own handler. Our own handler implementation is just insane as we are even trying to take the SolarMutex which can easily deadlock. Change-Id: I2401bba18701115561d00c7fc11138ead2a48205 Reviewed-on: https://gerrit.libreoffice.org/25022 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-05-16fix typoMarkus Mohrhard
Change-Id: Icfc4b73d5664c205ad642c660af5227f403d20ff Reviewed-on: https://gerrit.libreoffice.org/25021 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-05-12-Werror,-Wimplicit-fallthroughTor Lillqvist
Fix "fallthrough annotation in unreachable code". Clang is clever enough to know that code after assert(false) is unreachable in a non-NDEBUG build. Seriously, micro-optimisation of the case that should never be reached? Change-Id: I10d7ae60895437be52c27aa93539d17e0f091ac4
2016-05-11sal: -Werror,-Wimplicit-fallthroughMichael Stahl
Change-Id: Id8262e735b9f95d8b476a4939c362648e2a4328a