summaryrefslogtreecommitdiff
path: root/sal
AgeCommit message (Collapse)Author
2012-09-26sal: uri.cxx: deploy some assertsMichael Stahl
Change-Id: I1d755086295f5a8cd7acf56204402b95fe228d2d
2012-09-25use intrinsict to inline InterlockCount() on Windows tooNorbert Thiebaud
Change-Id: I93949cc37821c5306514c8ce2f21519550f33775 Reviewed-on: https://gerrit.libreoffice.org/672 Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com> Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
2012-09-25replace remaining InterlockedCount() with inlined versionNorbert Thiebaud
Change-Id: Ifcfa48fc87f905a91470a5b0fd597b02f220784c Reviewed-on: https://gerrit.libreoffice.org/671 Tested-by: Norbert Thiebaud <nthiebaud@gmail.com> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
2012-09-22dependency on makefile needs full pathDavid Tardon
Change-Id: I0733abb5c736ab393259fd6a005a89b887304f10
2012-09-21Guard against lack of slashes in dli_fnameTor Lillqvist
Change-Id: Id9c452d9c1034f2e7969a9eae7588f2eb81a8813
2012-09-19fix system-clucene/-boost build with gcc 4.4Rene Engelhard
Change-Id: I95d23e6728571b3f3a6421a05fec814f7c5d059c
2012-09-19dung out no longer needed initUCBHelper methods; thanks to sberg.Michael Meeks
2012-09-18deprecate oustringostreaminserter.hxxNorbert Thiebaud
the intent of this header has canged over time. now it is already systematically included with ustring.hxx and the operator overload it provide fit nicely there... Just to be safe, since that include as been added to the api during the 3.5 timeframe and therefore is already in 'production' the header remain and simply attempt to include ustring.hxx but a warning is issued indicating that this header should not be used anymore... in a couple of major release we will thenr emove it completely All internal users of that header are converted. Change-Id: I8934c55f089e29d78c0f5649b7c87b2ecf024bad Reviewed-on: https://gerrit.libreoffice.org/634 Tested-by: Norbert Thiebaud <nthiebaud@gmail.com> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
2012-09-18move ostream OUString operator<< directly to ustring.hxxLuboš Luňák
It apparently works that way, so there's no need to have an #include loop. Change-Id: I58d4f0461c14637872a139f0fbfb78f2a99fe28a
2012-09-17migrate some of the biggest consumer of osl_*InterlockedCount to osl_atomicNorbert Thiebaud
Change-Id: I0e6992afbeffaf3b993e6630fb396d93012890e0 Reviewed-on: https://gerrit.libreoffice.org/632 Tested-by: Norbert Thiebaud <nthiebaud@gmail.com> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
2012-09-17Some comment clean upStephan Bergmann
Change-Id: I33fbe68b17e9a1c457b37c6d81619f2df67fbe8d
2012-09-17add osl_atomic_* api to allow for inlined atomic increment/decrementNorbert Thiebaud
atomic increment/decrement is provided by osl_increment/decrementInterlockedCount() but that is a exported dll function, so it cannot be inlined. valgrind analysis of a run, loading a medium sized spreadsheet, shows that these 2 functions were called 3.5 millions times for a total cost of 55 millions of instructions... a cost of 8 instructions per call, which is at least a 300% overhead since an atomic inc/dec is 2 instructions iow we could save about 1% of the total instruction count of that run(4.6B) We cannot change the existing api, as this would break ABI. but we can add a new api. and migrate internal user to it. osl_atomic_decrement/osl_atomic_increment do the same task, than osl_*IntelockedCount() but do that inlined if possible. Note that this version only optimize the case GCC with atomic built-in. but support for other case should not be very hard. follows-up patches will replace the use of the osl_*InterlockedCount() in the product with their osl_atomic_* equivalent. Change-Id: If4dcbf94ea6f62eb6d55d30613fe65878ffb8023 Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2012-09-17update unused code listCaolán McNamara
Change-Id: I4d6ad11fbe68420931e88defa20afbef290d4d24
2012-09-17Include header with prototypes of defined functionsStephan Bergmann
Change-Id: Ia28c36b1627ef944adecd5c8a55c150bd0f9aa02
2012-09-16export sal init and deinit functionsDavid Tardon
Linking of cppunittester (and any other executable that uses SAL_IMPLEMENT_MAIN or SAL_IMPLEMENT_MAIN_WITH_ARGS) fails otherwise. Change-Id: I778941ab2069819789f96ab04f364ea61cf4a3cb
2012-09-15Let --enable-assert-always-abort affect setting NDEBUG directlyStephan Bergmann
For one, assert.h is designed to be includeable multiple times with changing NDEBUG settings, so it is not robust to include it early in sal/macros.h with "correct" NDEBUG settings and potentially include it again later. For another, there is #ifndef NDEBUG code providing functionality used exclusively within assert calls, which must be compiled with the same NDEBUG-setting as the relevant #include <assert.h>. Change-Id: I7b2f9c85f8e2155051274757c64162ed5a5e9d1b
2012-09-15Include saldllapi.h explicitly where neededStephan Bergmann
Change-Id: I7ba421479cd332e059ed9da1c6090e2df420347e
2012-09-15Revert "saldllapi.h is really not included outside of sal itself"Stephan Bergmann
This reverts commit 2dfe34ce0efef6ec0412130a32f755657710363d: * sal/saldllapi.h is about something different than sal/types.h (it is rather a mistake of cf77e8a0b9dc26d5007c76388c3f09231f048bdd "sal: add visibility symbols" to shortcut the #include of sal/saldllapi.h into sal/types.h instead of the headers that actually need it), not every header needs to include sal/types.h * sal/config.h is the header to always include first (not sal/types.h) Change-Id: I217f2540197ddb682c6c00e529b812b04b327d73
2012-09-15Fix comparisonJulien Nabet
Change-Id: Id2db7abdec7373082f85fb9d8479427d09cc0a12
2012-09-14typo: Uniocde -> UnicodeAndras Timar
Change-Id: I1befdc4c9772c4bf66ee12bf0d2d4aa303903099
2012-09-14sal_rtl_uri unittest seems to depend on sal_textenc library tooLuboš Luňák
Change-Id: I3b85f3916d49a1853d073879a906506bee0d4fba
2012-09-14better debug message when textenc module loading failsLuboš Luňák
This is at least the second time there's a race condition during build, and OSL_TRACE is just SAL_INFO, i.e. not printed by default. Change-Id: I1c683cf463665c6e36097025756c3aeab3a2c330
2012-09-14Adapt for DISABLE_DYNLOADING possibility on AndroidTor Lillqvist
Change-Id: I7fcea698c3d89c5b84b38a708502bcdf4526a614
2012-09-14add a configure option to make assert() abort in release codeNorbert Thiebaud
Change-Id: I93720ee3338426174b31a6ea6dba3af7ffb7e207
2012-09-14remove use of SAL_MIN() macroNorbert Thiebaud
Change-Id: Ia91118388240c9a54d010b94aef34ad528ce5761
2012-09-14remove SAL_MAX() macros and few usersNorbert Thiebaud
Change-Id: I5ece116a66ab37fe64aac6c60bc38244677d499a
2012-09-14removed unused sal macro (SAL_FIELDOFFSET)Norbert Thiebaud
Change-Id: I5b4b70ecc87efc943afe8a408140ef91e108e0a3
2012-09-14saldllapi.h is really not included outside of sal itselfNorbert Thiebaud
furthermore sal/config.h is already included by sal/types.h so no need to include it twice Change-Id: Id84122eb102eececc1001ea4a56c556ff775defa
2012-09-12WaE: unused parameter 'uFlags'Tor Lillqvist
Change-Id: Ifb3569201ea5d96c2ff293bf0f8ba74e6205dc15
2012-09-12Work around some potential problems with thread-unsafe getenvStephan Bergmann
I have seen at least one failure of one of our unoapi tests where soffice.bin crashed in getenv(3). This patch is just a drop in the ocean, though. Change-Id: Iac8a2283b0a62e4fa95a0d063c1676af6c2390be
2012-09-12diagnose.c -> diagnose.cxx (to ease further modification)Stephan Bergmann
Change-Id: I6c050c0cedab6aeed556dc770c3700e6fbbb4731
2012-09-12Simplify osl_searchPath_implStephan Bergmann
Change-Id: I78a97b5a1abbcb7921eba60b8014a21373c0b596
2012-09-11no ascii >127 chars in string literalsLuboš Luňák
Change-Id: Icf7fadc27823b0cd32795f3ab685602f9ad6c99c
2012-09-11fdo#39625 Make existing cppunittests workRadu Ioan
Make sal_rtl_uri cppunittest work - removed call to simpleheader.hxx - added call in Module_sal.mk for sal_rtl_uri - created mk for cppunittest for sal_rtl_uri - removed duplicate include - change from t_print to printf Change-Id: I928ade62eb51ba1cb0a74e347411b344d57e97d0 Reviewed-on: https://gerrit.libreoffice.org/590 Reviewed-by: Luboš Luňák <l.lunak@suse.cz> Tested-by: Luboš Luňák <l.lunak@suse.cz>
2012-09-11Missing "include"Stephan Bergmann
Change-Id: I93baa875c15ea2186f7e738bfa48457e7fa09f88
2012-09-10what gets tested here turns out to be out of date nowCaolán McNamara
Change-Id: I61b96b8d0e9c821f0e6228430eece1617871a916
2012-09-10fdo#39625 Make existing cppunittests workRadu Ioan
Make sal testHelperFunctions cppunit work - removed call to simpleheader.hxx - added call in Module_sal.mk for sal_testHelperFunctions - created mk for cppunittest for sal_testHelperFunctions - removed unused and unusefull function Patch#2 - remove some unusefull include - add bug number to commit message Change-Id: I2f4e831cea0213a07f440bb00e0302eb1c4d7dc1 Reviewed-on: https://gerrit.libreoffice.org/588 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2012-09-07use new file header, this is actually a new fileLuboš Luňák
Change-Id: If12e05b0d46fbbd815b9af5dc9551e2f07d859be
2012-09-06add O(U)String::startsWith() to complement endsWith()Luboš Luňák
There's match(), with the second argument defaulting to 0, which does the same, but that's pretty non-obvious. Change-Id: Idd4de9388f53e1b5dc5d48446d1001af32c0af3d
2012-09-05Detach thread before returning from android_main()Tor Lillqvist
Change-Id: I593e94e90971b6be681de48dce74f7df2293c10e
2012-09-05fdo#38913: Prevent invalid parameter handler crashesStephan Bergmann
It appears that on Windows at least some jvm.dll versions can cause calls to _fileno(NULL), which leads to a call of the invalid parameter handler (see <http://msdn.microsoft.com/en-us/library/ksazx244%28v=vs.80%29.aspx> "Parameter Validation: Visual Studio 2005"). The default handler causes the application to crash, so install a "harmless" one instead. Change-Id: Id6a3ffb63f70b0c65546bc933e994c8dbf35203c
2012-08-29allow NULL pModuleName for WNT in osl_getModuleHandleCaolán McNamara
osl_getModuleHandle under unix can have a NULL pModuleName and the underlying GetModuleHandle on windows allows a NULL modulename as well Change-Id: Iaf154e635e9c96cbc62d525a7552339ce132f3dc
2012-08-28callcatcher: make VCLXPrinterServer an XTypeProviderCaolán McNamara
Change-Id: Ib6e4e4c61c56cea9c6171f36989e903f3c35aa4e
2012-08-27Move -DHAVE_GCC_BUILTIN_ATOMIC to solenv/gbuildStephan Bergmann
Change-Id: I82f62c998837783ac69317123268b0c87f74425f
2012-08-27fdo#53855: Use the newly added HAVE_GCC_BUILTIN_ATOMIC for salJung-uk Kim
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>: * nCount is needed in else branches after all * tabs -> spaces Change-Id: Iaa39ba9e1ed645819905f0e484fa4f1812271700
2012-08-25Perhaps this will fix the windows build?Kohei Yoshida
Change-Id: Ia57ab6bfa9e7fa663b699627cec07d19a378b293
2012-08-25fdo#39625 Make existing cppunittests workRadu Ioan
Make rtl uuid cppunit work - removed call to simpleheader.hxx - added call in Module_sal.mk for rtl_uuid - created mk for cppunittest for sal_rtl_uuid Second patch: - removed makefile.mk as Stephan suggested - modified CppunitTest_sal_rtl_uuid.mk header Change-Id: If090843203e38d3eced14941b58e6122d27bdb09 Reviewed-on: https://gerrit.libreoffice.org/422 Reviewed-by: Kohei Yoshida <kohei.yoshida@gmail.com> Tested-by: Kohei Yoshida <kohei.yoshida@gmail.com>
2012-08-21Related fdo#46249: FileStatus can have fewer fields than requestedStephan Bergmann
Turns out 608fe962cc649ad62c489811d3a8666e0e06e5e7 "Let osl::FileStatus getters assert programming errors" was overly optimistic and misunderstood that osl_getFileStatus(..., nMask) /can/ return a FileStatus for which isValid(nMask) is false, esp. for stuff like file names and URLs of Windows drives and servers. That in turn leads to existing code now calling rtl::OUString(_aStatus.ustrFileName) etc. with null argument and crashing. Change-Id: Icd2168e209aa1c7a6df30cd954513d01034923db
2012-08-21mingw doesn't know __uuidofLuboš Luňák
Copied from fpicker/source/win32/filepicker/comptr.hxx, which otherwise seems to be the same file. Change-Id: I51ca96c1280e75f9318fcbc74997b2bf755fff95
2012-08-20fdo#53252: _toupper is unreliableStephan Bergmann
<http://msdn.microsoft.com/en-us/library/45119yx3%28v=vs.80%29.aspx> "toupper, _toupper, towupper, _toupper_l, _towupper_l: Visual Studio 2005" states: "In order for toupper to give the expected results, __isascii and isupper must both return nonzero." But a community comment clarifies: "This is incorrect, and should refer to '_toupper' (the macro form), not 'toupper'." (Which makes sense, as otherwise toupper would violate the C Standard.) And indeed, at least for some LO built against MSVC 2008 Express on Windows 7, _toupper('C') = '#' is broken, while toupper('C') = 'C' is good. (And the unexpected '#' then causes all sorts of errors in the code.) Change-Id: Iddaddcaf0cc3ffb30e55b0f410a6cfe9118accc8