Mail Archives: djgpp-workers/2002/01/20/07:11:08
On Sun, 20 Jan 2002, Richard Dawe wrote:
> > This suggests a solution: add a dummy putenv call to the startup
> > code, which will be called unconditionally.
>
> Yes, this works. There's a patch below.
Thanks.
> Do you think this code should be in
> crt1.c instead of this function or is it OK where it is? OK to commit?
See my comments below.
> Eli, would you still like YAMD versions of Charles's test programs?
No, I think you explained the cause; thanks.
> void
> __crt0_load_environment_file(char *app_name)
> {
I think this should go into crt1.c, not c1loadef.c. That's because the
latter could be excluded from a program if the user defines an empty
__crt0_load_environment_file in her program (e.g., to minimize the
footprint).
> + * Use putenv to delete an environment variable with a name that is
> + * unlikely to be used.
> + */
> + putenv(unconst("DJGPP_sillynametohaveforanenvironmentvariable", char *));
Doesn't it work to say just
putenv("");
? That would do the trick without putting extraneous variables into the
environment. Remember: all we need is for putenv to record the value of
`environ'.
- Raw text -