remove gdb_stat.h
authorTom Tromey <tromey@redhat.com>
Wed, 6 Nov 2013 14:55:51 +0000 (07:55 -0700)
committerTom Tromey <tromey@redhat.com>
Mon, 18 Nov 2013 20:29:02 +0000 (13:29 -0700)
This patch is purely mechanical.  It removes gdb_stat.h and changes
the code to use sys/stat.h.

2013-11-18  Tom Tromey  <tromey@redhat.com>

* common/gdb_stat.h: Remove.
* ada-lang.c: Use sys/stat.h, not gdb_stat.h.
* common/filestuff.c: Use sys/stat.h, not gdb_stat.h.
* common/linux-osdata.c: Use sys/stat.h, not gdb_stat.h.
* corefile.c: Use sys/stat.h, not gdb_stat.h.
* ctf.c: Use sys/stat.h, not gdb_stat.h.
* darwin-nat.c: Use sys/stat.h, not gdb_stat.h.
* dbxread.c: Use sys/stat.h, not gdb_stat.h.
* dwarf2read.c: Use sys/stat.h, not gdb_stat.h.
* exec.c: Use sys/stat.h, not gdb_stat.h.
* gdbserver/linux-low.c: Use sys/stat.h, not gdb_stat.h.
* gdbserver/remote-utils.c: Use sys/stat.h, not gdb_stat.h.
* inf-child.c: Use sys/stat.h, not gdb_stat.h.
* jit.c: Use sys/stat.h, not gdb_stat.h.
* linux-nat.c: Use sys/stat.h, not gdb_stat.h.
* m68klinux-nat.c: Use sys/stat.h, not gdb_stat.h.
* main.c: Use sys/stat.h, not gdb_stat.h.
* mdebugread.c: Use sys/stat.h, not gdb_stat.h.
* mi/mi-cmd-env.c: Use sys/stat.h, not gdb_stat.h.
* nto-tdep.c: Use sys/stat.h, not gdb_stat.h.
* objfiles.c: Use sys/stat.h, not gdb_stat.h.
* procfs.c: Use sys/stat.h, not gdb_stat.h.
* remote-fileio.c: Use sys/stat.h, not gdb_stat.h.
* remote-mips.c: Use sys/stat.h, not gdb_stat.h.
* remote.c: Use sys/stat.h, not gdb_stat.h.
* rs6000-nat.c: Use sys/stat.h, not gdb_stat.h.
* sol-thread.c: Use sys/stat.h, not gdb_stat.h.
* solib-spu.c: Use sys/stat.h, not gdb_stat.h.
* source.c: Use sys/stat.h, not gdb_stat.h.
* symfile.c: Use sys/stat.h, not gdb_stat.h.
* symmisc.c: Use sys/stat.h, not gdb_stat.h.
* symtab.c: Use sys/stat.h, not gdb_stat.h.
* top.c: Use sys/stat.h, not gdb_stat.h.
* xcoffread.c: Use sys/stat.h, not gdb_stat.h.

35 files changed:
gdb/ChangeLog
gdb/ada-lang.c
gdb/common/filestuff.c
gdb/common/gdb_stat.h [deleted file]
gdb/common/linux-osdata.c
gdb/corefile.c
gdb/ctf.c
gdb/darwin-nat.c
gdb/dbxread.c
gdb/dwarf2read.c
gdb/exec.c
gdb/gdbserver/linux-low.c
gdb/gdbserver/remote-utils.c
gdb/inf-child.c
gdb/jit.c
gdb/linux-nat.c
gdb/m68klinux-nat.c
gdb/main.c
gdb/mdebugread.c
gdb/mi/mi-cmd-env.c
gdb/nto-tdep.c
gdb/objfiles.c
gdb/procfs.c
gdb/remote-fileio.c
gdb/remote-mips.c
gdb/remote.c
gdb/rs6000-nat.c
gdb/sol-thread.c
gdb/solib-spu.c
gdb/source.c
gdb/symfile.c
gdb/symmisc.c
gdb/symtab.c
gdb/top.c
gdb/xcoffread.c

