Выдержка из исходников gcc, файл libcpp/files.c
Copy Source | Copy HTML
- /* off_t might have a wider range than ssize_t - in other words,
- the max size of a file might be bigger than the address
- space. We can't handle a file that large. (Anyone with
- a single source file bigger than 2GB needs to rethink
- their coding style.) Some systems (e.g. AIX 4.1) define
- SSIZE_MAX to be much smaller than the actual range of the
- type. Use INTTYPE_MAXIMUM unconditionally to ensure this
- does not bite us. */
- if (file->st.st_size > INTTYPE_MAXIMUM (ssize_t))
- {
- cpp_error (pfile, CPP_DL_ERROR, "%s is too large", file->path);
- return false;
- }
-
- size = file->st.st_size;