From: Ramsay Jones Date: Sun, 13 Aug 2017 19:45:04 GMT Subject: Re: [PATCH 1/9] Convert pack-objects to size_t Message-ID: <627042be-ab86-e9da-8c4e-5aac3278f5c6@ramsayjones.plus.com> In-Reply-To: <20170813183026.GC31079@mail.zuhause> On 13/08/17 19:30, Martin Koegler wrote: > On Sat, Aug 12, 2017 at 02:47:25PM +0100, Ramsay Jones wrote: >> On 32-bit Linux, off_t is 64-bit and size_t is 32-bit. > > --- t.c --- > #include > #include > > int main() > { > printf("%d %d\n", sizeof(size_t), sizeof(off_t)); > } > ------------ > $ gcc -m32 -o t t.c > $ ./t.c > 4 4 > > So is that really true? It should be, see commit b97e911643 ("Support for large files on 32bit systems.", 17-02-2007), where you can see that the _FILE_OFFSET_BITS macro is set to 64. This asks et.al., to use the "Large File System" API and a 64-bit off_t. I can't boot my 32-bit installation at the moment, and it seems that my 64-bit multilib system is not playing ball: $ gcc -m32 -D_FILE_OFFSET_BITS=64 -o t t.c In file included from /usr/include/stdio.h:27:0, from t.c:2: /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or directory compilation terminated. $ ATB, Ramsay Jones