index 2f2bb92bdacb685491a19098c345d07566f2e709..a1d0a3ca7cf91851951df45193df80326b7665d8 100644 (file)
@@ -1,3 +1,40 @@
+2013-11-18  Tom Tromey  <tromey@redhat.com>
+
+       * common/gdb_stat.h: Remove.
+       * ada-lang.c: Use sys/stat.h, not gdb_stat.h.
+       * common/filestuff.c: Use sys/stat.h, not gdb_stat.h.
+       * common/linux-osdata.c: Use sys/stat.h, not gdb_stat.h.
+       * corefile.c: Use sys/stat.h, not gdb_stat.h.
+       * ctf.c: Use sys/stat.h, not gdb_stat.h.
+       * darwin-nat.c: Use sys/stat.h, not gdb_stat.h.
+       * dbxread.c: Use sys/stat.h, not gdb_stat.h.
+       * dwarf2read.c: Use sys/stat.h, not gdb_stat.h.
+       * exec.c: Use sys/stat.h, not gdb_stat.h.
+       * gdbserver/linux-low.c: Use sys/stat.h, not gdb_stat.h.
+       * gdbserver/remote-utils.c: Use sys/stat.h, not gdb_stat.h.
+       * inf-child.c: Use sys/stat.h, not gdb_stat.h.
+       * jit.c: Use sys/stat.h, not gdb_stat.h.
+       * linux-nat.c: Use sys/stat.h, not gdb_stat.h.
+       * m68klinux-nat.c: Use sys/stat.h, not gdb_stat.h.
+       * main.c: Use sys/stat.h, not gdb_stat.h.
+       * mdebugread.c: Use sys/stat.h, not gdb_stat.h.
+       * mi/mi-cmd-env.c: Use sys/stat.h, not gdb_stat.h.
+       * nto-tdep.c: Use sys/stat.h, not gdb_stat.h.
+       * objfiles.c: Use sys/stat.h, not gdb_stat.h.
+       * procfs.c: Use sys/stat.h, not gdb_stat.h.
+       * remote-fileio.c: Use sys/stat.h, not gdb_stat.h.
+       * remote-mips.c: Use sys/stat.h, not gdb_stat.h.
+       * remote.c: Use sys/stat.h, not gdb_stat.h.
+       * rs6000-nat.c: Use sys/stat.h, not gdb_stat.h.
+       * sol-thread.c: Use sys/stat.h, not gdb_stat.h.
+       * solib-spu.c: Use sys/stat.h, not gdb_stat.h.
+       * source.c: Use sys/stat.h, not gdb_stat.h.
+       * symfile.c: Use sys/stat.h, not gdb_stat.h.
+       * symmisc.c: Use sys/stat.h, not gdb_stat.h.
+       * symtab.c: Use sys/stat.h, not gdb_stat.h.
+       * top.c: Use sys/stat.h, not gdb_stat.h.
+       * xcoffread.c: Use sys/stat.h, not gdb_stat.h.
+
 2013-11-18  Tom Tromey  <tromey@redhat.com>
 
        * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
index 28daa248415a4acb73fca9eccefec0a8f2f89b46..417232c26e2e1395324070ccd6e8de98fcb77ede 100644 (file)
@@ -43,7 +43,7 @@
 #include "gdb_obstack.h"
 #include "ada-lang.h"
 #include "completer.h"
-#include "gdb_stat.h"
+#include <sys/stat.h>
 #ifdef UI_OUT
 #include "ui-out.h"
 #endif
index bbb60a7dcaaa203eb1ddd4e958d56a966aaa039f..2792d59fd8bc5b5b6c74c338d1add8bd147e4fa8 100644 (file)
@@ -29,7 +29,7 @@
 #include <fcntl.h>
 #include <unistd.h>
 #include <sys/types.h>
-#include "gdb_stat.h"
+#include <sys/stat.h>
 
 #ifdef USE_WIN32API
 #include <winsock2.h>
diff --git a/gdb/common/gdb_stat.h b/gdb/common/gdb_stat.h
deleted file mode 100644 (file)
index 3e3c981..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-/* Portable <sys/stat.h>
-   Copyright (C) 1995-2013 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#if !defined(GDB_STAT_H)
-#define GDB_STAT_H
-
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#if !defined(S_ISBLK) && defined(S_IFBLK)
-#define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
-#endif
-#if !defined(S_ISCHR) && defined(S_IFCHR)
-#define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
-#endif
-#if !defined(S_ISDIR) && defined(S_IFDIR)
-#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
-#endif
-#if !defined(S_ISREG) && defined(S_IFREG)
-#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
-#endif
-#if !defined(S_ISFIFO) && defined(S_IFIFO)
-#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
-#endif
-#if !defined(S_ISLNK) && defined(S_IFLNK)
-#define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
-#endif
-#if !defined(S_ISSOCK) && defined(S_IFSOCK)
-#define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
-#endif
-#if !defined(S_ISMPB) && defined(S_IFMPB)      /* V7 */
-#define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB)
-#define S_ISMPC(m) (((m) & S_IFMT) == S_IFMPC)
-#endif
-#if !defined(S_ISNWK) && defined(S_IFNWK)      /* HP/UX */
-#define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK)
-#endif
-
-/* Microsoft C's stat.h doesn't define all the POSIX file modes.  */
-#ifndef S_IROTH
-#define S_IROTH        S_IREAD
-#endif
-
-#endif /* !defined(GDB_STAT_H) */
index 0ff10c66eb3b18cd3072baff96317548d8df6aec..90da8995a663e47519b1dcd83a5776e13fa0961a 100644 (file)
@@ -43,7 +43,7 @@
 #include "buffer.h"
 #include "gdb_assert.h"
 #include <dirent.h>
