summaryrefslogtreecommitdiff
path: root/sal
AgeCommit message (Collapse)AuthorFilesLines
2013-10-28Related: fdo#69641 convert OSL_ASSERT into assertCaolán McNamara1-6/+6
Change-Id: I63c32289c7ac6a428c8c50e49650fbac98c8c5e3
2013-10-28windows: warning 4706 is disabled globally in com_MSC_defs.mkThomas Arnhold1-4/+1
So there is no need to do this locally, too. Change-Id: Ibc623235cae07a86dfd0dbc1d7672ca4273facec
2013-10-22Bin comments that claim to say why some header is includedTor Lillqvist4-6/+6
They are practically always useless, often misleading or obsolete. Change-Id: I2d32182a31349c9fb3b982498fd22d93e84c0c0c
2013-10-17fdo#70319 "exponent followed by at least on digit" also for special case 0.0Stephan Bergmann2-0/+10
Change-Id: I07e7917417b8a22cf6d64f2b7a447f9084b9fa2d
2013-10-14resolved fdo#70319 exponent must be followed by at least one digitEike Rathke2-0/+18
Change-Id: Icdd22fa0f1efcdd18cfea7cb48e1cbf2cf8d3533
2013-10-13lo_dlcall_argc_argv() is unusedTor Lillqvist1-12/+0
Change-Id: I318bb78b148564f64373dcb87bfb458c10f87489
2013-10-10sal: fix osl_setCommandArgs() on WNTMichael Stahl1-3/+6
... was missing from 1acaa577b67158c060d2f57414f7aea86504a489. Change-Id: I9098f4587f1c201328abbbcfb34d42f09d2e8203
2013-10-10Adapt to C90Stephan Bergmann1-1/+3
Change-Id: I491ca9ccfc5622afcec163e75792aa03a3a24a4f
2013-10-10sal: add special handling of argc==0 to osl_setCommandArgs()Michael Stahl2-7/+20
... to set up a fake command line. This is used from pyuno, when invoked from the "python" executable as "import uno". On WNT there is an API to get the actual command line, so just use that even in the "fake" case; on UNX just fake something up. Just for the record the whole osl_setCommandArgs() is called exactly once assumption should work out _unless_ there is a program that uses SAL_MAIN _and_ does a python-level "import uno" _before_ it wants to create a python-based UNO service (via pyuno_loader::CreateInstance), since pyuno already takes care to call Runtime::initialize() at most once. Change-Id: Ifd23de733ea3e6b694d46ab039b6aa4fd3e7fc1b Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2013-10-10Remove support for undocumented SOLAR_USER_RTL_TEXTENCODING env varStephan Bergmann2-17/+2
...introduced in 2001 with a Sun-internal bug ID as 3b1d10acc297db493b1f4e1999f6ba71f72db7f1 and 54007bb90c30469a5357c56056b8fdba3a233e24 "#84715# osl_getThreadTextEncoding first defaults to contents of environment variable SOLAR_USER_RTL_TEXTENCODING." Change-Id: I991b4777c27a24419bf066cf41b3c4545d0fa681
2013-10-09Fail fast at least in debug buildsStephan Bergmann1-1/+1
Change-Id: I266d5cf5b98827617f7ed65c94a772e28808f386
2013-10-09pyuno: set up fake command line in getComponentContext()Michael Stahl1-1/+1
Easy to trigger the assert in osl_getCommandArgCount(), just run instdir/*/program/python and "import unohelper". Avoid that by setting up a fake command line, hopefully nobody expects to be able to give relevant args to python... Change-Id: I0df6c23d6ecbb3c2bce81a9d5bcecdcb1729ddbb
2013-10-09Use SAL_WARN_IF() instead of assert() so that our Python unit tests don't failTor Lillqvist1-1/+1
In some (all?) Python unit tests (or subsequentchecks?) osl_getCommandArgCount() gets called even if osl_setCommandArgs() hasn't been called, sigh. Change-Id: I53ba20806da3168182fd2011397fd29e549869dc
2013-10-09Use assertions to ensure proper use of the osl command line arg APITor Lillqvist1-6/+2
Stephan says: I don't buy that argument of making things less fragile; IMO it's that "defensive programming" approach gone wrong, where you add complexity to mitigate a problem's effects in one place, instead of fixing the problem itself in the real place. [...] The better robustification is probably to turn the OSL_TRACE in osl_getCommandArgCount (sal/osl/unx/process_impl.cxx) into something stronger like SAL_WARN, assert, or std::abort Change-Id: I3ba6684b4921eb67c2f4534e29e33056e8a891b3
2013-10-09Revert "Don't ignore -env: command line parameters in some cases"Tor Lillqvist1-10/+1
This was the wrong way to fix the problem. The root cause was a static initialiser in the OpenCL code, and that code should not even have been built for iOS. This reverts commit 261f1439e5516f6d60317a675d261af330a9a74c.
2013-10-08CID#982700 silence coverityCaolán McNamara1-2/+6
Change-Id: I01fddeeca503ebc045c2f0e53c5917e6218e9d6e
2013-10-08Don't ignore -env: command line parameters in some casesTor Lillqvist1-1/+10
Happened at least in the experimental iOS app. Change-Id: I725dde2f40ae9e64406e7a1b1dd5dc0da0a9ebd4
2013-10-02-Werror,-Wunused-const-variableStephan Bergmann1-9/+0
Change-Id: I5740a22f0d768b9b1d7449f54b859bcb40401367
2013-10-02-Werror,-Wunused-functionStephan Bergmann1-15/+0
Change-Id: I1b966095f764a197c4c5e823fa41b9914cb34ebe
2013-10-02-Werror,-Wunused-const-variableStephan Bergmann1-18/+0
Change-Id: I000ed6edb236dbb8e93ad2fb445dfec7294ea3fc
2013-10-02-Werror,-Wunused-const-variableStephan Bergmann1-2/+0
Change-Id: I6c359f8ce52218413671fcdc06021b283b25cf6a
2013-10-02-Werror,-Wunused-functionStephan Bergmann1-8/+0
Change-Id: I4e3097f58a8b91a61369d3b93931bff44444990a
2013-10-01sal: require sun4u or newer hardware / SPARCv8plus / SPARCv9 CPUMichael Stahl2-284/+12
Drop implementation of osl_incrementInterlockedCount / osl_decrementInterlockedCount for antique 32-bit SPARC without cas instruction (sun4, sun4c, sun4d, sun4m). Apparently only NetBSD and OpenBSD even support such ancient hardware at all, the Debian SPARC port already requires sun4u hardware. Change-Id: Ic254622ae80ad65c9f545013b68d82665474402c
2013-09-30API CHANGE: Remove osl_getEthernetAddress and osl/util.h .Arnaud Versini7-375/+149
Also move osl/util.c on Unix systems to osl/system.c. Change-Id: Ifff79d9f4f89ecbb4e0e1652b40ab46b7d569adf Reviewed-on: https://gerrit.libreoffice.org/6065 Tested-by: Arnaud Versini <arnaud.versini@libreoffice.org> Reviewed-by: Arnaud Versini <arnaud.versini@libreoffice.org>
2013-09-30Clean up rtl/character.hxxStephan Bergmann1-32/+19
It is probably best to base the functions on Unicode code points instead of scalar values, now that they are also used from sal/rtl/strtmpl.cxx with UTF-16 code units and with arbitrary bytes (with values assumed to be a superset of ASCII, though). Rename compareAsciiIgnoreCase to compareIgnoreAsciiCase. Also, the corresponding tools::INetMIME functions can be removed completely; no need to keep them around as deprecated. Change-Id: I8d322177f4909e70a946e8186e3e0f7fa6d9a43e
2013-09-30Introduce ASCII case conversion and use more/rtl/character.hxx.Arnaud Versini1-50/+19
Also remove all others implementations. Change-Id: I1dc108a9103f087bd8ce591dff2ac5dd254746f8 Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2013-09-28General cleanup in sal module for all and unix.Arnaud Versini18-519/+10
Remove useless comments and header, and de duplicate a small declaration. Change-Id: I0d4475cbbd61ea964f8e586cf0e1f68eb91c4948 Reviewed-on: https://gerrit.libreoffice.org/6016 Reviewed-by: Arnaud Versini <arnaud.versini@libreoffice.org> Tested-by: Arnaud Versini <arnaud.versini@libreoffice.org>
2013-09-26malloc returns void*; must be cast to real ptr typeDavid Tardon1-1/+1
Change-Id: Ic19707b99b1a53005ac319887219fc52b3e60e89
2013-09-26typo fixes in commentsAndras Timar1-1/+1
Change-Id: Iaadec33715f8e0e0c6595c5e684606905274fdab
2013-09-22sal: rename "cppunit/cppunittester" executableMichael Stahl2-23/+5
... and put it in OOO layer since it's used by the smoketest instset. It was in subdirectory for hysteric reasons, to pick up libraries from module local output directories in the dmake build system. Change-Id: I73b66672b17ede52c03071eb2ddee1a23c059ea9
2013-09-22gbuild: remove libraries from OUTDIR and WORKDIRMichael Stahl1-0/+4
Refactor everything to find and link libraries directly in INSTDIR. - add gb_LinkTarget_get_linksearchpath_for_layer, and use it to set up -L paths for T_LDFLAGS in such a way that only allowed libraries can be linked against; i.e. it's not possible to link URE linktargets against OOO or not-installed libraries - gb_Library_get_target is now same as the gb_LinkTarget_get_target (TODO: this needs cleanup) - since a pattern rule won't work for linking libraries in INSTDIR, add a separate per-file rule for every INSTDIR lib - pattern rule can't find link target in the clean target any more so add a LINKTARGET variable - disable gb_Library_add_auxtarget, no auxtargets need to be copied - tweak the call to gb_Library_Library_platform to pass in a path in sdk/lib for the versioned URE libs - fix the Library clean target - add LAYER parameter to gb_LinkTarget_LinkTarget - adjust platform link commands - MSVC link command now uses explicit -manifestfile and -pdb parameters to keep misc. files out of INSTDIR - remove gb_Helper_OUTDIR_FOR_BUILDLIBDIR - adjust Extension, CppunitTest, JunitTest, PythonTest, Gallery, various CustomTargets to search INSTDIR - remove SDK library symlinks and import libs from odk/Package_lib - on Mac OS X, put .dylib symlinks into sdk/lib even though those are not packaged and would be created by the SDK configury; we need these to be somewhere for linking anyway - add a (unfortunately cyclic) dependency on Package ure_install to sal Change-Id: I70d88742f8c8232ad7b9521416275c67b64fe6cf
2013-09-22gbuild: make the versioned library the linktarget on UnixesMichael Stahl1-1/+1
If there is a SOVERSION then the versioned library is a real file and the unversioned one just a symlink; better to have the real file be the target. - add gb_Library_UDK_MAJORVER variable for SOVERSION - remove version parameter of gb_Library_set_soversion_script; instead hardcode the SOVERSION since it must be included in the file name in gb_Library_FILENAMES anyway - store the unversioned symlink in the ILIBTARGET variable - via new gb_Library_get_workdir_target_versionlink function - removed gb_Helper_install call that resulted in both versioned and unversioned libs in instdir Change-Id: I2c6f1698f0e39fdb2c07964d43ed9485cbca0b30
2013-09-17Revert "fix-linkoo.diff: Fix linkoo to work again."Matúš Kukan1-31/+1
This reverts commit 904e5801aea86a79d6256fcbc3cfdba4535ca8a9. We don't use linkoo and SAL_ALLOW_LINKOO_SYMLINKS anymore. Conflicts: sal/osl/unx/file_url.cxx Change-Id: I1a0211295afef79f72356677d9b3bc6c5211d496
2013-09-12WaE: unused variable suToken, aEmpty, aEmpty2.Andrzej J.R. Hunt1-3/+3
Change-Id: I2eaa32e0ec09b239e03d3efa776f5b47c2fb5c6d
2013-09-11CID#707531 silence coverityCaolán McNamara1-0/+4
Change-Id: I7fd4b5684cd5d54860c60fdb00ac2431943eece3
2013-09-11-Werror,-WformatStephan Bergmann1-1/+1
Change-Id: I24a060d1d5592a23f9a991ef3b39f31818ea0d84
2013-09-11fdo#39625 Make existing cppunittests workJelle van der Waa3-15/+36
Change-Id: Ia3a59456fe82926141ccb2921aa47df4183ead86 Reviewed-on: https://gerrit.libreoffice.org/5905 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2013-09-11typo fix: wether -> whetherAndras Timar1-1/+1
Change-Id: Iad4182d7150f851df06a7208a811d482351f736a
2013-09-11-Werror,-WformatStephan Bergmann2-2/+2
Change-Id: Iae7da0146c670d77a4bdc2431a55c901318eef8d
2013-09-11sal: fdo#39625 Make existing cppunittests workJelle van der Waa5-159/+172
Change-Id: I6bd34f0deaf246bc5898532377d996fcefc88cbc Reviewed-on: https://gerrit.libreoffice.org/5906 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2013-09-07Remove confusing casts between synonymsLionel Elie Mamane1-14/+6
oslMutex and oslMutexImpl* are synonyms (via two typedefs). Casting between them makes the reader believe some more nefarious trick is at hand. Change-Id: Ib0e609fd1facca4d47242392ed2f8ff08451346b
2013-09-05update pchThomas Arnhold1-0/+3
Change-Id: I6d5e8d3fd69189935a3338fee19b60022f70a7eb
2013-09-03dezimal -> decimalJesús Corrius1-1/+1
Change-Id: I196026cc7f2f885664e9719557f662a32a7187b8
2013-09-03Don't compile all of the sal library as Objective-C++ on OS X after allTor Lillqvist4-4/+15
I doubt it affects ABI, but let's not take the risk. Instead, just compile the uunxapi.cxx file (which has no public API) as Objective-C++, as that is now the only one where Objective-C API is used. This reverts part of d22c94dbf16d18bce39f060aa21f3083169426ca Change-Id: I240dbb36529c419b81b062f6fe860a9e621c2400
2013-09-02MacOSX 10.6 does not like id as a variable nameNorbert Thiebaud1-6/+6
Change-Id: Id1029f777e4f1d03ce7d3fb85ced38deeefca619
2013-08-30WaE: C4334: '<<' : result of 32-bit shift implicitly converted to 64 bitsTor Lillqvist2-7/+7
1UL is not a portable way to get a size_t -sized one. Change-Id: I8fac16b7e1f1b8bbccb4bd11eacc9449fc3f8c33
2013-08-30WaE: possible loss of dataTor Lillqvist1-2/+2
Change-Id: I2a1d47cc3eca40ddd7e9502ffe71337ab2268858
2013-08-27fdo#67313: Use "lo" suffix for private URE libsStephan Bergmann1-1/+2
...(like is done for most of LO's non-URE libs already) to reduce likelihood of name clashes, esp. on Windows where URE libs are found via PATH. This introduces PRIVATELIBS_URE, and removes now-unused UNOLIBS_URE. Change-Id: Ib95dd45f18de140a54e62d632dbf2239f83c232e
2013-08-26Use strncmp()Tor Lillqvist1-2/+1
Change-Id: I593ce24ce83cd3034d23297adc3de5f6de18f3a9
2013-08-26Be careful not to access a string out of boundsTor Lillqvist1-1/+2
Change-Id: Ibc43ffa0c535e0baf1bb6d8b213320da345a3d65