Как стать автором
Обновить

rethink their coding style…

Время на прочтение1 мин
Количество просмотров15K
Выдержка из исходников gcc, файл libcpp/files.c

Copy Source | Copy HTML
  1. /* off_t might have a wider range than ssize_t - in other words,
  2. the max size of a file might be bigger than the address
  3. space. We can't handle a file that large. (Anyone with
  4. a single source file bigger than 2GB needs to rethink
  5. their coding style.) Some systems (e.g. AIX 4.1) define
  6. SSIZE_MAX to be much smaller than the actual range of the
  7. type. Use INTTYPE_MAXIMUM unconditionally to ensure this
  8. does not bite us. */
  9.    if (file->st.st_size > INTTYPE_MAXIMUM (ssize_t))
  10.    {
  11.       cpp_error (pfile, CPP_DL_ERROR, "%s is too large", file->path);
  12.       return false;
  13.    }
  14.  
  15.       size = file->st.st_size;
Теги:
Хабы:
+58
Комментарии15

Публикации

Истории

Работа

Программист C++
129 вакансий
QT разработчик
7 вакансий

Ближайшие события

Weekend Offer в AliExpress
Дата20 – 21 апреля
Время10:00 – 20:00
Место
Онлайн
Конференция «Я.Железо»
Дата18 мая
Время14:00 – 23:59
Место
МоскваОнлайн