X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gold%2Ffileread.h;h=08a4583943c7eb5cecd7a6d3cc386433af7039b3;hb=c3d399e712774f8c8e4cd6b6a5bb8230c42bc760;hp=6d0db78d3a3f531ed89bd3c55ab721be507223e2;hpb=ca09d69af126b596bf21c9d3f7639cae5cd32533;p=deliverable%2Fbinutils-gdb.git diff --git a/gold/fileread.h b/gold/fileread.h index 6d0db78d3a..08a4583943 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 . // This file is part of gold. @@ -52,6 +52,12 @@ struct Timespec int nanoseconds; }; +// Get the last modified time of an unopened file. Returns false if the +// file does not exist. + +bool +get_mtime(const char* filename, Timespec* mtime); + class Position_dependent_options; class Input_file_argument; class Dirsearch; @@ -249,7 +255,7 @@ class File_read { // Data owned by File object - nothing done in destructor. DATA_NOT_OWNED, - // Data alocated with new[] and owned by this object - should + // Data allocated with new[] and owned by this object - should // use delete[]. DATA_ALLOCATED_ARRAY, // Data mmapped and owned by this object - should munmap. @@ -399,13 +405,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 @@ -493,6 +493,9 @@ class Input_file is_in_sysroot_(false), format_(FORMAT_NONE) { } + // Create an input file given just a filename. + Input_file(const char* name); + // Create an input file with the contents already provided. This is // only used for testing. With this path, don't call the open // method.