/home/mdsteele/native_client_sdk_0_1_519_0/toolchain/linux_x86/bin/../lib/gcc/nacl64/4.4.3/../../../../nacl64/include/regex.h:43:
error: ‘off_t’ does not name a type
/home/mdsteele/native_client_sdk_0_1_519_0/toolchain/linux_x86/bin/../lib/gcc/nacl64/4.4.3/../../../../nacl64/include/regex.h:47:
error: ‘size_t’ does not name a type
/home/mdsteele/native_client_sdk_0_1_519_0/toolchain/linux_x86/bin/../lib/gcc/nacl64/4.4.3/../../../../nacl64/include/regex.h:53:
error: ‘regoff_t’ does not name a type
/home/mdsteele/native_client_sdk_0_1_519_0/toolchain/linux_x86/bin/../lib/gcc/nacl64/4.4.3/../../../../nacl64/include/regex.h:54:
error: ‘regoff_t’ does not name a type
/home/mdsteele/native_client_sdk_0_1_519_0/toolchain/linux_x86/bin/../lib/gcc/nacl64/4.4.3/../../../../nacl64/include/regex.h:97:
error: ‘size_t’ does not name a type
/home/mdsteele/native_client_sdk_0_1_519_0/toolchain/linux_x86/bin/../lib/gcc/nacl64/4.4.3/../../../../nacl64/include/regex.h:98:
error: ‘size_t’ has not been declared
Looking within regex.h in the standard SDK include files, I can see a
"typedef off_t regoff_t", so the issue here is only that the
definitions for off_t and size_t are missing -- apparently they aren't
defined by default and regex.h doesn't include the necessary headers
to define them. I can work around the issue by #including
<sys/types.h> in my code before #including <regex.h>, but it seems
like that shouldn't be necessary (and indeed, my code works just fine
as-is with regular g++). Is this a bug, or am I perhaps missing some
compiler flag?
I am using the latest version of the NaCl SDK (r519).
Cheers,
-Matt
Is this a bug, or am I perhaps missing some compiler flag?
Aha, okay. Thanks for de-mystifying me. (-:
> Hopefully the requirement will go away soon (when we'll port glibc to NaCl),
> but for now you should follow in footsteps of POSIX 1997. It'll not hurt
> later too :-)
Gotcha. Out of curiosity, do you have any sense of when NaCl will use
glibc? I ask because I've previously run into issues where I needed a
non-standard function that glibc provides but that NaCl apparently
currently doesn't (in particular, timegm()).
Thanks,
-Matt