I have found out that in order to use stat on a file over 2GB, I have to compile my program with large file support. Doing a `getconf LFS_CFLAGS` yields "-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64". If I then compile with those flags, everything is great. Why doesn't configure and automake do this for me? I have an example of another program whos configure does it automatically, but it doesn't explicitly mention anything like AC_SYS_LARGEFILES. It does include some m4 functions that require AC_SYS_LARGEFILES. But shouldn't in this day and age I never have to mention anything? Or do I gave to go back and edit the configure script of every program I've ever made?
Obviously, Autoconf, Automake and Configure scripts do what they have been told.
So, if you need to have large-file support, or any other "specifics", you probably need to configure your automake, autoconf or configure scripts to take that into account.
As to "do you need to go back and reconfigure every project", well, it obivously only matters if the application is sensibly going to be used with files larger than 2GB.
[By the way, only the size is wrong in stat if you do it on a 2GB+ file - all other information still works right].