summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2017-12-23 23:22:16 +1100
committerStephan Bergmann <sbergman@redhat.com>2018-01-01 14:50:25 +0100
commitc092fbdb4e5bd9a91d9dd2ef5955af519a46ba19 (patch)
treeb74a0180e231a876c1ecc900868f1cd1e0965fa2 /sal
parentd48edd1e854e0df012b61f833d83efcd19fbe99b (diff)
sal: (win32) readd comment explaining about buffer size decision
Readd comment explaining why we allocate a large buffer for GetEnvironmentVariableW which was removed in commit f78a2bcce88dd5c12052ae3e55c561cdd48b05fe: re-base on ALv2 code. Includes: 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. Change-Id: I75a222393e202e40d78f10fc97f5eb4aad2df743 Reviewed-on: https://gerrit.libreoffice.org/47018 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/w32/process.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/sal/osl/w32/process.cxx b/sal/osl/w32/process.cxx
index 0636278ab7d6..e17d43a787a5 100644
--- a/sal/osl/w32/process.cxx
+++ b/sal/osl/w32/process.cxx
@@ -440,6 +440,11 @@ void SAL_CALL osl_setCommandArgs (int argc, char ** argv)
osl_releaseMutex (*osl_getGlobalMutex());
}
+/* TODO because of an issue with GetEnvironmentVariableW we have to
+ allocate a buffer large enough to hold the requested environment
+ variable instead of testing for the required size. This wastes
+ some stack space, maybe we should revoke this work around if
+ this is no longer a problem */
#define ENV_BUFFER_SIZE (32*1024-1)
oslProcessError SAL_CALL osl_getEnvironment(rtl_uString *ustrVar, rtl_uString **ustrValue)