You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by hd...@apache.org on 2014/04/07 09:22:34 UTC
svn commit: r1585415 - in /openoffice/branches/AOO410: ./ main/
main/vcl/aqua/source/app/salinst.cxx
Author: hdu
Date: Mon Apr 7 07:22:34 2014
New Revision: 1585415
URL: http://svn.apache.org/r1585415
Log:
#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.
Modified:
openoffice/branches/AOO410/ (props changed)
openoffice/branches/AOO410/main/ (props changed)
openoffice/branches/AOO410/main/vcl/aqua/source/app/salinst.cxx
Propchange: openoffice/branches/AOO410/
------------------------------------------------------------------------------
Merged /openoffice/trunk:r1583988
Propchange: openoffice/branches/AOO410/main/
------------------------------------------------------------------------------
Merged /openoffice/trunk/main:r1583988
Modified: openoffice/branches/AOO410/main/vcl/aqua/source/app/salinst.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/AOO410/main/vcl/aqua/source/app/salinst.cxx?rev=1585415&r1=1585414&r2=1585415&view=diff
==============================================================================
--- openoffice/branches/AOO410/main/vcl/aqua/source/app/salinst.cxx (original)
+++ openoffice/branches/AOO410/main/vcl/aqua/source/app/salinst.cxx Mon Apr 7 07:22:34 2014
@@ -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 );
}
}
}