Changing typedefs from POSIX

Asked by Stefan Heinzmann


is there a recommended way how to build the toolchain with a different choice of typedefs for some scalar types from POSIX?

Specifically, I would like off_t to have 64 bits, and ino_t to have 32 bits. I don't know where the changes should be made. Do the build scripts have to be changed for this?

Stefan H.

Question information

English Edit question
GNU Arm Embedded Toolchain Edit question
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Tejas Belagod (belagod-tejas) said :

Try defining when building your application with -DFILE_OFFSET_BITS=64. But, this will automatically set ino_t to ino64_t.

But I dont know if that's what you're looking for...

I don't know if there's an easy way to set off_t and ino_t to two different values other than rebuilding the libs.

Revision history for this message
Thomas Preud'homme (thomas-preudhomme) said :

Hi Stefan,

I'm afraid you'll have to change the standard headers themselves and rebuild the toolchain (good news is scripts wouldn't need to be changed). off_t seems to be coming from src/newlib/newlib/libc/include/sys/_types.h from the root of our source tarball (after untarring newlib.tar.bz2). Try to change it in the installed tarball (arm-none-eabi/include/sys/_types.h from the directory where you installed the binary tarball) and see if that makes any difference in your compiled program. If yes, don't forget to rebuild the toolchain first (as some ABI will be using that type) before you actually start using it.

Can you help with this problem?

Provide an answer of your own, or ask Stefan Heinzmann for more information if necessary.

To post a message you must log in.