As for "if it existed" I believe it's neigh impossible to find a system where it doesn't.
Windows?
/ David Hedbor
Previous text:
2003-10-17 17:42: Subject: Re: putenv/getenv
Actually, i wrote it from scratch based on looking at other functions in sytem.c.
Indeed there is a function f_get_netinfo_property in system.c that has this error. The others look correct.
/.../ I assume then that it is more proper to wait until the latest possible moment before popping items from the stack, right?
Well, rather to a late enough moment. They can be popped only when you stopped referring to them. If the latest possible moment is before that, you have to restructure your code to solve it.
Tip: The macro stack_pop_n_elems_keep_top should always make it possible to postpone it to just before the return.
what would be the best way to handle strings with NUL? Should they be changed or should an error be thrown? My guess is that an error should be thrown as you really wouldn't want them in the environment, right?
Yes, I think so too.
/.../ i was thinking about modifying the predef::putenv() to call the System.putenv() if it existed.
It'd be necessary to limit leaking according to Marcus' suggestion before you can do that, imo.
As for "if it existed" I believe it's neigh impossible to find a system where it doesn't.
/ Martin Stjernholm, Roxen IS