nl_langinfo (_NL_PAPER_HEIGHT) problem
Andreas Jaeger
aj@suse.de
Tue Apr 24 06:24:00 GMT 2001
The output of the appended program is:
gee:/tmp:[1]$ gcc -Wall -g t.c
gee:/tmp:[0]$ ./a.out
297
Segmentation fault
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.
Andreas
#include <locale.h>
#include <langinfo.h>
#include <stdio.h>
int
main (void)
{
char *p;
setlocale (LC_ALL, "");
p = nl_langinfo (_NL_PAPER_HEIGHT);
printf ("%d\n", (int)p);
printf ("%p %s\n", p, p);
return 0;
}
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj
More information about the Libc-alpha
mailing list