process.cxx (cdf0e10c) process.cxx (528d5388)
1/*************************************************************************
2*
3* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*
5* Copyright 2000, 2010 Oracle and/or its affiliates.
6*
7* OpenOffice.org - a multi-platform office productivity suite
8*

--- 378 unchanged lines hidden (view full) ---

387 }
388 }
389 osl_releaseMutex (*osl_getGlobalMutex());
390}
391
392/***************************************************************************
393 * Environment
394 ***************************************************************************/
1/*************************************************************************
2*
3* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*
5* Copyright 2000, 2010 Oracle and/or its affiliates.
6*
7* OpenOffice.org - a multi-platform office productivity suite
8*

--- 378 unchanged lines hidden (view full) ---

387 }
388 }
389 osl_releaseMutex (*osl_getGlobalMutex());
390}
391
392/***************************************************************************
393 * Environment
394 ***************************************************************************/
395/*
396 #109941# because of a bug in the M$ unicows library we have to
397 allocate a buffer large enough to hold the requested environment
398 variable instead of testing for the required size. This wastes
399 some stack space, maybe we should revoke this work around if
400 unicows library is fixed.
401*/
402#define ENV_BUFFER_SIZE (32*1024-1)
403
404oslProcessError SAL_CALL osl_getEnvironment(rtl_uString *ustrVar, rtl_uString **ustrValue)
405{
406 WCHAR buff[ENV_BUFFER_SIZE];
407
408 if (GetEnvironmentVariableW(reinterpret_cast<LPCWSTR>(ustrVar->buffer), buff, ENV_BUFFER_SIZE) > 0)
409 {

--- 230 unchanged lines hidden ---
395#define ENV_BUFFER_SIZE (32*1024-1)
396
397oslProcessError SAL_CALL osl_getEnvironment(rtl_uString *ustrVar, rtl_uString **ustrValue)
398{
399 WCHAR buff[ENV_BUFFER_SIZE];
400
401 if (GetEnvironmentVariableW(reinterpret_cast<LPCWSTR>(ustrVar->buffer), buff, ENV_BUFFER_SIZE) > 0)
402 {

--- 230 unchanged lines hidden ---