There's a separate API for file sizes.
size_t I believe is meant for sizes of in-memory structures. ftell(3) for example returns a long. lseek(3) returns an
off_t. See further <sys/types.h> documentation e.g.
<sys/types.h>
The idea that files could not be larger than a particular offset is a source of many bugs and growing pains. Some older file systems could not cope with large files, which back then meant bigger than 2GB or 4GB. We are beginning to see this again as storage capacities are approaching the next boundary. It's the good old "640kb ought to be enough for everybody" syndrome.