From 53ce3c3929c7121f155e0a4a2492c8dba3878dfd Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 6 Nov 2013 07:55:51 -0700 Subject: [PATCH] remove gdb_stat.h This patch is purely mechanical. It removes gdb_stat.h and changes the code to use sys/stat.h. 2013-11-18 Tom Tromey * 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. --- gdb/ChangeLog | 37 ++++++++++++++++++++++ gdb/ada-lang.c | 2 +- gdb/common/filestuff.c | 2 +- gdb/common/gdb_stat.h | 59 ------------------------------------ gdb/common/linux-osdata.c | 2 +- gdb/corefile.c | 2 +- gdb/ctf.c | 2 +- gdb/darwin-nat.c | 2 +- gdb/dbxread.c | 2 +- gdb/dwarf2read.c | 2 +- gdb/exec.c | 2 +- gdb/gdbserver/linux-low.c | 2 +- gdb/gdbserver/remote-utils.c | 2 +- gdb/inf-child.c | 2 +- gdb/jit.c | 2 +- gdb/linux-nat.c | 2 +- gdb/m68klinux-nat.c | 2 +- gdb/main.c | 2 +- gdb/mdebugread.c | 2 +- gdb/mi/mi-cmd-env.c | 2 +- gdb/nto-tdep.c | 2 +- gdb/objfiles.c | 2 +- gdb/procfs.c | 2 +- gdb/remote-fileio.c | 2 +- gdb/remote-mips.c | 2 +- gdb/remote.c | 2 +- gdb/rs6000-nat.c | 2 +- gdb/sol-thread.c | 2 +- gdb/solib-spu.c | 2 +- gdb/source.c | 2 +- gdb/symfile.c | 2 +- gdb/symmisc.c | 2 +- gdb/symtab.c | 2 +- gdb/top.c | 2 +- gdb/xcoffread.c | 2 +- 35 files changed, 70 insertions(+), 92 deletions(-) delete mode 100644 gdb/common/gdb_stat.h diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 2f2bb92bdac..a1d0a3ca7cf 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,40 @@ +2013-11-18 Tom Tromey + + * 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 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index 28daa248415..417232c26e2 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -43,7 +43,7 @@ #include "gdb_obstack.h" #include "ada-lang.h" #include "completer.h" -#include "gdb_stat.h" +#include #ifdef UI_OUT #include "ui-out.h" #endif diff --git a/gdb/common/filestuff.c b/gdb/common/filestuff.c index bbb60a7dcaa..2792d59fd8b 100644 --- a/gdb/common/filestuff.c +++ b/gdb/common/filestuff.c @@ -29,7 +29,7 @@ #include #include #include -#include "gdb_stat.h" +#include #ifdef USE_WIN32API #include diff --git a/gdb/common/gdb_stat.h b/gdb/common/gdb_stat.h deleted file mode 100644 index 3e3c9819471..00000000000 --- a/gdb/common/gdb_stat.h +++ /dev/null @@ -1,59 +0,0 @@ -/* Portable - 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 . */ - -#if !defined(GDB_STAT_H) -#define GDB_STAT_H - -#include -#include - -#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) */ diff --git a/gdb/common/linux-osdata.c b/gdb/common/linux-osdata.c index 0ff10c66eb3..90da8995a66 100644 --- a/gdb/common/linux-osdata.c +++ b/gdb/common/linux-osdata.c @@ -43,7 +43,7 @@ #include "buffer.h" #include "gdb_assert.h" #include -#include "gdb_stat.h" +#include #include "filestuff.h" #define NAMELEN(dirent) strlen ((dirent)->d_name) diff --git a/gdb/corefile.c b/gdb/corefile.c index e82f9782c30..878ab3b3900 100644 --- a/gdb/corefile.c +++ b/gdb/corefile.c @@ -30,7 +30,7 @@ #include "target.h" #include "gdbcore.h" #include "dis-asm.h" -#include "gdb_stat.h" +#include #include "completer.h" #include "exceptions.h" #include "observer.h" diff --git a/gdb/ctf.c b/gdb/ctf.c index 23ee36d440a..ba8190e1506 100644 --- 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 #include "exec.h" #include "completer.h" diff --git a/gdb/darwin-nat.c b/gdb/darwin-nat.c index a9157dbf069..f0f938d260a 100644 --- a/gdb/darwin-nat.c +++ b/gdb/darwin-nat.c @@ -32,7 +32,7 @@ #include "regcache.h" #include "event-top.h" #include "inf-loop.h" -#include "gdb_stat.h" +#include #include "exceptions.h" #include "inf-child.h" #include "value.h" diff --git a/gdb/dbxread.c b/gdb/dbxread.c index 67deeec5d6a..a810f42bab0 100644 --- a/gdb/dbxread.c +++ b/gdb/dbxread.c @@ -39,7 +39,7 @@ #endif #include "gdb_obstack.h" -#include "gdb_stat.h" +#include #include "symtab.h" #include "breakpoint.h" #include "target.h" diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 5e8f94ed014..1c7dfc54fbc 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -56,7 +56,7 @@ #include "jv-lang.h" #include "psympriv.h" #include "exceptions.h" -#include "gdb_stat.h" +#include #include "completer.h" #include "vec.h" #include "c-lang.h" diff --git a/gdb/exec.c b/gdb/exec.c index afd32245de0..38d2edb01c0 100644 --- a/gdb/exec.c +++ b/gdb/exec.c @@ -42,7 +42,7 @@ #include "gdbcore.h" #include -#include "gdb_stat.h" +#include void (*deprecated_file_changed_hook) (char *); diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c index 799fcc99af7..6355fa83911 100644 --- a/gdb/gdbserver/linux-low.c +++ b/gdb/gdbserver/linux-low.c @@ -41,7 +41,7 @@ #include #include #include -#include "gdb_stat.h" +#include #include #include #include "filestuff.h" diff --git a/gdb/gdbserver/remote-utils.c b/gdb/gdbserver/remote-utils.c index 8e8a4d6f5f7..a48ca35a908 100644 --- a/gdb/gdbserver/remote-utils.c +++ b/gdb/gdbserver/remote-utils.c @@ -57,7 +57,7 @@ #if HAVE_ARPA_INET_H #include #endif -#include "gdb_stat.h" +#include #if HAVE_ERRNO_H #include #endif diff --git a/gdb/inf-child.c b/gdb/inf-child.c index 36fa81d4e3a..3db09c9e3ac 100644 --- a/gdb/inf-child.c +++ b/gdb/inf-child.c @@ -25,7 +25,7 @@ #include "target.h" #include "inferior.h" #include -#include "gdb_stat.h" +#include #include "inf-child.h" #include "gdb/fileio.h" #include "agent.h" diff --git a/gdb/jit.c b/gdb/jit.c index 3daa9faa0fc..fde79e57df3 100644 --- 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 #include "exceptions.h" #include "gdb_bfd.h" diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c index e9613acb09d..d2091caf91a 100644 --- a/gdb/linux-nat.c +++ b/gdb/linux-nat.c @@ -47,7 +47,7 @@ #include "gdbcore.h" /* for get_exec_file */ #include /* for isdigit */ #include "gdbthread.h" /* for struct thread_info etc. */ -#include "gdb_stat.h" /* for struct stat */ +#include /* for struct stat */ #include /* for O_RDONLY */ #include "inf-loop.h" #include "event-loop.h" diff --git a/gdb/m68klinux-nat.c b/gdb/m68klinux-nat.c index 59511e4aa89..f43d475db11 100644 --- a/gdb/m68klinux-nat.c +++ b/gdb/m68klinux-nat.c @@ -42,7 +42,7 @@ #endif #include -#include "gdb_stat.h" +#include #include "floatformat.h" diff --git a/gdb/main.c b/gdb/main.c index d5c9e39df7b..08f46f00168 100644 --- a/gdb/main.c +++ b/gdb/main.c @@ -28,7 +28,7 @@ #include "getopt.h" #include -#include "gdb_stat.h" +#include #include #include diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c index 99a029ed904..bbeea12f74b 100644 --- a/gdb/mdebugread.c +++ b/gdb/mdebugread.c @@ -55,7 +55,7 @@ #include "block.h" #include "dictionary.h" #include "mdebugread.h" -#include "gdb_stat.h" +#include #include #include "psympriv.h" #include "source.h" diff --git a/gdb/mi/mi-cmd-env.c b/gdb/mi/mi-cmd-env.c index f1589e5be7d..ca196f6d352 100644 --- a/gdb/mi/mi-cmd-env.c +++ b/gdb/mi/mi-cmd-env.c @@ -32,7 +32,7 @@ #include "top.h" #include -#include "gdb_stat.h" +#include static void env_mod_path (char *dirname, char **which_path); diff --git a/gdb/nto-tdep.c b/gdb/nto-tdep.c index 91f3928f556..674d572557f 100644 --- a/gdb/nto-tdep.c +++ b/gdb/nto-tdep.c @@ -20,7 +20,7 @@ along with this program. If not, see . */ #include "defs.h" -#include "gdb_stat.h" +#include #include #include "nto-tdep.h" #include "top.h" diff --git a/gdb/objfiles.c b/gdb/objfiles.c index f669e30d2f9..ba930fa31c0 100644 --- a/gdb/objfiles.c +++ b/gdb/objfiles.c @@ -35,7 +35,7 @@ #include "gdb_assert.h" #include -#include "gdb_stat.h" +#include #include #include "gdb_obstack.h" #include diff --git a/gdb/procfs.c b/gdb/procfs.c index 7a2aeb8a43e..ef9bb3de40a 100644 --- a/gdb/procfs.c +++ b/gdb/procfs.c @@ -94,7 +94,7 @@ #include /* for O_RDONLY */ #include /* for "X_OK" */ -#include "gdb_stat.h" /* for struct stat */ +#include /* for struct stat */ /* Note: procfs-utils.h must be included after the above system header files, because it redefines various system calls using macros. diff --git a/gdb/remote-fileio.c b/gdb/remote-fileio.c index bf790686e73..c6e7ece679e 100644 --- a/gdb/remote-fileio.c +++ b/gdb/remote-fileio.c @@ -25,7 +25,7 @@ #include "remote.h" #include "gdb/fileio.h" #include "gdb_wait.h" -#include "gdb_stat.h" +#include #include "exceptions.h" #include "remote-fileio.h" #include "event-loop.h" diff --git a/gdb/remote-mips.c b/gdb/remote-mips.c index 14c494f67d7..e4e508341cc 100644 --- a/gdb/remote-mips.c +++ b/gdb/remote-mips.c @@ -30,7 +30,7 @@ #include "target.h" #include "exceptions.h" #include -#include "gdb_stat.h" +#include #include "gdb_usleep.h" #include "regcache.h" #include diff --git a/gdb/remote.c b/gdb/remote.c index bbd9061a317..186c058f334 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -60,7 +60,7 @@ #include "remote-fileio.h" #include "gdb/fileio.h" -#include "gdb_stat.h" +#include #include "xml-support.h" #include "memory-map.h" diff --git a/gdb/rs6000-nat.c b/gdb/rs6000-nat.c index fc9889cd488..d0ec0c733e7 100644 --- a/gdb/rs6000-nat.c +++ b/gdb/rs6000-nat.c @@ -50,7 +50,7 @@ #include #include -#include "gdb_stat.h" +#include #include "gdb_bfd.h" #include #define __LDINFO_PTRACE32__ /* for __ld_info32 */ diff --git a/gdb/sol-thread.c b/gdb/sol-thread.c index ec1245b3cc7..b480b58df68 100644 --- a/gdb/sol-thread.c +++ b/gdb/sol-thread.c @@ -56,7 +56,7 @@ #include "target.h" #include "inferior.h" #include -#include "gdb_stat.h" +#include #include #include "gdbcmd.h" #include "gdbcore.h" diff --git a/gdb/solib-spu.c b/gdb/solib-spu.c index 590baba8377..c12324cbcb5 100644 --- a/gdb/solib-spu.c +++ b/gdb/solib-spu.c @@ -23,7 +23,7 @@ #include "gdbcore.h" #include #include "gdb_assert.h" -#include "gdb_stat.h" +#include #include "arch-utils.h" #include "bfd.h" #include "symtab.h" diff --git a/gdb/source.c b/gdb/source.c index f89f534f221..09595850029 100644 --- a/gdb/source.c +++ b/gdb/source.c @@ -31,7 +31,7 @@ #include #include -#include "gdb_stat.h" +#include #include #include "gdbcore.h" #include "gdb_regex.h" diff --git a/gdb/symfile.c b/gdb/symfile.c index 0c8713a9021..59d0583acf2 100644 --- a/gdb/symfile.c +++ b/gdb/symfile.c @@ -62,7 +62,7 @@ #include #include #include -#include "gdb_stat.h" +#include #include #include #include diff --git a/gdb/symmisc.c b/gdb/symmisc.c index f4c3fc51af0..ec21c6c456c 100644 --- a/gdb/symmisc.c +++ b/gdb/symmisc.c @@ -32,7 +32,7 @@ #include "bcache.h" #include "block.h" #include "gdb_regex.h" -#include "gdb_stat.h" +#include #include "dictionary.h" #include "typeprint.h" #include "gdbcmd.h" diff --git a/gdb/symtab.c b/gdb/symtab.c index 6bb0bbc372f..8fac0be9ef0 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -51,7 +51,7 @@ #include #include #include -#include "gdb_stat.h" +#include #include #include "cp-abi.h" #include "cp-support.h" diff --git a/gdb/top.c b/gdb/top.c index 8b389c57934..72a286b4230 100644 --- a/gdb/top.c +++ b/gdb/top.c @@ -61,7 +61,7 @@ #include "event-top.h" #include -#include "gdb_stat.h" +#include #include #include "ui-out.h" #include "cli-out.h" diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c index c741fb4560f..2fba510acf8 100644 --- a/gdb/xcoffread.c +++ b/gdb/xcoffread.c @@ -29,7 +29,7 @@ #ifdef HAVE_SYS_FILE_H #include #endif -#include "gdb_stat.h" +#include #include "coff/internal.h" #include "libcoff.h" /* FIXME, internal data from BFD */ -- 2.30.2