]> Savannah Git Hosting - gnulib.git/commit
read-file: reduce max size from SIZE_MAX to PTRDIFF_MAX
authorPádraig Brady <P@draigBrady.com>
Sun, 2 Feb 2020 16:06:48 +0000 (16:06 +0000)
committerPádraig Brady <P@draigBrady.com>
Sun, 2 Feb 2020 16:52:48 +0000 (16:52 +0000)
commitbf718ebcb3ba3b12871eb293f49d80915cc05b0c
treecc7f4ddd5d3ae30ed5171caaab3280dd7a29d49c
parent7a2f755a776e32bce67447c55f58f5b83c6d4fc4
read-file: reduce max size from SIZE_MAX to PTRDIFF_MAX

On x86_64 with glibc-2.30, gcc 9.2 is giving:
  error: argument 2 value '18446744073709551615'
  exceeds maximum object size 9223372036854775807
  [-Werror=alloc-size-larger-than=]
The details of this restriction are discussed at:
https://stackoverflow.com/q/42574890/4421
* lib/read-file.c: s/SIZE_MAX/PTRDIFF_MAX/
ChangeLog
lib/read-file.c