aboutsummaryrefslogtreecommitdiff
path: root/gold/fileread.h
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2011-03-09 01:50:33 +0000
committerIan Lance Taylor <ian@airs.com>2011-03-09 01:50:33 +0000
commitecb351e91911d22855384ff4a04041c351dd33a7 (patch)
treede6f50a5b4c32d5ca8776af7e55e44e2e4a13e0b /gold/fileread.h
parent98689b250438e851b5d33e7806bb35cfbba19ba3 (diff)
downloadgdb-ecb351e91911d22855384ff4a04041c351dd33a7.zip
gdb-ecb351e91911d22855384ff4a04041c351dd33a7.tar.gz
gdb-ecb351e91911d22855384ff4a04041c351dd33a7.tar.bz2
PR gold/12525
* fileread.cc: #include <climits>. (GOLD_IOV_MAX): Define. (File_read::read_multiple): Limit number of entries by iov_max. * fileread.h (class File_read): Always set max_readv_entries to 128.
Diffstat (limited to 'gold/fileread.h')
-rw-r--r--gold/fileread.h8
1 files changed, 1 insertions, 7 deletions
diff --git a/gold/fileread.h b/gold/fileread.h
index a972af9..d2ac927 100644
--- a/gold/fileread.h
+++ b/gold/fileread.h
@@ -1,6 +1,6 @@
// fileread.h -- read files for gold -*- C++ -*-
-// Copyright 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+// Copyright 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
// Written by Ian Lance Taylor <iant@google.com>.
// This file is part of gold.
@@ -399,13 +399,7 @@ class File_read
{ return (file_size + (page_size - 1)) & ~ (page_size - 1); }
// The maximum number of entries we will pass to ::readv.
-#ifdef HAVE_READV
static const size_t max_readv_entries = 128;
-#else
- // On targets that don't have readv set the max to 1 so readv is not
- // used.
- static const size_t max_readv_entries = 1;
-#endif
// Use readv to read data.
void