This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[ob] #include fixes in remote-fileio.[hc]
- From: Andrew Cagney <ac131313 at redhat dot com>
- To: Corinna Vinschen <vinschen at redhat dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Tue, 10 Jun 2003 15:36:27 -0400
- Subject: [ob] #include fixes in remote-fileio.[hc]
Just FYI,
I checked in the attached. It makes remote-fileio's #includes more
portable, fixing a build problem *BSD. It also built on a Red Hat 7.2
system.
BTW, see attached for the ari warnings.
Andrew
2003-06-10 Andrew Cagney <cagney@redhat.com>
* remote-fileio.h (REMOTE_FILEIO_H): Replace FILEIO_H.
* Makefile.in (remote-fileio.o): Update dependencies.
* remote-fileio.c: Include "gdb_wait.h" and "gdb_stat.h". Do not
include <setjmp.h>, or <sys/types.h> conditional on USG.
(remote_fio_jmp_buf): Delete global variable.
Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.396
diff -u -r1.396 Makefile.in
--- Makefile.in 10 Jun 2003 14:37:02 -0000 1.396
+++ Makefile.in 10 Jun 2003 19:28:12 -0000
@@ -2155,7 +2155,8 @@
$(gdbthread_h) $(remote_h) $(regcache_h) $(value_h) $(gdb_assert_h) \
$(event_loop_h) $(event_top_h) $(inf_loop_h) $(serial_h) \
$(gdbcore_h) $(solib_h) $(remote-fileio_h)
-remote-fileio.o: remote-fileio.c $(defs_h) $(gdb_string_h) $(gdbcmd_h) $(remote_h)
+remote-fileio.o: remote-fileio.c $(defs_h) $(gdb_string_h) $(gdbcmd_h) \
+ $(remote_h) $(gdb_fileio_h) $(gdb_wait_h) $(gdb_stat_h)
rom68k-rom.o: rom68k-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
$(serial_h) $(regcache_h) $(value_h) $(m68k_tdep_h)
rs6000-nat.o: rs6000-nat.c $(defs_h) $(inferior_h) $(target_h) $(gdbcore_h) \
Index: remote-fileio.c
===================================================================
RCS file: /cvs/src/src/gdb/remote-fileio.c,v
retrieving revision 1.1
diff -u -r1.1 remote-fileio.c
--- remote-fileio.c 10 Jun 2003 14:37:04 -0000 1.1
+++ remote-fileio.c 10 Jun 2003 19:28:13 -0000
@@ -26,18 +26,14 @@
#include "gdbcmd.h"
#include "remote.h"
#include "gdb/fileio.h"
+#include "gdb_wait.h"
+#include "gdb_stat.h"
-#include <ctype.h>
#include <fcntl.h>
#include <sys/time.h>
-#ifdef USG
-#include <sys/types.h>
-#endif
-#include <sys/stat.h>
#ifdef __CYGWIN__
-#include <sys/cygwin.h>
+#include <sys/cygwin.h> /* For cygwin_conv_to_full_posix_path. */
#endif
-#include <setjmp.h>
#include <signal.h>
static struct {
@@ -428,7 +424,6 @@
static int remote_fio_ctrl_c_flag = 0;
static int remote_fio_no_longjmp = 0;
-jmp_buf remote_fio_jmp_buf;
#if defined (HAVE_SIGACTION) && defined (SA_RESTART)
static struct sigaction remote_fio_sa;
Index: remote-fileio.h
===================================================================
RCS file: /cvs/src/src/gdb/remote-fileio.h,v
retrieving revision 1.1
diff -u -r1.1 remote-fileio.h
--- remote-fileio.h 10 Jun 2003 14:37:04 -0000 1.1
+++ remote-fileio.h 10 Jun 2003 19:28:13 -0000
@@ -21,8 +21,8 @@
/* See the GDB User Guide for details of the GDB remote protocol. */
-#ifndef FILEIO_H
-#define FILEIO_H
+#ifndef REMOTE_FILEIO_H
+#define REMOTE_FILEIO_H
/* Unified interface to remote fileio, called in remote.c from
remote_wait () and remote_async_wait () */
remote-fileio.c:51: regression: Still uses an old style K&R function definition (not declaration). This check also trips up on incorrectly indented function declarations (see `grep ^func')
remote-fileio.c:69: regression: Still uses an old style K&R function definition (not declaration). This check also trips up on incorrectly indented function declarations (see `grep ^func')
remote-fileio.c:81: regression: Still uses an old style K&R function definition (not declaration). This check also trips up on incorrectly indented function declarations (see `grep ^func')
remote-fileio.c:178: warning: code: Do not use `long long', instead use LONGEST
remote-fileio.c:284: warning: code: Do not use `long long', instead use LONGEST
remote-fileio.c:323: warning: code: Do not use `long long', instead use LONGEST
remote-fileio.c:327: warning: code: An IF statement's expression contains an assignment (the GNU coding standard discourages this)
remote-fileio.c:336: warning: code: Do not use `long long', instead use LONGEST
remote-fileio.c:356: warning: code: Do not use `long long', instead use LONGEST
remote-fileio.c:367: warning: code: Do not use `long long', instead use LONGEST
remote-fileio.c:373: warning: code: Do not use `long long', instead use LONGEST
remote-fileio.c:385: warning: code: Do not use `long long', instead use LONGEST
remote-fileio.c:389: warning: code: Do not use `long long', instead use LONGEST
remote-fileio.c:395: warning: code: Do not use `long long', instead use LONGEST
remote-fileio.c:410: warning: code: Do not use `long long', instead use LONGEST
remote-fileio.c:411: warning: code: Do not use `long long', instead use LONGEST
remote-fileio.c:412: warning: code: Do not use `long long', instead use LONGEST
remote-fileio.c:436: regression: Still uses an old style K&R function definition (not declaration). This check also trips up on incorrectly indented function declarations (see `grep ^func')
remote-fileio.c:462: regression: Still uses an old style K&R function definition (not declaration). This check also trips up on incorrectly indented function declarations (see `grep ^func')
remote-fileio.c:512: regression: Still uses an old style K&R function definition (not declaration). This check also trips up on incorrectly indented function declarations (see `grep ^func')
remote-fileio.c:518: regression: Still uses an old style K&R function definition (not declaration). This check also trips up on incorrectly indented function declarations (see `grep ^func')
remote-fileio.c:637: warning: code: An IF statement's expression contains an assignment (the GNU coding standard discourages this)
remote-fileio.c:654: warning: code: Do not use `long long', instead use LONGEST
remote-fileio.c:667: warning: code: An IF statement's expression contains an assignment (the GNU coding standard discourages this)
remote-fileio.c:771: warning: code: Do not use `long long', instead use LONGEST
remote-fileio.c:783: warning: code: An IF statement's expression contains an assignment (the GNU coding standard discourages this)
remote-fileio.c:843: warning: code: Do not use `long long', instead use LONGEST
remote-fileio.c:853: warning: code: An IF statement's expression contains an assignment (the GNU coding standard discourages this)
remote-fileio.c:931: warning: code: An IF statement's expression contains an assignment (the GNU coding standard discourages this)
remote-fileio.c:1030: warning: code: Do not use `long long', instead use LONGEST
remote-fileio.c:1092: warning: code: Do not use `long long', instead use LONGEST
remote-fileio.c:1103: warning: code: An IF statement's expression contains an assignment (the GNU coding standard discourages this)
remote-fileio.c:1159: warning: code: Do not use `long long', instead use LONGEST