X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Fcommon%2Ffilestuff.c;h=7ee9c5a823d464545a9c39b4902aa974738c90d7;hb=727605ca75e009d8468bb6378b7d18b774838b2d;hp=4032f36328041c829196349296281813a8dd381b;hpb=c74e1ccf71458d5e1ab1c5a877a6c27d62597250;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/common/filestuff.c b/gdb/common/filestuff.c index 4032f36328..7ee9c5a823 100644 --- a/gdb/common/filestuff.c +++ b/gdb/common/filestuff.c @@ -1,5 +1,5 @@ /* Low-level file-handling. - Copyright (C) 2012, 2013 Free Software Foundation, Inc. + Copyright (C) 2012-2014 Free Software Foundation, Inc. This file is part of GDB. @@ -16,20 +16,13 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifdef GDBSERVER -#include "server.h" -#else -#include "defs.h" -#include "gdb_string.h" -#endif +#include "common-defs.h" #include "filestuff.h" #include "gdb_vecs.h" - -#include #include #include #include -#include "gdb_stat.h" +#include #ifdef USE_WIN32API #include @@ -58,7 +51,7 @@ #ifndef HAVE_FDWALK -#include "gdb_dirent.h" +#include /* Replacement for fdwalk, if the system doesn't define it. Walks all open file descriptors (though this implementation may walk closed @@ -115,7 +108,7 @@ fdwalk (int (*func) (void *, int), void *arg) { int max, fd; -#ifdef HAVE_GETRLIMIT +#if defined(HAVE_GETRLIMIT) && defined(RLIMIT_NOFILE) struct rlimit rlim; if (getrlimit (RLIMIT_NOFILE, &rlim) == 0 && rlim.rlim_max != RLIM_INFINITY)