This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: getenv implementation?
On Sun, Aug 29, 2004 at 06:41:46PM -0700, Steve Kargl wrote:
> See attach patch. It trims trailing spaces from NAME
> and then uses that with getenv. Bootstrapped and tested.
Ah, yes. I totally forgot about that. If you look at the testcase
getenv_1.f90 which I submitted at the same time I submitted env.c, you
see that the name variable is of type
character(len=*), parameter
so it automagically has the correct length. :(
> 2004-08-29 Steven G. Kargl <kargls@comcast.net>
>
> * intrinsics/env.c (prefix(getenv)): Trim spaces.
get_environment_variable (the F2003 intrinsic corresponding to getenv)
should suffer the same problem, and ought to be fixed too. I'm
somewhat busy with my master's thesis at the moment and I can't
contribute to gfortran as much as I had hoped, but I'll try to fix
this in a week or so. Unless someone else volunteers, of course. ;-)
--
Janne Blomqvist