Include common-defs.h instead of defs.h/server.h in shared code
[deliverable/binutils-gdb.git] / gdb / common / filestuff.c
index 4032f36328041c829196349296281813a8dd381b..7ee9c5a823d464545a9c39b4902aa974738c90d7 100644 (file)
@@ -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.
 
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#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 <string.h>
 #include <fcntl.h>
 #include <unistd.h>
 #include <sys/types.h>
-#include "gdb_stat.h"
+#include <sys/stat.h>
 
 #ifdef USE_WIN32API
 #include <winsock2.h>
@@ -58,7 +51,7 @@
 
 #ifndef HAVE_FDWALK
 
-#include "gdb_dirent.h"
+#include <dirent.h>
 
 /* 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)
This page took 0.028369 seconds and 4 git commands to generate.