Re: "Canonical" way of changing the size of off_t, ino_t, ...

Brian Inglis <[email protected]>
Newsgroups gmane.comp.lib.newlib
Organization Systematic Software
Message-ID <[email protected]>
On 2025-04-27 10:27, Stefan Heinzmann wrote:
> Hello list,
> 
> I am using the newlib build for arm-none-eabi from ArchLinux for simplicity, but 
> I now need to change the size of some predefined POSIX types. I wasn't able to 
> find clear instructions how to do this properly, hence my question here.
> 
> The default sizes of offs_t, ino_t, and possibly other types are too small for 
> my use. Ideally I would like to customize the newlib build in a way that doesn't 
> require the user builds to define anything, i.e. that the correct sizes are 
> picked up from the newlib headers automatically. How do I do that? Are there 
> configuration options I can use when building newlib? Do I have to patch the 
> source, and if so, where?
> 
> I note that there is support for off64_t and the respective functions, but I 
> would prefer to have off_t defined as 64-bit, in a way similar to 
> _FILE_OFFSET_BITS=64 in glibc.
> 
> Similarly, how do I make ino_t larger? What about dev_t, and other POSIX types?
> 
> Thanks for your help!

Please first read the FAQ, and follow all the steps, but ensure that you do not 
redefine anything provided or assumed by your compiler or binutils:

	https://www.sourceware.org/newlib/faq.html

-- 
Take care. Thanks, Brian Inglis              Calgary, Alberta, Canada

La perfection est atteinte                   Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter  not when there is no more to add
mais lorsqu'il n'y a plus rien à retrancher  but when there is no more to cut
                                 -- Antoine de Saint-Exupéry
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.