This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: nl_langinfo (_NL_PAPER_HEIGHT) problem


On Tue, Apr 24, 2001 at 06:35:56AM -0700, Ulrich Drepper wrote:
> Andreas Jaeger <aj@suse.de> writes:
> 
> > According to the documentation and to Unix98, nl_langinfo returns a
> > string - but it seems that glibc returns in this case an integer?
> > 
> > This looks broken to me.
> 
> No, this is how I've implemented this.  There are other places where a
> pointer has to be converted to an integer.

There is no problem if and only if such behavio(u)r is well documented.
But see the info page of the glibc and search about nl_langinfo() and
you'll see that there isn't mentioned that the character pointer returned
by nl_langinfo() could be read as an unsigned integer do to the fact
that an union is used.


         Werner

-- 
 Dr. Werner Fink,    SuSE GmbH,  Schanzaeckerstr. 10,  90443 Nuernberg
 Germany http://www.suse.de/ and USA http://www.suse.com/
 mail:werner@suse.de  http://www.suse.de/~werner/  fax:+49-911-3206727
------------------------- One man - One vote -------------------------


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]