diff options
-rw-r--r-- | include/osl/process.h | 5 | ||||
-rw-r--r-- | sal/osl/unx/process_impl.cxx | 5 | ||||
-rw-r--r-- | sal/osl/w32/process.cxx | 6 | ||||
-rw-r--r-- | sal/util/sal.map | 1 |
4 files changed, 17 insertions, 0 deletions
diff --git a/include/osl/process.h b/include/osl/process.h index 7d0960ee3f7f..7fb619f4ccab 100644 --- a/include/osl/process.h +++ b/include/osl/process.h @@ -366,6 +366,11 @@ SAL_DLLPUBLIC sal_uInt32 SAL_CALL osl_getCommandArgCount(void); SAL_DLLPUBLIC oslProcessError SAL_CALL osl_getCommandArg( sal_uInt32 nArg, rtl_uString **strCommandArg); +/** Determine whether or not the command args have already been set. + @return The command args are already set, and may not be set again. +*/ +SAL_DLLPUBLIC int SAL_CALL osl_areCommandArgsSet (void); + /** Set the command-line arguments as passed to the main-function of this process. Deprecated: This function is only for internal use. Passing the args from main will diff --git a/sal/osl/unx/process_impl.cxx b/sal/osl/unx/process_impl.cxx index d28f46d44138..b63f222ec15f 100644 --- a/sal/osl/unx/process_impl.cxx +++ b/sal/osl/unx/process_impl.cxx @@ -191,6 +191,11 @@ oslProcessError SAL_CALL osl_getCommandArg (sal_uInt32 nArg, rtl_uString ** strC return (result); } +int SAL_CALL osl_areCommandArgsSet (void) +{ + return (g_command_args.m_nCount > 0); +} + /*************************************** osl_setCommandArgs(). **************************************/ diff --git a/sal/osl/w32/process.cxx b/sal/osl/w32/process.cxx index 3dd0e77d57fc..25f4e58be7e4 100644 --- a/sal/osl/w32/process.cxx +++ b/sal/osl/w32/process.cxx @@ -374,6 +374,12 @@ oslProcessError SAL_CALL osl_getCommandArg( sal_uInt32 nArg, rtl_uString **strCo /***************************************************************************/ +int SAL_CALL osl_areCommandArgsSet(void) +{ + return (g_command_args.m_nCount > 0); +} + + void SAL_CALL osl_setCommandArgs (int argc, char ** argv) { osl_acquireMutex (*osl_getGlobalMutex()); diff --git a/sal/util/sal.map b/sal/util/sal.map index 1d7d491d295a..6acd9c44470e 100644 --- a/sal/util/sal.map +++ b/sal/util/sal.map @@ -675,6 +675,7 @@ LIBO_UDK_4.3 { # symbols available in >= LibO 4.3 osl_createDirectoryWithFlags; rtl_allocateAlignedMemory; rtl_freeAlignedMemory; + osl_areCommandArgsSet; } LIBO_UDK_4.2; PRIVATE_1.0 { |