summaryrefslogtreecommitdiff
path: root/sal/osl/unx/process_impl.cxx
AgeCommit message (Collapse)AuthorFilesLines
2014-07-14Introduce osl_areCommandArgsSet.Andrzej Hunt1-0/+5
We cannot call osl_setCommandArgs twice, however there is currently no way to determine whether or not this has already been done. This is necessary e.g. for LibreOfficeKit where we may also be using UNO separately (and also for unit tests where LO is already set-up prior to the unit test running, and therefore we can't set up osl again from within LOK). Change-Id: Id1f357ef604eb2b6b7814c9a04ac6933a39fd3eb Signed-off-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/10225 Reviewed-by: Matúš Kukan <matus.kukan@collabora.com> Reviewed-by: Zolnai Tamás <zolnaitamas2000@gmail.com> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2014-04-04Clean up unreferenced functionsStephan Bergmann1-16/+2
Change-Id: Id9cb4dbeb6b3313974b881efd6a7c43cb5e314ce
2014-04-03Kill superfluous vertical whitespaceTor Lillqvist1-2/+0
Change-Id: I8c37b9ec45836f9c0e2dc0cf232f96f23c7c36d3
2013-11-14remove unnecessary sal_Unicode casts in various placesNoel Grandin1-1/+1
Change-Id: Ibf04062ca86ed866202d748c3b62a210d30ed6ec
2013-10-10sal: add special handling of argc==0 to osl_setCommandArgs()Michael Stahl1-3/+16
... 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-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-03-19removal of RTL_CONSTASCII_USTRINGPARAM for quoted OUStrings declarationsThomas Arnhold1-1/+1
s/(OUString\s+[a-zA-Z_][A-Za-z0-9_]*\s*)\(\s*RTL_CONSTASCII_USTRINGPARAM\s*\((\s*"[^")]*?"\s*)\)\s*\)/$1\($2\)/gms Change-Id: Iad20f242c80c4bdc69df17e2d7a69d58ea53654b Reviewed-on: https://gerrit.libreoffice.org/2835 Reviewed-by: Thomas Arnhold <thomas@arnhold.org> Tested-by: Thomas Arnhold <thomas@arnhold.org>
2013-02-22Not using NativeActivity means no lo_main() stuff used eitherTor Lillqvist1-20/+4
Hopefully also fixes build for iOS by re-introducing checks for DESKTOP. Also this commit partially reverts 52a8744afee2cd589813f0377d93f821fce7aedd. Change-Id: Ie94c771b72ba138bb0481b054285916618baf6eb
2013-02-21Revert "Clean up remains of NativeActivity-based Android app support"Michael Meeks1-4/+20
This reverts commit cecc926070ee3d2ad6296fc5e0cfcde8642bb140. Conflicts: sal/android/lo-bootstrap.c sal/inc/osl/detail/android-bootstrap.h
2012-11-21Clean up remains of NativeActivity-based Android app supportTor Lillqvist1-20/+4
We haven't been able to build NativeActivity-based apps (like the android/qa/sc and anroid/qa/desktop thingies) since we switched to DISABLE_DYNLOADING and a single DSO liblo-native-code.so anyway. No lo_main() any more. <sal/main.h> should not be included ever when compiling for Android of iOS now. Lots of stuff binned from vcl's androidinst.cxx, in the (vain?) hope that it will reduce the amount of never invoked GUI code that gets linked in. Change-Id: I25f584864c40110774c728a23151e089620442d9
2012-11-21re-base on ALv2 code. Includes:Michael Meeks1-23/+14
Patch contributed by Herbert Duerr: #i118662# remove berkeleyDB from module xmlhelp (author=orwitt) http://svn.apache.org/viewvc?view=revision&revision=1213188 #i119141# remove ISCII converter for now http://svn.apache.org/viewvc?view=revision&revision=1306246 make exceptions for cppunittester verbose http://svn.apache.org/viewvc?view=revision&revision=1174831 Patches contributed by Pedro Giffuni: Avoid some uses of non portable #!/bin/bash in shell scripts. http://svn.apache.org/viewvc?view=revision&revision=1235297 Patch contributed by Oliver-Rainer Wittmann 88652: applied patch, remove unicows deps http://svn.apache.org/viewvc?view=revision&revision=1177585 drop OS/2 code, remove in-line assembler ARM atomics, and obsolete armarch header.
2012-09-14Adapt for DISABLE_DYNLOADING possibility on AndroidTor Lillqvist1-1/+1
Change-Id: I7fcea698c3d89c5b84b38a708502bcdf4526a614
2012-06-29Remove some more include guardsThomas Arnhold1-16/+1
Change-Id: I7c62d086cb593744785abecae7a107686a4d65ce
2012-03-22No point searching PATH on Android and iOSTor Lillqvist1-1/+2
2012-03-21More hacking on static linking (iOS) supportTor Lillqvist1-12/+2
2012-03-13Use _NSGetExecutablePath also on iOSTor Lillqvist1-5/+1
2012-02-15Merge branch 'feature/android'Tor Lillqvist1-1/+1
2012-02-13EasyHack: Removed gcc conditionalsAlexander Bergmann1-1/+1
2012-01-26android: move lo-bootstrap to osl/detail, Attach threads as createdMichael Meeks1-1/+1
2011-11-30Android code refactorig and hackingTor Lillqvist1-4/+22
Sorry for the large unstructured commit. But hey, the Android code is experimental so far. Extract the native lo-bootstrap code into a fairly normal library built in sal. (Previously it was the JNI part of the "Bootstrap" app.) Just linkink normally to liblo-bootstrap from C++ code that uses it works fine, no need to do a dlsym lookup. Bootstrap is still a subclass of NativeActivity and can thus still be used as an "app" (to start unit tests, or whatever), but can also be used from some other app's Java code to just get access to the lo-bootstrap native methods. Introduce a new top-level "module", android, for Bootstrap and the experiments with DocumentLoader. Note that the experimental DocumentLoader app still crashes. It can't create the com.sun.star.frame.Desktop instance. I spent lots of time debugging in the painfully inadequate ndk-gdb. (Even the newer gdb build from the "mingw-and-ndk" project is quite crappy in many ways.) I should really experiment with corresponding code on a normal platform first before even trying on Android. Basically, I think that if I just can get the concept of Java code that instantiates and uses LO components *in-process* working on a normal desktop platform, it should work on Android, too.
2011-11-27remove include of pch header from salNorbert Thiebaud1-2/+0
2011-11-17Look for lo_main() and not main() on AndroidTor Lillqvist1-0/+8
2011-10-20osl_getCommandArgCount can be called w/o prior osl_setCommandArgs.Stephan Bergmann1-1/+5
...e.g., with "import uno" in a stand-alone pyhton process (where it is hopefully harmless that UNO does not get access to any -env command line args).
2011-09-16Fallback to osl_getExecutableFile when dlsym("main") failsCaolán McNamara1-0/+4
e.g. testtool under Linux
2011-03-23Merge commit 'ooo/DEV300_m103'Jan Holesovsky1-8/+11
Conflicts: codemaker/source/bonobowrappermaker/corbaoptions.cxx codemaker/source/cppumaker/cppuoptions.cxx codemaker/source/cunomaker/cunooptions.cxx codemaker/source/idlmaker/idloptions.cxx codemaker/source/javamaker/javaoptions.cxx cppu/source/typelib/typelib.cxx idlc/source/options.cxx offapi/com/sun/star/util/PathSubstitution.idl offapi/drafts/com/sun/star/form/ListEntryEvent.idl offapi/drafts/com/sun/star/form/XBindableValue.idl offapi/drafts/com/sun/star/form/XListEntryListener.idl offapi/drafts/com/sun/star/form/XListEntrySink.idl offapi/drafts/com/sun/star/form/XListEntrySource.idl offapi/drafts/com/sun/star/form/XValueBinding.idl registry/tools/checksingleton.cxx registry/tools/options.hxx registry/tools/regcompare.cxx registry/tools/regmerge.cxx sal/cppunittester/cppunittester.cxx sal/osl/unx/socket.c sal/osl/w32/diagnose.c sal/prj/d.lst sal/rtl/source/alloc_fini.cxx sal/rtl/source/alloc_global.c sal/rtl/source/makefile.mk
2011-03-08Merge commit 'ooo/DEV300_m101' into integration/dev300_m101Norbert Thiebaud1-2/+2
* commit 'ooo/DEV300_m101': (185 commits) chart52: cleanup unused legend entry stuff in preparation of issue #i82802# masterfix: #i10000# add missing dependency in offapi sb138: #i115619# fix for MinGW sb138: #i115619#, #i116038# use osl_setThreadName in binaryurp sb138: #i115619# osl_setThreadName gridsort: i116682: update UnoControlDialog to reflect XDialog gridsort: minor changes to the new API: - renamed XMutableGridDataModel::setRowHeading to updateRowHeading for consistency reasons - renamed XSortableGridDataModel to XSortableGridData - actually, this is not a full-fledged model in itself. gridsort: grid control related unit tests (first set, more to come) sb138: #i116038# fresh implementation of binary URP bridge chart52: #28670# make the legend within charts resizeable - part 2 gridsort: re-did the column resizing - introduced XGridColumn.Flexibility, determining to which degree the column is resized during auto-column-resizing - removed XGridColumn.PreferredWidth - there really is no need for this anymore now - documented the relationship between XGridColumn.Flexibility and XGridColumn.Resizeable - re-implemented TableControl_Impl::impl_ni_updateColumnWidths, with (hopefully) less magic sb139: #i116530# improve Java URP bridge error notification by utilizing the java.lang.Throwable cause facility gridsort: document the relationship between soorting the data and notifying XGridDataListeners gridsort: introduce XGridColumn::DataModelIndex. this allows for column removal/insertion at the GridColumnModel, without the need to touch the GridDataModel locales34: #i112431# adapt documentation to reality gridsort: introduce XSortableGridDataModel::removeColumnSort gridsort: #163172# added UNO API support for sorting grid data. Implementation still unfinished. Things missing in the SortableGridData implementation - add as listener to the delegator, so we're notified of changes - translate and multiplex those changes - do own notifications (XGridDataListener.dataChanged) when the sort order changed - (possibly) update the sort order when the data in the current sort-column changed gridsort: made the row title a row heading, being an Any instead of a string gridsort: XMutableGridData: renamed updateRow to updateRowData for consistency; introduced updateRowToolTip as shortcut for multiple updateCellToolTip calls gridsort: updateCell->updateCellData, setCellToolTip->updateCellToolTip; in both methods, have (Col,Row) params instead of (Row,Col), for consistency reasons ... Conflicts: bridges/inc/bridges/remote/bridgeimpl.hxx bridges/inc/bridges/remote/connection.h bridges/inc/bridges/remote/context.h bridges/inc/bridges/remote/helper.hxx bridges/inc/bridges/remote/mapping.hxx bridges/inc/bridges/remote/proxy.hxx bridges/inc/bridges/remote/remote.h bridges/inc/bridges/remote/remote.hxx bridges/inc/bridges/remote/stub.hxx bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx bridges/source/remote/context/context.cxx bridges/source/remote/static/helper.cxx bridges/source/remote/static/mapping.cxx bridges/source/remote/static/proxy.cxx bridges/source/remote/static/remote.cxx bridges/source/remote/static/remote_types.cxx bridges/source/remote/static/remote_types.hxx bridges/source/remote/static/stub.cxx bridges/source/remote/urp/urp_bridgeimpl.cxx bridges/source/remote/urp/urp_bridgeimpl.hxx bridges/source/remote/urp/urp_cache.h bridges/source/remote/urp/urp_cache.hxx bridges/source/remote/urp/urp_dispatch.cxx bridges/source/remote/urp/urp_dispatch.hxx bridges/source/remote/urp/urp_environment.cxx bridges/source/remote/urp/urp_job.cxx bridges/source/remote/urp/urp_job.hxx bridges/source/remote/urp/urp_log.cxx bridges/source/remote/urp/urp_log.hxx bridges/source/remote/urp/urp_marshal.cxx bridges/source/remote/urp/urp_marshal.hxx bridges/source/remote/urp/urp_marshal_decl.hxx bridges/source/remote/urp/urp_property.hxx bridges/source/remote/urp/urp_propertyobject.cxx bridges/source/remote/urp/urp_propertyobject.hxx bridges/source/remote/urp/urp_reader.cxx bridges/source/remote/urp/urp_reader.hxx bridges/source/remote/urp/urp_replycontainer.hxx bridges/source/remote/urp/urp_threadid.cxx bridges/source/remote/urp/urp_threadid.hxx bridges/source/remote/urp/urp_unmarshal.cxx bridges/source/remote/urp/urp_unmarshal.hxx bridges/source/remote/urp/urp_writer.cxx bridges/source/remote/urp/urp_writer.hxx cppu/source/threadpool/threadpool.cxx cppu/util/target.pmk cppuhelper/qa/propertysetmixin/comp_propertysetmixin.cxx cppuhelper/source/interfacecontainer.cxx cpputools/source/regcomplazy/regcomplazy.cxx jurt/prj/d.lst jvmfwk/source/elements.cxx offapi/com/sun/star/awt/grid/GridDataEvent.idl offapi/com/sun/star/awt/grid/XGridColumn.idl offapi/com/sun/star/awt/tab/makefile.mk offapi/com/sun/star/chart2/ExplicitIncrementData.idl offapi/com/sun/star/chart2/XPlotter.idl offapi/com/sun/star/chart2/XUndoHelper.idl offapi/com/sun/star/document/MediaDescriptor.idl offapi/com/sun/star/document/makefile.mk offapi/com/sun/star/linguistic2/XLanguageGuessing.idl offapi/com/sun/star/script/ModuleInfo.idl offapi/com/sun/star/script/ModuleType.idl offapi/com/sun/star/text/TextMarkupType.idl offapi/com/sun/star/util/XTextSearch.idl offapi/com/sun/star/xml/sax/XFastAttributeList.idl pyuno/source/loader/makefile.mk remotebridges/source/bridge/bridge_connection.cxx remotebridges/source/bridge/bridge_connection.hxx remotebridges/source/bridge/bridge_provider.cxx remotebridges/source/bridge/remote_bridge.cxx remotebridges/source/bridge/remote_bridge.hxx remotebridges/source/dynamicloader/dynamicloader.cxx remotebridges/source/factory/bridgefactory.cxx remotebridges/source/factory/bridgeimpl.cxx remotebridges/source/factory/bridgeimpl.hxx remotebridges/source/factory/makefile.mk sal/cppunittester/cppunittester.cxx sal/inc/osl/diagnose.h sal/osl/os2/system.h sal/osl/unx/diagnose.c sal/osl/unx/file_misc.cxx sal/osl/unx/process_impl.cxx sal/osl/w32/diagnose.c sal/osl/w32/process.cxx sal/prj/build.lst sal/qa/rtl/math/makefile.mk sal/qa/rtl/math/rtl_math.cxx sal/qa/rtl/math/rtl_old_testint64.cxx sal/qa/rtl/math/test_rtl_math.cxx sal/systools/win32/kill/kill.cxx sal/textenc/tencinfo.c sal/util/sal.map stoc/source/inspect/introspection.cxx stoc/source/security/file_policy.cxx stoc/source/simpleregistry/simpleregistry.cxx
2011-01-27Update from master repository (DEV300_m98).Matthias Huetsch [mhu]1-1/+106
2010-11-25#i115784# sal: fix memory errors uncovered by valgrind and other tools.Matthias Huetsch [mhu]1-8/+11
2010-10-19FreeBSD's unsetenv also returns an int.Thomas Klausner1-1/+1
2010-10-18NetBsd's unsetenv has a return valueCaolán McNamara1-1/+1
2010-10-18#i112656# add osl_setEnvironment and osl_clearEnvironmentCaolán McNamara1-1/+106
2010-10-14Add vim/emacs modelines to all source filesSebastian Spaeth1-0/+3
Fixes #fdo30794 Based on bin/add-modelines script (originally posted in mail 1286706307.1871.1399280959@webmail.messagingengine.com) Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2010-10-05remove include guards using fixguard.pyPetr Mladek1-4/+0
2010-07-08#i112656# osl_setEnvironment/osl_clearEnvironment, ↵Caol?n McNamara1-4/+8
rtl_stringbuffer_newFromStringBuffer needs inited argument
2010-07-06cmcfixes76: #i112656# osl_clearEnvironment, MacOSX 10.4 has old-school void ↵Caol?n McNamara1-0/+6
ret unsetenv
2010-06-24cmcfixes76: #i112656# osl_setEnvironment/osl_clearEnvironmentCaol?n McNamara1-1/+96
2010-02-25sb118: merged in DEV300_m72sb1-4/+1
2010-02-12changefileheader2: #i109125#: change source file copyright notice from Sun ↵Jens-Heiner Rechtien1-4/+1
Microsystems to Oracle; remove CVS style keywords (RCSfile, Revision)
2010-01-27sb118: changed tools/debug to never fall back from writing to shell to ↵sb1-0/+4
writing to file, and read DBGSV_INIT from rtl::Bootstrap; the latter causes problems if tools/debug is called from static code executing before SAL_MAIN has called osl_setCommandArgs -> removed statics from code and added assertions to osl/process; various improvements to smoketests.cxx (incl. passing an appropriate dbgsv.ini for non-pro builds)
2008-04-10INTEGRATION: CWS changefileheader (1.11.234); FILE MERGEDRüdiger Timm1-38/+18
2008/04/01 12:34:09 thb 1.11.234.2: #i85898# Stripping all external header guards 2008/03/31 13:23:44 rt 1.11.234.1: #i87441# Change license header to LPGL v3.
2006-09-17INTEGRATION: CWS pchfix02 (1.10.116); FILE MERGEDOliver Bolte1-2/+5
2006/09/01 17:34:01 kaib 1.10.116.1: #i68856# Added header markers and pch files
2005-10-17INTEGRATION: CWS macosxgcc4 (1.8.64); FILE MERGEDRüdiger Timm1-2/+6
2005/09/20 03:34:38 fheckl 1.8.64.2: RESYNC: (1.8-1.9); FILE MERGED 2005/09/19 19:39:21 fheckl 1.8.64.1: Adding some casts necessary for compilation to succeed with gcc4 on MacOSX (i49046)
2005-09-08INTEGRATION: CWS ooo19126 (1.8.86); FILE MERGEDRüdiger Timm1-47/+21
2005/09/05 17:44:27 rt 1.8.86.1: #i54170# Change license header: remove SISSL
2004-12-23INTEGRATION: CWS mhu05 (1.7.16); FILE MERGEDVladimir Glazounov1-6/+99
2004/11/27 14:58:11 mhu 1.7.16.3: #i37371# Added documentation reference to issue. 2004/11/25 18:28:31 mhu 1.7.16.2: #i37371# Added function 'osl_bootstrap_getExecutableFile_Impl()' for internal use by rtl_bootstrap functions. 2004/11/21 16:22:47 mhu 1.7.16.1: #i37260# Removed temp. 'CommandArgs not set' assertion.
2004-10-28INTEGRATION: CWS valgrind02 (1.6.32); FILE MERGEDRüdiger Timm1-130/+247
2004/10/11 17:13:37 mhu 1.6.32.2: #i35209# Adapted executable file path resolution to also handle the PATH search case. 2004/10/08 15:53:24 mhu 1.6.32.1: #i35209# Added function 'osl_setCommandArgs()', adapted 'osl_getExecutableFile()' and 'osl_getCommandArg[Count]()', cleaned up previous 'getCmdLine()' mess, removed unused / obsolete code.
2004-06-25INTEGRATION: CWS tune04 (1.4.54); FILE MERGEDHans-Joachim Lankenau1-3/+3
2004/06/10 12:20:17 cmc 1.4.54.1: #i29636# persistant UNICHAR_SLASH OUString obj can be a simple sal_Unicode
2004-06-17INTEGRATION: CWS ooo64bit01 (1.4.22); FILE MERGEDRüdiger Timm1-4/+4
2004/03/16 23:54:12 fa 1.4.22.1: Merge cws_srx644_port64bit, other misc fixes
2004-02-03INTEGRATION: CWS sal05 (1.3.36); FILE MERGEDJens-Heiner Rechtien1-5/+12
2003/11/03 13:41:21 tra 1.3.36.1: #112918#removed most warnings generated when compiling with -wall