aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorBernd Edlinger <bernd.edlinger@hotmail.de>2014-02-04 21:08:29 +0000
committerBernd Edlinger <edlinger@gcc.gnu.org>2014-02-04 21:08:29 +0000
commit6a071860bfd406eaad6b5c8ad68b1632ed1c9de6 (patch)
tree826e67e6207f378b5a9c0c25cda8386605b9fe8e /gcc
parent8e9d68a93b31b0db8bbbb5306db28fc92d8fd090 (diff)
downloadgcc-6a071860bfd406eaad6b5c8ad68b1632ed1c9de6.zip
gcc-6a071860bfd406eaad6b5c8ad68b1632ed1c9de6.tar.gz
gcc-6a071860bfd406eaad6b5c8ad68b1632ed1c9de6.tar.bz2
host-linux.c (linux_gt_pch_use_address): Don't use SSIZE_MAX because it is not always defined.
2014-02-04 Bernd Edlinger <bernd.edlinger@hotmail.de> * gcc/config/host-linux.c (linux_gt_pch_use_address): Don't use SSIZE_MAX because it is not always defined. From-SVN: r207488
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/host-linux.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 6bc1933..1d7a8fd 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2014-02-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
+
+ * 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 <vmakarov@redhat.com>
PR bootstrap/59913
diff --git a/gcc/config/host-linux.c b/gcc/config/host-linux.c
index b18c6b6..9e2eb48 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;