From: Bernd Edlinger Date: Tue, 4 Feb 2014 21:08:29 +0000 (+0000) Subject: host-linux.c (linux_gt_pch_use_address): Don't use SSIZE_MAX because it is not always... X-Git-Tag: releases/gcc-4.9.0~1094 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6a071860bfd406eaad6b5c8ad68b1632ed1c9de6;p=thirdparty%2Fgcc.git host-linux.c (linux_gt_pch_use_address): Don't use SSIZE_MAX because it is not always defined. 2014-02-04 Bernd Edlinger * gcc/config/host-linux.c (linux_gt_pch_use_address): Don't use SSIZE_MAX because it is not always defined. From-SVN: r207488 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6bc1933fddea..1d7a8fd5d07c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2014-02-04 Bernd Edlinger + + * gcc/config/host-linux.c (linux_gt_pch_use_address): Don't + use SSIZE_MAX because it is not always defined. + 2014-02-04 Vladimir Makarov PR bootstrap/59913 diff --git a/gcc/config/host-linux.c b/gcc/config/host-linux.c index b18c6b67c664..9e2eb4822473 100644 --- a/gcc/config/host-linux.c +++ b/gcc/config/host-linux.c @@ -212,7 +212,7 @@ linux_gt_pch_use_address (void *base, size_t size, int fd, size_t offset) { ssize_t nbytes; - nbytes = read (fd, base, MIN (size, SSIZE_MAX)); + nbytes = read (fd, base, MIN (size, (size_t)-1 >> 1)); if (nbytes <= 0) return -1; base = (char *) base + nbytes;