[PATCH] Make lconv structure conform to standards

Hasso Tepper hasso at estpak.ee
Tue Sep 18 04:53:07 PDT 2007


Joerg Sonnenberger wrote wrote:
> On Mon, Sep 17, 2007 at 04:36:37PM +0300, Hasso Tepper wrote:
> > Unconstify members of the lconv structure to make it conform to the C89
> > and C99 standards. At the moment the code snippets like this will compile
> > without warning on every platform I looked at except DragonFly:
> > 
> > 	char *foo = lconv->thousands_sep;
> 
> Yes and this code is wrong because it can though read-only memory. I
> never saw a technical reason why this fields are not read-only in ISO C
> and that is bogus.

I probably agree, but these points should be used in discussions in the ISO
standards comittee or smth, not in writing libc.


-- 
Hasso





More information about the Submit mailing list