-#include "gdb_stat.h"
+#include <sys/stat.h>
 #include "filestuff.h"
 
 #define NAMELEN(dirent) strlen ((dirent)->d_name)
index e82f9782c3078534486d3c2e683f44b3c417b023..878ab3b3900a073e7150200f657c772adab12ee9 100644 (file)
@@ -30,7 +30,7 @@
 #include "target.h"
 #include "gdbcore.h"
 #include "dis-asm.h"
-#include "gdb_stat.h"
+#include <sys/stat.h>
 #include "completer.h"
 #include "exceptions.h"
 #include "observer.h"
index 23ee36d440a681dca553207c9a5e3dd391656e1b..ba8190e1506f8c47913f8b54db2fafed52bc17e1 100644 (file)
--- a/gdb/ctf.c
+++ b/gdb/ctf.c
@@ -23,7 +23,7 @@
 #include "ctf.h"
 #include "tracepoint.h"
 #include "regcache.h"
-#include "gdb_stat.h"
+#include <sys/stat.h>
 #include "exec.h"
 #include "completer.h"
 
index a9157dbf0690c24af594e9f08543303756a29366..f0f938d260ae0cf44187d9d0d0aa562fb67ea836 100644 (file)
@@ -32,7 +32,7 @@
 #include "regcache.h"
 #include "event-top.h"
 #include "inf-loop.h"
-#include "gdb_stat.h"
+#include <sys/stat.h>
 #include "exceptions.h"
 #include "inf-child.h"
 #include "value.h"
index 67deeec5d6a3c6fbb31b04318fcf4fd87e828d80..a810f42bab0033b7d23631e420b315ffddcf15d3 100644 (file)
@@ -39,7 +39,7 @@
 #endif
 
 #include "gdb_obstack.h"
-#include "gdb_stat.h"
+#include <sys/stat.h>
 #include "symtab.h"
 #include "breakpoint.h"
 #include "target.h"
index 5e8f94ed0142162d41b7ffad13a28f5bfb17d9f9..1c7dfc54fbcf122d7bc584ebc68e6d442d3962e1 100644 (file)
@@ -56,7 +56,7 @@
 #include "jv-lang.h"
 #include "psympriv.h"
 #include "exceptions.h"
-#include "gdb_stat.h"
+#include <sys/stat.h>
 #include "completer.h"
 #include "vec.h"
 #include "c-lang.h"
index afd32245de09404174906a366b16307ed99751a8..38d2edb01c06cc90b5fb2171e9a986ba62edc5e0 100644 (file)
@@ -42,7 +42,7 @@
 #include "gdbcore.h"
 
 #include <ctype.h>
-#include "gdb_stat.h"
+#include <sys/stat.h>
 
 void (*deprecated_file_changed_hook) (char *);
 
index 799fcc99af7b431ce2209f62bb7def66d0ffcd75..6355fa8391187db6d39a87441b1ab31f917d6756 100644 (file)
@@ -41,7 +41,7 @@
 #include <pwd.h>
 #include <sys/types.h>
 #include <dirent.h>
-#include "gdb_stat.h"
+#include <sys/stat.h>
 #include <sys/vfs.h>
 #include <sys/uio.h>
 #include "filestuff.h"
index 8e8a4d6f5f7566b1fd4fe3b27de0a0f9ff25aed4..a48ca35a9086a5054f59f0f9809147e1559f0384 100644 (file)
@@ -57,7 +57,7 @@
 #if HAVE_ARPA_INET_H
 #include <arpa/inet.h>
 #endif
-#include "gdb_stat.h"
+#include <sys/stat.h>
 #if HAVE_ERRNO_H
 #include <errno.h>
 #endif
index 36fa81d4e3a3c4d5cc437cd2c5ec275f9a79c66c..3db09c9e3accb9431ab835308484d69ce132d571 100644 (file)
@@ -25,7 +25,7 @@
 #include "target.h"
 #include "inferior.h"
 #include <string.h>
-#include "gdb_stat.h"
+#include <sys/stat.h>
 #include "inf-child.h"
 #include "gdb/fileio.h"
 #include "agent.h"
