20#include <config_folders.h> 
   27#include <sys/resource.h> 
   30#include <osl/process.h> 
   31#include <rtl/bootstrap.hxx> 
   32#include <rtl/ustrbuf.hxx> 
   33#include <rtl/ustring.hxx> 
   41#if defined UNX && !defined EMSCRIPTEN 
   44    if (getrlimit(RLIMIT_NOFILE, &lim) == 0)
 
   46        lim.rlim_cur = lim.rlim_max;
 
   47        setrlimit(RLIMIT_NOFILE, &lim);
 
   52    OUStringBuffer 
env(512);
 
   53    OUString envVar(
"URE_BOOTSTRAP");
 
   55    if (rtl::Bootstrap::get(envVar, uri))
 
   57        if (!uri.matchIgnoreAsciiCase(
"vnd.sun.star.pathname:"))
 
   59            uri = rtl::Bootstrap::encode(uri);
 
   65        if (osl_getExecutableFile(&uri.pData) != osl_Process_E_None)
 
   69        sal_Int32 lastDirSeparatorPos = uri.lastIndexOf(
'/');
 
   70        if (lastDirSeparatorPos >= 0)
 
   72            uri = uri.copy(0, lastDirSeparatorPos + 1);
 
   74        env.append(rtl::Bootstrap::encode(uri));
 
   76        env.append(
"../" LIBO_SHARE_FOLDER 
"/");
 
   80    OUString envValue(
env.makeStringAndClear());
 
   81    if (osl_setEnvironment(envVar.pData, envValue.pData) != osl_Process_E_None)
 
#define SAL_CONFIGFILE(name)
 
const css::uno::Reference< css::xml::crypto::XSecurityEnvironment > & env