From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10255 invoked by alias); 22 Feb 2006 05:33:02 -0000 Received: (qmail 10244 invoked by uid 22791); 22 Feb 2006 05:32:59 -0000 X-Spam-Check-By: sourceware.org Received: from out4.smtp.messagingengine.com (HELO out4.smtp.messagingengine.com) (66.111.4.28) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 22 Feb 2006 05:32:57 +0000 Received: from frontend1.internal (mysql-sessions.internal [10.202.2.149]) by frontend1.messagingengine.com (Postfix) with ESMTP id 7374DD362DC for ; Wed, 22 Feb 2006 00:32:43 -0500 (EST) Received: from frontend2.messagingengine.com ([10.202.2.151]) by frontend1.internal (MEProxy); Wed, 22 Feb 2006 00:32:43 -0500 Received: from [127.0.0.1] (user-0c6sj7r.cable.mindspring.com [24.110.76.251]) by frontend2.messagingengine.com (Postfix) with ESMTP id 3854C58A095; Wed, 22 Feb 2006 00:32:42 -0500 (EST) Message-ID: <43FBF706.9030604@cwilson.fastmail.fm> Date: Wed, 22 Feb 2006 05:52:00 -0000 From: Charles Wilson User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 CC: gdb-patches@sourceware.org Subject: Re: RFA: ensure binary objects opened in binary mode References: <43F6473F.8030508@cwilson.fastmail.fm> <20060217234141.GA1918@trixie.casa.cgf.cx> <200602181118.k1IBIwNC028708@elgar.sibelius.xs4all.nl> In-Reply-To: Content-Type: multipart/mixed; boundary="------------060206020609000005040108" Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-02/txt/msg00416.txt.bz2 This is a multi-part message in MIME format. --------------060206020609000005040108 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 9336 Eli Zaretskii wrote: >> Date: Sat, 18 Feb 2006 12:18:58 +0100 (CET) >> From: Mark Kettenis >> CC: gdb-patches@sourceware.org, cygwin@cwilson.fastmail.fm >> >>> Agreed. I think defs.h is a good place, do you agree? >>> >> Problem is that right now defs.h doesn't include (where I >> expect O_BINARY to be defined on systems that have it). So we should >> move that into fcntl.h as well > > You mean, include from defs.h, right? If so, I agree. Okay, I've attached two patches that hopefully address all the issues raised in this thread. Both are against gdb-6.4.50-20060131 but should apply cleanly to HEAD. The first one is all that is *strictly* necessary to correct the bug: defs.h | 8 ++++++++ solib.c | 13 ++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) ChangeLog (patch 1): 2006-02-21 Charles Wilson * gdb/defs.h: unconditionally include , and ensure that O_BINARY is defined. * gdb/solib.c(solib_open): ensure solib files are opened in binary mode. Remove . I believe this patch still counts as "trivial" by FSF guidelines: 4 non-blank/non-comment line additions to defs.h and 7 non-blank line changes to solib.c (and six of those are identical). However... +++++++++++++++++++++++++++++++++++++ The second patch does the following (filenames below are relative to the src/gdb/ directory): =============== (1) for every file that #includes both defs.h AND , remove the inclusion. This is a one-line change to each of the following 48 files: auxv.c inflow.c rs6000-nat.c bsd-kvm.c inftarg.c ser-pipe.c cli/cli-cmds.c linux-nat.c ser-unix.c core-regset.c m68klinux-nat.c sol-thread.c corefile.c nto-procfs.c solib-aix5.c corelow.c objfiles.c solib-sunos.c dbxread.c ocd.c source.c dwarf2read.c ppc-bdm.c symfile.c dwarfread.c ppc-linux-nat.c symtab.c exec.c proc-api.c tui/tui-hooks.c gdbtk/generic/gdbtk-cmds.c procfs.c tui/tui-io.c gdbtk/generic/gdbtk-hooks.c remote-fileio.c tui/tui.c gdbtk/generic/gdbtk.c remote-rdp.c uw-thread.c go32-nat.c remote-sds.c win32-nat.c hpux-thread.c remote-sim.c wince.c i386v-nat.c remote.c xcoffread.c These changes were automatically performed using the following silly script, executed from the src/gdb directory: #!/bin/bash ## execute from src/gdb directory ## (for fn in `find . -type f | xargs grep -l fcntl.h` ; do grep -l defs.h $fn; done) |\ sed -e '/ChangeLog/d' -e '/Makefile/d' -e '/configure/d' |\ (while read LN ; do echo "Fixing ${LN}" cat "${LN}" | sed -e '/#include .*/d' > "${LN}.new" if [ -e "${LN}.new" ] ; then mv "${LN}" "${LN}.old" mv "${LN}.new" "${LN}" fi done) find . -name "*.old" | xargs rm -f =============== (2) Further, for every file that contains the #ifndef...#define O_BINARY...#endif stanza (all of which #include defs.h), that stanza is removed (3 line change to each of 5 files) corelow.c exec.c remote-rdp.c source.c symfile.c These changes, too, were done via the following silly script executed from the src/gdb directory: #!/bin/bash ## execute from src/gdb directory. ## ## note: the line which begins with /^#ifndef should have no ## linebreaks until the $/d Plus, in that line there is no ## whitespace between ]* and define[ ] ## Finally, each [ ] in that line contains a space and a tab. for fn in corelow.c exec.c remote-rdp.c source.c symfile.c ; do echo "Fixing ${fn}" cat "${fn}" | sed -e ': more $!N s/\n/&/2; t enough $!b more : enough /^#ifndef[ ]\+O_BINARY[ ]*[^\n]*\n#[ ]* define[ ]\+O_BINARY[ ]*[^\n]*\n#endif[ ]*$/d P;D' > "${fn}.new" if [ -e "${fn}.new" ] ; then mv "${fn}" "${fn}.old" mv "${fn}.new" "${fn}" fi done find . -name "*.old" | xargs rm -f =============== My point: while the concept in the second patch is extremely simple (so simple that a pair of automated scripts can create it), it still ends up modifying 48 different files, deleting 1 (or 4) lines from each. I'm not sure that the FSF guidelines permit you to accept that patch from me, as I do not have an assignment on file for the gdb project. This second patch is trivial in concept and obvious in implementation, but changes a LOT more than a dozen lines. However, I release the two scripts above to the public domain, and they can be used by anyone for any purpose. Have fun. auxv.c | 1 - bsd-kvm.c | 1 - cli/cli-cmds.c | 1 - core-regset.c | 1 - corefile.c | 1 - corelow.c | 4 ---- dbxread.c | 1 - dwarf2read.c | 1 - dwarfread.c | 1 - exec.c | 4 ---- gdbtk/generic/gdbtk-cmds.c | 1 - gdbtk/generic/gdbtk-hooks.c | 1 - gdbtk/generic/gdbtk.c | 1 - go32-nat.c | 1 - hpux-thread.c | 1 - i386v-nat.c | 1 - inflow.c | 1 - inftarg.c | 1 - linux-nat.c | 1 - m68klinux-nat.c | 1 - nto-procfs.c | 1 - objfiles.c | 1 - ocd.c | 1 - ppc-bdm.c | 1 - ppc-linux-nat.c | 1 - proc-api.c | 1 - procfs.c | 1 - remote-fileio.c | 1 - remote-rdp.c | 4 ---- remote-sds.c | 1 - remote-sim.c | 1 - remote.c | 1 - rs6000-nat.c | 1 - ser-pipe.c | 1 - ser-unix.c | 1 - sol-thread.c | 1 - solib-aix5.c | 1 - solib-sunos.c | 1 - source.c | 4 ---- symfile.c | 4 ---- symtab.c | 1 - tui/tui-hooks.c | 1 - tui/tui-io.c | 1 - tui/tui.c | 1 - uw-thread.c | 1 - win32-nat.c | 1 - wince.c | 1 - xcoffread.c | 1 - 48 files changed, 63 deletions(-) 2006-02-21 Charles Wilson * gdb/auxv.c: Remove * gdb/bsd-kvm.c: Remove * gdb/cli/cli-cmds.c: Remove * gdb/core-regset.c: Remove * gdb/corefile.c: Remove * gdb/corelow.c: Remove . Remove O_BINARY macro definition. * gdb/dbxread.c: Remove * gdb/dwarf2read.c: Remove * gdb/dwarfread.c: Remove * gdb/exec.c: Remove . Remove O_BINARY macro definition * gdb/gdbtk/generic/gdbtk-cmds.c: Remove * gdb/gdbtk/generic/gdbtk-hooks.c: Remove * gdb/gdbtk/generic/gdbtk.c: Remove * gdb/go32-nat.c: Remove * gdb/hpux-thread.c: Remove * gdb/i386v-nat.c: Remove * gdb/inflow.c: Remove * gdb/inftarg.c: Remove * gdb/linux-nat.c: Remove * gdb/m68klinux-nat.c: Remove * gdb/nto-procfs.c: Remove * gdb/objfiles.c: Remove * gdb/ocd.c: Remove * gdb/ppc-bdm.c: Remove * gdb/ppc-linux-nat.c: Remove * gdb/proc-api.c: Remove * gdb/procfs.c: Remove * gdb/remote-fileio.c: Remove * gdb/remote-rdp.c: Remove . Remove O_BINARY macro definition * gdb/remote-sds.c: Remove * gdb/remote-sim.c: Remove * gdb/remote.c: Remove * gdb/rs6000-nat.c: Remove * gdb/ser-pipe.c: Remove * gdb/ser-unix.c: Remove * gdb/sol-thread.c: Remove * gdb/solib-aix5.c: Remove * gdb/solib-sunos.c: Remove * gdb/source.c: Remove . Remove O_BINARY macro definition * gdb/symfile.c: Remove . Remove O_BINARY macro definition * gdb/symtab.c: Remove * gdb/tui/tui-hooks.c: Remove * gdb/tui/tui-io.c: Remove * gdb/tui/tui.c: Remove * gdb/uw-thread.c: Remove * gdb/win32-nat.c: Remove * gdb/wince.c: Remove * gdb/xcoffread.c: Remove NOTE: the following 9 files all #include but do NOT #include defs.h -- so I didn't (and the scripts do not) modify them. None of these 9 files use the O_BINARY symbol, either. gdb/terminal.h gdb/gdbserver/gdbreplay.c gdb/gdbserver/linux-low.c gdb/gdbserver/remote-utils.c gdb/gdbserver/terminal.h gdb/testsuite/gdb.base/bigcore.c gdb/testsuite/gdb.base/coremaker.c gdb/testsuite/gdb.base/fileio.c gdb/testsuite/gdb.hp/gdb.base-hp/genso-thresh.c -- Chuck --------------060206020609000005040108 Content-Type: text/plain; name="gdb-6.4.50.20060131-cvs.solib.patch-attempt2-part1" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="gdb-6.4.50.20060131-cvs.solib.patch-attempt2-part1" Content-length: 3190 Index: defs.h =================================================================== RCS file: /cvs/src/src/gdb/defs.h,v retrieving revision 1.190 diff -u -r1.190 defs.h --- defs.h 17 Dec 2005 22:33:59 -0000 1.190 +++ defs.h 21 Feb 2006 02:08:39 -0000 @@ -39,6 +39,8 @@ #include #endif +#include + /* First include ansidecl.h so we can use the various macro definitions here and in all subsequent file inclusions. */ @@ -58,6 +60,12 @@ #define SEEK_CUR 1 #endif +/* In case this is not defined in fcntl.h */ + +#ifndef O_BINARY +#define O_BINARY 0 +#endif + #include /* For va_list. */ #include "libiberty.h" Index: solib.c =================================================================== RCS file: /cvs/src/src/gdb/solib.c,v retrieving revision 1.83 diff -u -r1.83 solib.c --- solib.c 21 Jan 2006 22:23:27 -0000 1.83 +++ solib.c 21 Feb 2006 02:08:47 -0000 @@ -24,7 +24,6 @@ #include "defs.h" #include -#include #include "gdb_string.h" #include "symtab.h" #include "bfd.h" @@ -171,7 +170,7 @@ } /* Now see if we can open it. */ - found_file = open (temp_pathname, O_RDONLY, 0); + found_file = open (temp_pathname, O_RDONLY | O_BINARY, 0); } /* If the search in solib_absolute_prefix failed, and the path name is @@ -192,32 +191,32 @@ /* If not found, search the solib_search_path (if any). */ if (found_file < 0 && solib_search_path != NULL) found_file = openp (solib_search_path, OPF_TRY_CWD_FIRST, - in_pathname, O_RDONLY, 0, &temp_pathname); + in_pathname, O_RDONLY | O_BINARY, 0, &temp_pathname); /* If not found, next search the solib_search_path (if any) for the basename only (ignoring the path). This is to allow reading solibs from a path that differs from the opened path. */ if (found_file < 0 && solib_search_path != NULL) found_file = openp (solib_search_path, OPF_TRY_CWD_FIRST, - lbasename (in_pathname), O_RDONLY, 0, + lbasename (in_pathname), O_RDONLY | O_BINARY, 0, &temp_pathname); /* If not found, try to use target supplied solib search method */ if (found_file < 0 && ops->find_and_open_solib) - found_file = ops->find_and_open_solib (in_pathname, O_RDONLY, + found_file = ops->find_and_open_solib (in_pathname, O_RDONLY | O_BINARY, &temp_pathname); /* If not found, next search the inferior's $PATH environment variable. */ if (found_file < 0 && solib_absolute_prefix == NULL) found_file = openp (get_in_environ (inferior_environ, "PATH"), - OPF_TRY_CWD_FIRST, in_pathname, O_RDONLY, 0, + OPF_TRY_CWD_FIRST, in_pathname, O_RDONLY | O_BINARY, 0, &temp_pathname); /* If not found, next search the inferior's $LD_LIBRARY_PATH environment variable. */ if (found_file < 0 && solib_absolute_prefix == NULL) found_file = openp (get_in_environ (inferior_environ, "LD_LIBRARY_PATH"), - OPF_TRY_CWD_FIRST, in_pathname, O_RDONLY, 0, + OPF_TRY_CWD_FIRST, in_pathname, O_RDONLY | O_BINARY, 0, &temp_pathname); /* Done. If not found, tough luck. Return found_file and --------------060206020609000005040108 Content-Type: text/plain; name="gdb-6.4.50.20060131-cvs.solib.patch-attempt2-part2" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="gdb-6.4.50.20060131-cvs.solib.patch-attempt2-part2" Content-length: 21856 Index: auxv.c =================================================================== RCS file: /cvs/src/src/gdb/auxv.c,v retrieving revision 1.5 diff -u -r1.5 auxv.c --- auxv.c 17 Dec 2005 22:33:59 -0000 1.5 +++ auxv.c 21 Feb 2006 02:08:36 -0000 @@ -31,7 +31,6 @@ #include "elf/common.h" #include -#include /* This function is called like a to_xfer_partial hook, Index: bsd-kvm.c =================================================================== RCS file: /cvs/src/src/gdb/bsd-kvm.c,v retrieving revision 1.16 diff -u -r1.16 bsd-kvm.c --- bsd-kvm.c 17 Dec 2005 22:33:59 -0000 1.16 +++ bsd-kvm.c 21 Feb 2006 02:08:36 -0000 @@ -29,7 +29,6 @@ #include "gdbcore.h" /* for get_exec_file */ #include "gdb_assert.h" -#include #include #ifdef HAVE_NLIST_H #include Index: core-regset.c =================================================================== RCS file: /cvs/src/src/gdb/core-regset.c,v retrieving revision 1.12 diff -u -r1.12 core-regset.c --- core-regset.c 17 Dec 2005 22:33:59 -0000 1.12 +++ core-regset.c 21 Feb 2006 02:08:39 -0000 @@ -35,7 +35,6 @@ #include "inferior.h" #include "target.h" -#include #include #include "gdb_string.h" #include Index: corefile.c =================================================================== RCS file: /cvs/src/src/gdb/corefile.c,v retrieving revision 1.37 diff -u -r1.37 corefile.c --- corefile.c 10 Jan 2006 23:01:44 -0000 1.37 +++ corefile.c 21 Feb 2006 02:08:39 -0000 @@ -25,7 +25,6 @@ #include "gdb_string.h" #include #include -#include #include "inferior.h" #include "symtab.h" #include "command.h" Index: corelow.c =================================================================== RCS file: /cvs/src/src/gdb/corelow.c,v retrieving revision 1.54 diff -u -r1.54 corelow.c --- corelow.c 24 Jan 2006 22:34:34 -0000 1.54 +++ corelow.c 21 Feb 2006 02:08:39 -0000 @@ -26,7 +26,6 @@ #include "gdb_string.h" #include #include -#include #ifdef HAVE_SYS_FILE_H #include /* needed for F_OK and friends */ #endif @@ -47,9 +46,6 @@ #include "exceptions.h" #include "solib.h" -#ifndef O_BINARY -#define O_BINARY 0 -#endif #ifndef O_LARGEFILE #define O_LARGEFILE 0 Index: dbxread.c =================================================================== RCS file: /cvs/src/src/gdb/dbxread.c,v retrieving revision 1.81 diff -u -r1.81 dbxread.c --- dbxread.c 17 Dec 2005 22:33:59 -0000 1.81 +++ dbxread.c 21 Feb 2006 02:08:39 -0000 @@ -39,7 +39,6 @@ #if defined(__CYGNUSCLIB__) #include -#include #endif #include "gdb_obstack.h" Index: dwarf2read.c =================================================================== RCS file: /cvs/src/src/gdb/dwarf2read.c,v retrieving revision 1.191 diff -u -r1.191 dwarf2read.c --- dwarf2read.c 17 Jan 2006 22:30:29 -0000 1.191 +++ dwarf2read.c 21 Feb 2006 02:08:40 -0000 @@ -49,7 +49,6 @@ #include "command.h" #include "gdbcmd.h" -#include #include "gdb_string.h" #include "gdb_assert.h" #include Index: dwarfread.c =================================================================== RCS file: /cvs/src/src/gdb/dwarfread.c,v retrieving revision 1.45 diff -u -r1.45 dwarfread.c --- dwarfread.c 17 Dec 2005 22:33:59 -0000 1.45 +++ dwarfread.c 21 Feb 2006 02:08:40 -0000 @@ -122,7 +122,6 @@ #include "language.h" #include "complaints.h" -#include #include "gdb_string.h" /* Some macros to provide DIE info for complaints. */ Index: exec.c =================================================================== RCS file: /cvs/src/src/gdb/exec.c,v retrieving revision 1.59 diff -u -r1.59 exec.c --- exec.c 17 Dec 2005 22:33:59 -0000 1.59 +++ exec.c 21 Feb 2006 02:08:41 -0000 @@ -34,7 +34,6 @@ #include "exec.h" #include "observer.h" -#include #include "readline/readline.h" #include "gdb_string.h" @@ -42,9 +41,6 @@ #include #include "gdb_stat.h" -#ifndef O_BINARY -#define O_BINARY 0 -#endif #include "xcoffsolib.h" Index: go32-nat.c =================================================================== RCS file: /cvs/src/src/gdb/go32-nat.c,v retrieving revision 1.48 diff -u -r1.48 go32-nat.c --- go32-nat.c 24 Jan 2006 22:09:28 -0000 1.48 +++ go32-nat.c 21 Feb 2006 02:08:41 -0000 @@ -20,7 +20,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include #include "defs.h" #include "inferior.h" Index: hpux-thread.c =================================================================== RCS file: /cvs/src/src/gdb/hpux-thread.c,v retrieving revision 1.32 diff -u -r1.32 hpux-thread.c --- hpux-thread.c 17 Dec 2005 22:34:01 -0000 1.32 +++ hpux-thread.c 21 Feb 2006 02:08:41 -0000 @@ -43,7 +43,6 @@ #include "target.h" #include "inferior.h" #include "regcache.h" -#include #include #include "gdb_stat.h" #include "gdbcore.h" Index: i386v-nat.c =================================================================== RCS file: /cvs/src/src/gdb/i386v-nat.c,v retrieving revision 1.16 diff -u -r1.16 i386v-nat.c --- i386v-nat.c 17 Dec 2005 22:34:01 -0000 1.16 +++ i386v-nat.c 21 Feb 2006 02:08:41 -0000 @@ -40,7 +40,6 @@ #include #include #include -#include #ifdef TARGET_HAS_HARDWARE_WATCHPOINTS #include Index: inflow.c =================================================================== RCS file: /cvs/src/src/gdb/inflow.c,v retrieving revision 1.31 diff -u -r1.31 inflow.c --- inflow.c 17 Dec 2005 22:34:01 -0000 1.31 +++ inflow.c 21 Feb 2006 02:08:41 -0000 @@ -31,7 +31,6 @@ #include "gdb_string.h" #include -#include #ifdef HAVE_SYS_SELECT_H #include #endif Index: inftarg.c =================================================================== RCS file: /cvs/src/src/gdb/inftarg.c,v retrieving revision 1.47 diff -u -r1.47 inftarg.c --- inftarg.c 24 Jan 2006 22:34:34 -0000 1.47 +++ inftarg.c 21 Feb 2006 02:08:42 -0000 @@ -33,7 +33,6 @@ #include "gdb_stat.h" #include #include -#include #include "gdb_wait.h" #include "inflow.h" Index: linux-nat.c =================================================================== RCS file: /cvs/src/src/gdb/linux-nat.c,v retrieving revision 1.36 diff -u -r1.36 linux-nat.c --- linux-nat.c 4 Jan 2006 19:34:58 -0000 1.36 +++ linux-nat.c 21 Feb 2006 02:08:42 -0000 @@ -45,7 +45,6 @@ #include /* for isdigit */ #include "gdbthread.h" /* for struct thread_info etc. */ #include "gdb_stat.h" /* for struct stat */ -#include /* for O_RDONLY */ #ifndef O_LARGEFILE #define O_LARGEFILE 0 Index: m68klinux-nat.c =================================================================== RCS file: /cvs/src/src/gdb/m68klinux-nat.c,v retrieving revision 1.30 diff -u -r1.30 m68klinux-nat.c --- m68klinux-nat.c 17 Dec 2005 22:34:01 -0000 1.30 +++ m68klinux-nat.c 21 Feb 2006 02:08:42 -0000 @@ -38,7 +38,6 @@ #include #include #include -#include #include #ifdef HAVE_SYS_REG_H Index: nto-procfs.c =================================================================== RCS file: /cvs/src/src/gdb/nto-procfs.c,v retrieving revision 1.17 diff -u -r1.17 nto-procfs.c --- nto-procfs.c 24 Jan 2006 22:09:28 -0000 1.17 +++ nto-procfs.c 21 Feb 2006 02:08:42 -0000 @@ -24,7 +24,6 @@ #include "defs.h" -#include #include #include #include Index: objfiles.c =================================================================== RCS file: /cvs/src/src/gdb/objfiles.c,v retrieving revision 1.63 diff -u -r1.63 objfiles.c --- objfiles.c 6 Jan 2006 16:23:35 -0000 1.63 +++ objfiles.c 21 Feb 2006 02:08:42 -0000 @@ -37,7 +37,6 @@ #include "gdb_assert.h" #include #include "gdb_stat.h" -#include #include "gdb_obstack.h" #include "gdb_string.h" #include "hashtab.h" Index: ocd.c =================================================================== RCS file: /cvs/src/src/gdb/ocd.c,v retrieving revision 1.43 diff -u -r1.43 ocd.c --- ocd.c 24 Jan 2006 22:09:28 -0000 1.43 +++ ocd.c 21 Feb 2006 02:08:42 -0000 @@ -23,7 +23,6 @@ #include "defs.h" #include "gdbcore.h" #include "gdb_string.h" -#include #include "frame.h" #include "inferior.h" #include "bfd.h" Index: ppc-bdm.c =================================================================== RCS file: /cvs/src/src/gdb/ppc-bdm.c,v retrieving revision 1.28 diff -u -r1.28 ppc-bdm.c --- ppc-bdm.c 17 Dec 2005 22:34:01 -0000 1.28 +++ ppc-bdm.c 21 Feb 2006 02:08:42 -0000 @@ -23,7 +23,6 @@ #include "defs.h" #include "gdbcore.h" #include "gdb_string.h" -#include #include "frame.h" #include "inferior.h" #include "bfd.h" Index: ppc-linux-nat.c =================================================================== RCS file: /cvs/src/src/gdb/ppc-linux-nat.c,v retrieving revision 1.56 diff -u -r1.56 ppc-linux-nat.c --- ppc-linux-nat.c 17 Dec 2005 22:34:01 -0000 1.56 +++ ppc-linux-nat.c 21 Feb 2006 02:08:42 -0000 @@ -36,7 +36,6 @@ #include #include #include "gdb_wait.h" -#include #include #include Index: proc-api.c =================================================================== RCS file: /cvs/src/src/gdb/proc-api.c,v retrieving revision 1.25 diff -u -r1.25 proc-api.c --- proc-api.c 17 Dec 2005 22:34:01 -0000 1.25 +++ proc-api.c 21 Feb 2006 02:08:43 -0000 @@ -45,7 +45,6 @@ #ifdef HAVE_SYS_USER_H #include /* for struct user */ #endif -#include /* for O_RDWR etc. */ #include "gdb_wait.h" #include "proc-utils.h" Index: procfs.c =================================================================== RCS file: /cvs/src/src/gdb/procfs.c,v retrieving revision 1.68 diff -u -r1.68 procfs.c --- procfs.c 24 Jan 2006 22:09:28 -0000 1.68 +++ procfs.c 21 Feb 2006 02:08:45 -0000 @@ -93,7 +93,6 @@ #include "gdb_dirent.h" /* opendir/readdir, for listing the LWP's */ #endif -#include /* for O_RDONLY */ #include /* for "X_OK" */ #include "gdb_stat.h" /* for struct stat */ Index: remote-fileio.c =================================================================== RCS file: /cvs/src/src/gdb/remote-fileio.c,v retrieving revision 1.17 diff -u -r1.17 remote-fileio.c --- remote-fileio.c 17 Jan 2006 14:47:31 -0000 1.17 +++ remote-fileio.c 21 Feb 2006 02:08:45 -0000 @@ -31,7 +31,6 @@ #include "exceptions.h" #include "remote-fileio.h" -#include #include #ifdef __CYGWIN__ #include /* For cygwin_conv_to_full_posix_path. */ Index: remote-rdp.c =================================================================== RCS file: /cvs/src/src/gdb/remote-rdp.c,v retrieving revision 1.47 diff -u -r1.47 remote-rdp.c --- remote-rdp.c 24 Jan 2006 22:09:28 -0000 1.47 +++ remote-rdp.c 21 Feb 2006 02:08:45 -0000 @@ -44,7 +44,6 @@ #include "gdb/callback.h" #include "command.h" #include -#include #include "symfile.h" #include "remote-utils.h" #include "gdb_string.h" @@ -791,9 +790,6 @@ #define SWI_GenerateError 0x71 -#ifndef O_BINARY -#define O_BINARY 0 -#endif static int translate_open_mode[] = { Index: remote-sds.c =================================================================== RCS file: /cvs/src/src/gdb/remote-sds.c,v retrieving revision 1.42 diff -u -r1.42 remote-sds.c --- remote-sds.c 24 Jan 2006 22:09:28 -0000 1.42 +++ remote-sds.c 21 Feb 2006 02:08:45 -0000 @@ -27,7 +27,6 @@ #include "defs.h" #include "gdb_string.h" -#include #include "frame.h" #include "inferior.h" #include "exceptions.h" Index: remote-sim.c =================================================================== RCS file: /cvs/src/src/gdb/remote-sim.c,v retrieving revision 1.52 diff -u -r1.52 remote-sim.c --- remote-sim.c 24 Jan 2006 22:09:28 -0000 1.52 +++ remote-sim.c 21 Feb 2006 02:08:45 -0000 @@ -28,7 +28,6 @@ #include "value.h" #include "gdb_string.h" #include -#include #include #include #include Index: remote.c =================================================================== RCS file: /cvs/src/src/gdb/remote.c,v retrieving revision 1.200 diff -u -r1.200 remote.c --- remote.c 24 Jan 2006 22:34:34 -0000 1.200 +++ remote.c 21 Feb 2006 02:08:45 -0000 @@ -26,7 +26,6 @@ #include "defs.h" #include "gdb_string.h" #include -#include #include "inferior.h" #include "bfd.h" #include "symfile.h" Index: rs6000-nat.c =================================================================== RCS file: /cvs/src/src/gdb/rs6000-nat.c,v retrieving revision 1.60 diff -u -r1.60 rs6000-nat.c --- rs6000-nat.c 17 Dec 2005 22:34:02 -0000 1.60 +++ rs6000-nat.c 21 Feb 2006 02:08:46 -0000 @@ -45,7 +45,6 @@ #include #include #include -#include #include #include Index: ser-pipe.c =================================================================== RCS file: /cvs/src/src/gdb/ser-pipe.c,v retrieving revision 1.17 diff -u -r1.17 ser-pipe.c --- ser-pipe.c 17 Dec 2005 22:34:02 -0000 1.17 +++ ser-pipe.c 21 Feb 2006 02:08:46 -0000 @@ -30,7 +30,6 @@ #include #include #include -#include #include "gdb_string.h" #include Index: ser-unix.c =================================================================== RCS file: /cvs/src/src/gdb/ser-unix.c,v retrieving revision 1.26 diff -u -r1.26 ser-unix.c --- ser-unix.c 17 Dec 2005 22:34:02 -0000 1.26 +++ ser-unix.c 21 Feb 2006 02:08:46 -0000 @@ -25,7 +25,6 @@ #include "ser-base.h" #include "ser-unix.h" -#include #include #include "terminal.h" #include Index: sol-thread.c =================================================================== RCS file: /cvs/src/src/gdb/sol-thread.c,v retrieving revision 1.51 diff -u -r1.51 sol-thread.c --- sol-thread.c 17 Dec 2005 22:34:02 -0000 1.51 +++ sol-thread.c 21 Feb 2006 02:08:46 -0000 @@ -58,7 +58,6 @@ #include "gdbthread.h" #include "target.h" #include "inferior.h" -#include #include "gdb_stat.h" #include #include "gdbcmd.h" Index: solib-aix5.c =================================================================== RCS file: /cvs/src/src/gdb/solib-aix5.c,v retrieving revision 1.18 diff -u -r1.18 solib-aix5.c --- solib-aix5.c 17 Dec 2005 22:34:02 -0000 1.18 +++ solib-aix5.c 21 Feb 2006 02:08:46 -0000 @@ -26,7 +26,6 @@ #include #include "gdb_string.h" #include -#include #include #include "elf/external.h" Index: solib-sunos.c =================================================================== RCS file: /cvs/src/src/gdb/solib-sunos.c,v retrieving revision 1.20 diff -u -r1.20 solib-sunos.c --- solib-sunos.c 17 Dec 2005 22:34:02 -0000 1.20 +++ solib-sunos.c 21 Feb 2006 02:08:46 -0000 @@ -26,7 +26,6 @@ #include #include "gdb_string.h" #include -#include /* SunOS shared libs need the nlist structure. */ #include Index: source.c =================================================================== RCS file: /cvs/src/src/gdb/source.c,v retrieving revision 1.72 diff -u -r1.72 source.c --- source.c 15 Jan 2006 19:09:30 -0000 1.72 +++ source.c 21 Feb 2006 02:08:47 -0000 @@ -33,7 +33,6 @@ #include #include "gdb_string.h" #include "gdb_stat.h" -#include #include "gdbcore.h" #include "gdb_regex.h" #include "symfile.h" @@ -46,9 +45,6 @@ #include "ui-out.h" #include "readline/readline.h" -#ifndef O_BINARY -#define O_BINARY 0 -#endif #define OPEN_MODE (O_RDONLY | O_BINARY) #define FDOPEN_MODE FOPEN_RB Index: symfile.c =================================================================== RCS file: /cvs/src/src/gdb/symfile.c,v retrieving revision 1.165 diff -u -r1.165 symfile.c --- symfile.c 15 Jan 2006 19:50:03 -0000 1.165 +++ symfile.c 21 Feb 2006 02:08:47 -0000 @@ -53,16 +53,12 @@ #include "exec.h" #include -#include #include "gdb_string.h" #include "gdb_stat.h" #include #include #include -#ifndef O_BINARY -#define O_BINARY 0 -#endif int (*deprecated_ui_load_progress_hook) (const char *section, unsigned long num); void (*deprecated_show_load_progress) (const char *section, Index: symtab.c =================================================================== RCS file: /cvs/src/src/gdb/symtab.c,v retrieving revision 1.146 diff -u -r1.146 symtab.c --- symtab.c 17 Dec 2005 22:34:03 -0000 1.146 +++ symtab.c 21 Feb 2006 02:08:48 -0000 @@ -50,7 +50,6 @@ #include "dictionary.h" #include -#include #include "gdb_string.h" #include "gdb_stat.h" #include Index: uw-thread.c =================================================================== RCS file: /cvs/src/src/gdb/uw-thread.c,v retrieving revision 1.14 diff -u -r1.14 uw-thread.c --- uw-thread.c 17 Dec 2005 22:34:03 -0000 1.14 +++ uw-thread.c 21 Feb 2006 02:08:48 -0000 @@ -102,7 +102,6 @@ #include "target.h" #include "inferior.h" #include "regcache.h" -#include /* includes , which requires boolean_t from , which doesn't typedef boolean_t with gcc. */ Index: win32-nat.c =================================================================== RCS file: /cvs/src/src/gdb/win32-nat.c,v retrieving revision 1.119 diff -u -r1.119 win32-nat.c --- win32-nat.c 24 Jan 2006 22:09:28 -0000 1.119 +++ win32-nat.c 21 Feb 2006 02:08:48 -0000 @@ -39,7 +39,6 @@ #include "top.h" #include #include -#include #include #include #include Index: wince.c =================================================================== RCS file: /cvs/src/src/gdb/wince.c,v retrieving revision 1.44 diff -u -r1.44 wince.c --- wince.c 24 Jan 2006 22:09:28 -0000 1.44 +++ wince.c 21 Feb 2006 02:08:48 -0000 @@ -39,7 +39,6 @@ #include "command.h" #include #include -#include #include #include Index: xcoffread.c =================================================================== RCS file: /cvs/src/src/gdb/xcoffread.c,v retrieving revision 1.48 diff -u -r1.48 xcoffread.c --- xcoffread.c 2 Jan 2006 04:31:57 -0000 1.48 +++ xcoffread.c 21 Feb 2006 02:08:49 -0000 @@ -26,7 +26,6 @@ #include "bfd.h" #include -#include #include #include "gdb_string.h" Index: cli/cli-cmds.c =================================================================== RCS file: /cvs/src/src/gdb/cli/cli-cmds.c,v retrieving revision 1.64 diff -u -r1.64 cli-cmds.c --- cli/cli-cmds.c 23 Jan 2006 16:28:37 -0000 1.64 +++ cli/cli-cmds.c 21 Feb 2006 02:08:51 -0000 @@ -51,7 +51,6 @@ #include "tui/tui.h" /* For tui_active et.al. */ #endif -#include /* Prototypes for local command functions */ Index: gdbtk/generic/gdbtk-cmds.c =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-cmds.c,v retrieving revision 1.91 diff -u -r1.91 gdbtk-cmds.c --- gdbtk/generic/gdbtk-cmds.c 23 Dec 2005 18:23:15 -0000 1.91 +++ gdbtk/generic/gdbtk-cmds.c 21 Feb 2006 02:08:55 -0000 @@ -55,7 +55,6 @@ #include "gdbtk-cmds.h" #include -#include #include #include #include Index: gdbtk/generic/gdbtk-hooks.c =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-hooks.c,v retrieving revision 1.41 diff -u -r1.41 gdbtk-hooks.c --- gdbtk/generic/gdbtk-hooks.c 23 Dec 2005 18:23:16 -0000 1.41 +++ gdbtk/generic/gdbtk-hooks.c 21 Feb 2006 02:08:55 -0000 @@ -50,7 +50,6 @@ #include "gdbtk.h" #include -#include #include #include Index: gdbtk/generic/gdbtk.c =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk.c,v retrieving revision 1.44 diff -u -r1.44 gdbtk.c --- gdbtk/generic/gdbtk.c 23 Dec 2005 18:23:16 -0000 1.44 +++ gdbtk/generic/gdbtk.c 21 Feb 2006 02:08:55 -0000 @@ -47,7 +47,6 @@ #include "guitcl.h" #include "gdbtk.h" -#include #include #include #include Index: tui/tui-hooks.c =================================================================== RCS file: /cvs/src/src/gdb/tui/tui-hooks.c,v retrieving revision 1.26 diff -u -r1.26 tui-hooks.c --- tui/tui-hooks.c 23 Dec 2005 19:10:02 -0000 1.26 +++ tui/tui-hooks.c 21 Feb 2006 02:09:11 -0000 @@ -36,7 +36,6 @@ #include "ui-out.h" #include "top.h" #include -#include #include "tui/tui.h" #include "tui/tui-hooks.h" Index: tui/tui-io.c =================================================================== RCS file: /cvs/src/src/gdb/tui/tui-io.c,v retrieving revision 1.13 diff -u -r1.13 tui-io.c --- tui/tui-io.c 23 Dec 2005 19:10:02 -0000 1.13 +++ tui/tui-io.c 21 Feb 2006 02:09:12 -0000 @@ -37,7 +37,6 @@ #include "tui/tui-file.h" #include "ui-out.h" #include "cli-out.h" -#include #include #include Index: tui/tui.c =================================================================== RCS file: /cvs/src/src/gdb/tui/tui.c,v retrieving revision 1.55 diff -u -r1.55 tui.c --- tui/tui.c 23 Dec 2005 19:10:03 -0000 1.55 +++ tui/tui.c 21 Feb 2006 02:09:12 -0000 @@ -45,7 +45,6 @@ #include #include #include -#include #if 0 #include #endif --------------060206020609000005040108--