wstoimax Questions
Joel Sherrill
joel.sherrill@oarcorp.com
Wed Nov 13 20:30:00 GMT 2013
Hi
First, this doesn't have an implementation in newlib
but a prototype is there. But my question is trying
to interpret POSIX to figure out what the right
set of headers a minimal program would have to include.
==================================
#include <inttypes.h>
int main()
{
const wchar_t *restrict* var9 = {0};
wchar_t **restrict* var10 = {0};
int* var11 = {0};
wcstoimax(*var9, *var10, *var11);
return 0;
}
==================================
This works for newlib/rtems but glibc on CentOS
doesn't end up including <wchar.h> and it must
be included in addition. Since this definition
of the method says you need to include <stddef.h>,
that will work.
http://pubs.opengroup.org/onlinepubs/9699919799/functions/wcstoimax.html
But
http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/inttypes.h.html
says inttypes.h shall define imaxdiv_t and wchar_t.
Which implies you only should need to include <inttypes.h>
Is this a glibc bug? Or am I missing something?
This feels like the two pages are almost contradicting
one another on the minimum set of include files.
Thanks.
--
Joel Sherrill, Ph.D. Director of Research & Development
joel.sherrill@OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
More information about the Newlib
mailing list