[GRASS5] [bug #3362] (grass) r.proj works ONLY when source and target mapset names are identical

Glynn Clements glynn at gclements.plus.com
Thu Jun 23 13:01:05 EDT 2005


Paul Kelly wrote:

> >>>> I suspect Brad's recent changes to make G_asprintf() use G_tempfile()
> >>>> should be reverted?
> >>
> >> Yes, it's in G_asprintf(). Simply changing G_tempfile() back to
> >> tmpfile() on line 37 in asprintf.c fixes it. There may be other
> >> consequences so I suggest the maintainer makes the reversion himself in cvs.
> >
> > This was my doing.  I was unaware of the implications of G_tempfile().
> > Can someone back out the changes?
> 
> I have changed G_asprintf() back to use tmpfile() instead of G_tempfile() 
> and fopen() and it seems to have fixed the r.proj bug.
> 
> Probably would need to think about systematically changing some other 
> occurences of G_tempfile() as Glynn and Morten suggested.

I agree.

The alternative is to require any program which switches locations
using G__switch_env() to ensure that G_tempfile() doesn't get called
while the location is switched. Given that calls to G_tempfile() could
be hidden deep down in the call graph, that requirement would be
extremely hard to comply with.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list