[GRASS5] -fwritable-strings
Markus Neteler
neteler at geog.uni-hannover.de
Wed Jul 26 08:01:49 EDT 2000
On Wed, Jul 26, 2000 at 01:00:51PM +0200, Michel Wurtz - ENGEES/CEREG wrote:
> Bernhard Reiter wrote:
> > It has nothing to do with GNU/Linux.
> > Only with old programs doing stuff like:
> >
> > char * x="Heino";
> > x[2]='o';
> >
> > Because the compiler with place &x in protected memory which is not
> > writable usually.
>
> Yes, the correct declaration should be :
>
> char x[]="Heino";
>
> because the variable you can modify is yet the character table, and
> not the pointer to a static chain.
> It should be easy to upgrade, unless you do something like
>
> x = "another chain";
>
> further in the program... In this case, x must be a pointer and the
> first declaration should be used (char *x;) !
.. as the problem seems to be identified:
Is anyone willing to check src/ps.map/ps.map/ for this?
:-)
Markus
----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo at geog.uni-hannover.de with
subject 'unsubscribe grass5'
More information about the grass-dev
mailing list