[m-rev.] diff: implement io__set_environment_variable in C#

Peter Ross pro at missioncriticalit.com
Fri Nov 14 23:54:06 AEDT 2003


On Fri, Nov 14, 2003 at 11:21:59PM +1100, Fergus Henderson wrote:
> Hi Pete,
> 
> I see you've been making great progress on the C# conversion --
> thanks!
> 
> On 14-Nov-2003, Peter Ross <pro at missioncriticalit.com> wrote:
> > Implement io__set_environment_variable in C#.
> > 
> > library/io.m:
> > 	Call mercury.runtime.PInovke._putenv to set the environment
> > 	variable.
> > 
> > runtime/mercury_dotnet.cs.in:
> > 	Use pinvoke to call the Posix function _putenv.
> 
> _putenv() is not a Posix function.  The Posix function is named putenv().
> The name _putenv() is, AFAIK, unique to Windows.
> 
> > 	This is defined in the runtime, rather than io.m because at a
> > 	later date we will need to use configure to select the correct
> > 	putenv for different platforms.
> 
> For .NET, it would be nicer to use run-time configuration, so that the
> same binaries will work on different target platforms.
> 
For the moment, I will leave it how it is, but when I start porting to
Mono then I will implement it your way.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list