]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
2002-07-09 David O'Brien <obrien@FreeBSD.org>
authorDavid O'Brien <obrien@FreeBSD.org>
Tue, 9 Jul 2002 17:20:23 +0000 (17:20 +0000)
committerDavid O'Brien <obrien@FreeBSD.org>
Tue, 9 Jul 2002 17:20:23 +0000 (17:20 +0000)
Merge from mainline:
* gdbserver/gdbreplay.c: Include needed system headers.
(remote_open): Conditional strchr prototype.
(perror_with_name, remote_close, remote_open, expect, play): Static.

gdb/ChangeLog
gdb/gdbserver/gdbreplay.c

index 9483a2af66d8a1e6ac5c36dfcd1b5b331ae98c5c..437f27dbe923cd81d596038164df656ba9fba90e 100644 (file)
@@ -1,3 +1,10 @@
+2002-07-09  David O'Brien  <obrien@FreeBSD.org>
+
+       Merge from mainline:
+       * gdbserver/gdbreplay.c: Include needed system headers.
+       (remote_open): Conditional strchr prototype.
+       (perror_with_name, remote_close, remote_open, expect, play): Static.
+
 2002-07-09  Michal Ludvig  <mludvig@suse.cz>
 
        * NEWS: Note about dwarf2cfi improvements.
index dce4079e3f18a890b12866934b177b00bfaea9ab..8c57906ea076c44e964f94113d70b9436d1074b9 100644 (file)
 #include <fcntl.h>
 #include <errno.h>
 
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
 /* Sort of a hack... */
 #define EOL (EOF - 1)
 
@@ -40,7 +50,7 @@ static int remote_desc;
    as the file name for which the error was encountered.
    Then return to command level.  */
 
-void
+static void
 perror_with_name (char *string)
 {
 #ifndef STDC_HEADERS
@@ -71,7 +81,7 @@ sync_error (FILE *fp, char *desc, int expect, int got)
   exit (1);
 }
 
-void
+static void
 remote_close (void)
 {
   close (remote_desc);
@@ -80,10 +90,12 @@ remote_close (void)
 /* Open a connection to a remote debugger.
    NAME is the filename used for communication.  */
 
-void
+static void
 remote_open (char *name)
 {
+#ifndef HAVE_STRING_H
   extern char *strchr ();
+#endif
 
   if (!strchr (name, ':'))
     {
@@ -230,7 +242,7 @@ logchar (FILE *fp)
 /* Accept input from gdb and match with chars from fp (after skipping one
    blank) up until a \n is read from fp (which is not matched) */
 
-void
+static void
 expect (FILE *fp)
 {
   int fromlog;
@@ -261,7 +273,7 @@ expect (FILE *fp)
 /* Play data back to gdb from fp (after skipping leading blank) up until a
    \n is read from fp (which is discarded and not sent to gdb). */
 
-void
+static void
 play (FILE *fp)
 {
   int fromlog;