[GRASS5] -fwritable-strings

Hi Markus

Regarding the use of -fwritable-strings, the gcc man page has the following:

-fwritable-strings
              Store string constants in the writable data segment
              and don't uniquize them. This is for compatibility
              with old programs which assume they can write into
              string constants. `-traditional' also has this ef<AD>
              fect.

              Writing into string constants is a very bad idea;
              "constants" should be constant.

So why do we want to use this feature if it is bad and obsolete?

--
Sincerely,

Jazzman (a.k.a. Justin Hickey) e-mail: jhickey@hpcc.nectec.or.th
High Performance Computing Center
National Electronics and Computer Technology Center (NECTEC)
Bangkok, Thailand

People who think they know everything are very irritating to those
of us who do. ---Anonymous

Jazz and Trek Rule!!!

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

Hi all,

from a SuSe developer I got this recommentation (perhaps he
did not think about).

Well, only ps.map on Linux need the -fwritable-strings.
Maybe Radim has improved it already in his current version?
I am not shure. The old ps.map did not work without
-fwritable-strings.

I will take it out of configure. Maybe it could be selectably
added to ps.map on Linux, if required.

Further suggestions are required...

Thanks

Markus

On Wed, Jul 26, 2000 at 01:08:36PM +0000, Justin Hickey wrote:

Hi Markus

Regarding the use of -fwritable-strings, the gcc man page has the following:

-fwritable-strings
              Store string constants in the writable data segment
              and don't uniquize them. This is for compatibility
              with old programs which assume they can write into
              string constants. `-traditional' also has this ef<AD>
              fect.

              Writing into string constants is a very bad idea;
              "constants" should be constant.

So why do we want to use this feature if it is bad and obsolete?

--
Sincerely,

Jazzman (a.k.a. Justin Hickey) e-mail: jhickey@hpcc.nectec.or.th
High Performance Computing Center
National Electronics and Computer Technology Center (NECTEC)
Bangkok, Thailand

People who think they know everything are very irritating to those
of us who do. ---Anonymous

Jazz and Trek Rule!!!

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

GRASS developers,

please update
cvs update Makefile.in

to avoid a severe "rm" call which might kill your
/usr/local/bin/.

I have got this experience :frowning: and fixed it.

Only the "clean" targets have been affected.
Hope you did not try it yet...

Markus

--
Dipl.-Geogr. Markus Neteler * University of Hannover
Institute of Physical Geography and Landscape Ecology
Schneiderberg 50 * D-30167 Hannover * Germany
Tel: ++49-(0)511-762-4494 Fax: -3984

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

Hello Markus

On Jul 26, 9:53am, Markus Neteler wrote:

from a SuSe developer I got this recommentation (perhaps he
did not think about).

I am not shure. The old ps.map did not work without
-fwritable-strings.

Further suggestions are required...

How about writing a script to be run after is64bit.sh that will check if the
machine is Linux (the ${SYSTEM} variable in Makefile.in maybe) and then add
-fwritable-strings to the compile lines of the Gmakefiles of ps.map? At least
it would be a quick fix until someone can fix the problem in ps.map. Just a
suggestion.

--
Sincerely,

Jazzman (a.k.a. Justin Hickey) e-mail: jhickey@hpcc.nectec.or.th
High Performance Computing Center
National Electronics and Computer Technology Center (NECTEC)
Bangkok, Thailand

People who think they know everything are very irritating to those
of us who do. ---Anonymous

Jazz and Trek Rule!!!

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

On Wed, Jul 26, 2000 at 03:32:18PM +0000, Justin Hickey wrote:

On Jul 26, 9:53am, Markus Neteler wrote:
> I am not shure. The old ps.map did not work without
> -fwritable-strings.
>
> Further suggestions are required...

How about writing a script to be run after is64bit.sh that will check if the
machine is Linux (the ${SYSTEM} variable in Makefile.in maybe) and then add
-fwritable-strings to the compile lines of the Gmakefiles of ps.map? At least
it would be a quick fix until someone can fix the problem in ps.map. Just a
suggestion.

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.

  Bernhard
--
Professional Service around Free Software (intevation.net)
The FreeGIS Project (freegis.org)
Association for a Free Informational Infrastructure (ffii.org)

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;) !

--
Michel Wurtz ENGEES - CEREG
                1, quai Koch - BP 1039, F-67070 STRASBOURG cedex
                Tel: +33 03.88.24.82.45 Fax: +33 03.88.37.04.97

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

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?
:slight_smile:

Markus

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

Hi awk friends,

finally I got it (aem, in between I used a wrong variable
name...). It seems that my system likes the combination of

export VARIABLE
... awk ...
     ... printf ... "'$VARIABLE'" ...

END...

I have checked it into CVS now.

Many thanks for your patience and suggestions.

Markus

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'