index 3daa9faa0fc4fbe7e706d2664deecd2f79e05235..fde79e57df3fd787eaaa4f7dc094274a05216a12 100644 (file)
--- a/gdb/jit.c
+++ b/gdb/jit.c
@@ -37,7 +37,7 @@
 #include "symtab.h"
 #include "target.h"
 #include "gdb-dlfcn.h"
-#include "gdb_stat.h"
+#include <sys/stat.h>
 #include "exceptions.h"
 #include "gdb_bfd.h"
 
index e9613acb09d122734ca665789ce8525b2d06e7ef..d2091caf91a55344c3cb00252723db0c6df64286 100644 (file)
@@ -47,7 +47,7 @@
 #include "gdbcore.h"           /* for get_exec_file */
 #include <ctype.h>             /* for isdigit */
 #include "gdbthread.h"         /* for struct thread_info etc.  */
-#include "gdb_stat.h"          /* for struct stat */
+#include <sys/stat.h>          /* for struct stat */
 #include <fcntl.h>             /* for O_RDONLY */
 #include "inf-loop.h"
 #include "event-loop.h"
index 59511e4aa8970ea01b4780e513191d7e98b89e5c..f43d475db1186db6c614bdf058b18d3282272abb 100644 (file)
@@ -42,7 +42,7 @@
 #endif
 
 #include <sys/file.h>
-#include "gdb_stat.h"
+#include <sys/stat.h>
 
 #include "floatformat.h"
 
index d5c9e39df7baf547eb20ab6400b389151d949384..08f46f00168e2403ae12cc83acf0a0038f208fe9 100644 (file)
@@ -28,7 +28,7 @@
 #include "getopt.h"
 
 #include <sys/types.h>
-#include "gdb_stat.h"
+#include <sys/stat.h>
 #include <ctype.h>
 
 #include <string.h>
index 99a029ed90452e80f29514905283a04886e497dc..bbeea12f74b30ef9d40aee6c8307f8025a35e849 100644 (file)
@@ -55,7 +55,7 @@
 #include "block.h"
 #include "dictionary.h"
 #include "mdebugread.h"
-#include "gdb_stat.h"
+#include <sys/stat.h>
 #include <string.h>
 #include "psympriv.h"
 #include "source.h"
index f1589e5be7df0be53768f09410eff1c0132f2184..ca196f6d352b46a4b1fbc45fe2edd713faad82e1 100644 (file)
@@ -32,7 +32,7 @@
 #include "top.h"
 
 #include <string.h>
-#include "gdb_stat.h"
+#include <sys/stat.h>
 
 static void env_mod_path (char *dirname, char **which_path);
 
index 91f3928f5566e6cfb186933cf26c321801ea03c2..674d572557f84cb5d1c84f27d87a062dbd7d4c7c 100644 (file)
@@ -20,7 +20,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
-#include "gdb_stat.h"
+#include <sys/stat.h>
 #include <string.h>
 #include "nto-tdep.h"
 #include "top.h"
index f669e30d2f9a752341d07636e63c97560fe3c5bc..ba930fa31c0987dcf5f0c92d5b7d3b969a2b169f 100644 (file)
@@ -35,7 +35,7 @@
 
 #include "gdb_assert.h"
 #include <sys/types.h>
-#include "gdb_stat.h"
+#include <sys/stat.h>
 #include <fcntl.h>
 #include "gdb_obstack.h"
 #include <string.h>
index 7a2aeb8a43e55d57483db200eeab8f5a9ede99fe..ef9bb3de40aaf050736af900cf7c3cdc516646d1 100644 (file)
@@ -94,7 +94,7 @@
 
 #include <fcntl.h>     /* for O_RDONLY */
 #include <unistd.h>    /* for "X_OK" */
