[Libreoffice-commits] core.git: Branch 'aoo/trunk' - vcl/aqua
Herbert Dürr
hdu at apache.org
Wed Apr 2 07:08:10 PDT 2014
vcl/aqua/source/app/salinst.cxx | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
New commits:
commit 7a16301474acc0433c431248aaca7f0589dbe6ec
Author: Herbert Dürr <hdu at apache.org>
Date: Wed Apr 2 12:09:54 2014 +0000
#i124509# use setenv() instead of putenv() on OSX
putenv() has changed its semantic to no longer copy input buffers which
results in problems if the input buffers were only temporary. Using
setenv(), which still copies the input buffers solves the problem.
diff --git a/vcl/aqua/source/app/salinst.cxx b/vcl/aqua/source/app/salinst.cxx
index 5bf7944c..819b162 100644
--- a/vcl/aqua/source/app/salinst.cxx
+++ b/vcl/aqua/source/app/salinst.cxx
@@ -303,32 +303,29 @@ void InitSalMain()
// Assign to PATH environment variable
if ( aCmdPath.Len() )
{
- aTmpPath = ByteString( "PATH=" );
- aTmpPath += aCmdPath;
+ aTmpPath = aCmdPath;
if ( aPath.Len() )
aTmpPath += ByteString( DirEntry::GetSearchDelimiter(), RTL_TEXTENCODING_ASCII_US );
aTmpPath += aPath;
- putenv( (char*)aTmpPath.GetBuffer() );
+ setenv( "PATH", aTmpPath.GetBuffer(), TRUE );
}
// Assign to STAR_RESOURCEPATH environment variable
if ( aCmdPath.Len() )
{
- aTmpPath = ByteString( "STAR_RESOURCEPATH=" );
- aTmpPath += aCmdPath;
+ aTmpPath = aCmdPath;
if ( aResPath.Len() )
aTmpPath += ByteString( DirEntry::GetSearchDelimiter(), RTL_TEXTENCODING_ASCII_US );
aTmpPath += aResPath;
- putenv( (char*)aTmpPath.GetBuffer() );
+ setenv( "STAR_RESOURCEPATH", aTmpPath.GetBuffer(), TRUE );
}
// Assign to DYLD_LIBRARY_PATH environment variable
if ( aCmdPath.Len() )
{
- aTmpPath = ByteString( "DYLD_LIBRARY_PATH=" );
- aTmpPath += aCmdPath;
+ aTmpPath = aCmdPath;
if ( aLibPath.Len() )
aTmpPath += ByteString( DirEntry::GetSearchDelimiter(), RTL_TEXTENCODING_ASCII_US );
aTmpPath += aLibPath;
- putenv( (char*)aTmpPath.GetBuffer() );
+ setenv( "DYLD_LIBRARY_PATH", aTmpPath.GetBuffer(), TRUE );
}
}
}
More information about the Libreoffice-commits
mailing list