diff options
author | Ian Lance Taylor <ian@airs.com> | 2009-10-09 23:20:44 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 2009-10-09 23:20:44 +0000 |
commit | d9a893b837890cddc71ea116e4d7e5b7bf9aadb8 (patch) | |
tree | 9c062c6e4c64b7d9c52415a8b93afecada7e957e /gold/fileread.h | |
parent | c0a628659598a06ce2b60c956763f075a2b64b30 (diff) | |
download | gdb-d9a893b837890cddc71ea116e4d7e5b7bf9aadb8.zip gdb-d9a893b837890cddc71ea116e4d7e5b7bf9aadb8.tar.gz gdb-d9a893b837890cddc71ea116e4d7e5b7bf9aadb8.tar.bz2 |
* configure.ac: Check for readv function also.
* fileread.cc (readv): Define if not HAVE_READV.
* fileread.h (File_read:: max_readv_entries): Set to 1 if readv
does not exist.
* config.in: Regenerate.
* configure: Regenerate.
Diffstat (limited to 'gold/fileread.h')
-rw-r--r-- | gold/fileread.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gold/fileread.h b/gold/fileread.h index 920a4da..bdffdd1 100644 --- a/gold/fileread.h +++ b/gold/fileread.h @@ -370,7 +370,13 @@ 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 |