-#include "gdb_stat.h"  /* for struct stat */
+#include <sys/stat.h>  /* for struct stat */
 
 /* Note: procfs-utils.h must be included after the above system header
    files, because it redefines various system calls using macros.
index bf790686e733155cbd1c81aa71b2b6b46f0cdd37..c6e7ece679e564faa7cfe88f9489f86947fc4f42 100644 (file)
@@ -25,7 +25,7 @@
 #include "remote.h"
 #include "gdb/fileio.h"
 #include "gdb_wait.h"
-#include "gdb_stat.h"
+#include <sys/stat.h>
 #include "exceptions.h"
 #include "remote-fileio.h"
 #include "event-loop.h"
index 14c494f67d73d18a41ce3de135333e31f6e1c532..e4e508341cc34a27d828392fb847560abc9c7b64 100644 (file)
@@ -30,7 +30,7 @@
 #include "target.h"
 #include "exceptions.h"
 #include <string.h>
-#include "gdb_stat.h"
+#include <sys/stat.h>
 #include "gdb_usleep.h"
 #include "regcache.h"
 #include <ctype.h>
index bbd9061a3179e0da3c77dfd10935676402000262..186c058f33416224a16922121b08aaf5d8085e57 100644 (file)
@@ -60,7 +60,7 @@
 
 #include "remote-fileio.h"
 #include "gdb/fileio.h"
-#include "gdb_stat.h"
+#include <sys/stat.h>
 #include "xml-support.h"
 
 #include "memory-map.h"
index fc9889cd48843200ee9090a6b4f9bbf2352e2e1c..d0ec0c733e7292b0485630cebcb0428b0d88a4fb 100644 (file)
@@ -50,7 +50,7 @@
 
 #include <a.out.h>
 #include <sys/file.h>
-#include "gdb_stat.h"
+#include <sys/stat.h>
 #include "gdb_bfd.h"
 #include <sys/core.h>
 #define __LDINFO_PTRACE32__    /* for __ld_info32 */
index ec1245b3cc70d5cc9c6556ca4f58a4ae4c015fba..b480b58df682127f835061618dc431736c08e00b 100644 (file)
@@ -56,7 +56,7 @@
 #include "target.h"
 #include "inferior.h"
 #include <fcntl.h>
-#include "gdb_stat.h"
+#include <sys/stat.h>
 #include <dlfcn.h>
 #include "gdbcmd.h"
 #include "gdbcore.h"
index 590baba837722eb0b4229edd8c82dda246b67ad2..c12324cbcb5c1ca26681d2426b03a0e9c3a62f25 100644 (file)
@@ -23,7 +23,7 @@
 #include "gdbcore.h"
 #include <string.h>
 #include "gdb_assert.h"
-#include "gdb_stat.h"
+#include <sys/stat.h>
 #include "arch-utils.h"
 #include "bfd.h"
 #include "symtab.h"
index f89f534f221a365bd370f09a2f9968c56e269466..095958500296101777cc8e1e7c27fae41de099d5 100644 (file)
@@ -31,7 +31,7 @@
 
 #include <sys/types.h>
 #include <string.h>
-#include "gdb_stat.h"
+#include <sys/stat.h>
 #include <fcntl.h>
 #include "gdbcore.h"
 #include "gdb_regex.h"
index 0c8713a9021d1929e2b13b1e49906b93f91f373e..59d0583acf2167fa596c256ebb65acb88abacba5 100644 (file)
@@ -62,7 +62,7 @@
 #include <sys/types.h>
 #include <fcntl.h>
 #include <string.h>
-#include "gdb_stat.h"
+#include <sys/stat.h>
 #include <ctype.h>
 #include <time.h>
 #include <sys/time.h>
index f4c3fc51af0a9171ea2d788745b63977e2923d9d..ec21c6c456cc86fc18979298ab08098511a4920d 100644 (file)
@@ -32,7 +32,7 @@
 #include "bcache.h"
 #include "block.h"
 #include "gdb_regex.h"
-#include "gdb_stat.h"
+#include <sys/stat.h>
 #include "dictionary.h"
 #include "typeprint.h"
 #include "gdbcmd.h"
index 6bb0bbc372f3242a7ec3eff881fe17150ad35d6b..8fac0be9ef0f02a76d81dfba304774674e725c28 100644 (file)
@@ -51,7 +51,7 @@
 #include <sys/types.h>
 #include <fcntl.h>
 #include <string.h>
-#include "gdb_stat.h"
+#include <sys/stat.h>
 #include <ctype.h>
 #include "cp-abi.h"
 #include "cp-support.h"
index 8b389c57934f7c6430f60e2c98b5193250bf65fd..72a286b42306774cc1dde0dbb5bb5ed7e057d8c5 100644 (file)
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -61,7 +61,7 @@
 
 #include "event-top.h"
 #include <string.h>
-#include "gdb_stat.h"
+#include <sys/stat.h>
 #include <ctype.h>
 #include "ui-out.h"
 #include "cli-out.h"
index c741fb4560f94495edef07153a12af9196b11e86..2fba510acf836be768bba11320aa5f45b7c8d272 100644 (file)
@@ -29,7 +29,7 @@
 #ifdef HAVE_SYS_FILE_H
 #include <sys/file.h>
 #endif
-#include "gdb_stat.h"
+#include <sys/stat.h>
 
 #include "coff/internal.h"
 #include "libcoff.h"           /* FIXME, internal data from BFD */