Re: getting env. variables in gfortran...
- From: kargl@xxxxxxxxxxxxxxxxxxxxxxxxxxxx (Steven G. Kargl)
- Date: Fri, 14 Apr 2006 15:57:01 +0000 (UTC)
In article <Pine.LNX.4.64.0604140812380.20173@xxxxxxxxxxxxxxxxxxxxxxxxx>,
"George N. White III" <aa056@xxxxxxxxxxxxxx> writes:
Gfortran almost certainly implements "getenv" functionality in some
idiosyncratic, undocumented, and potentially unsafe (in the sense of not
checking that the buffer is long enough to hold "$PATH") way.
Undocumented? Surely, you're joking. The SOURCE CODE is available
for your perusal.
http://gcc.gnu.org/viewcvs/trunk/libgfortran/intrinsics/env.c?view=log
Unsafe? Well, check the SOURCE CODE.
Very few compilers (with the exceptions of f2c, g77, gfortran, openwatcom,
and g95) provide the SOURCE CODE for their runtime libraries.
The gfortran manual is missing the documentation of the
API for getenv, which I've already stated is available in
the g77 manual.
Ron Shepard also implemented some of the pxf functions. I've used his
library wqith g77 on OS/2, Win16, and NeXtStep, assorted unixes, and
linux. Now I'm using it with g95 on linux.
Without knocking Ron, have you checked the safety of his source code.
Where can one find his code?
--
Steve
http://troutmask.apl.washington.edu/~kargl/
.
- Follow-Ups:
- Re: getting env. variables in gfortran...
- From: Ron Shepard
- Re: getting env. variables in gfortran...
- References:
- getting env. variables in gfortran...
- From: icksa1
- Re: getting env. variables in gfortran...
- From: George N. White III
- getting env. variables in gfortran...
- Prev by Date: Re: Suggestion for a faster code
- Next by Date: Re: getting env. variables in gfortran...
- Previous by thread: Re: getting env. variables in gfortran...
- Next by thread: Re: getting env. variables in gfortran...
- Index(es):
Relevant Pages
|