diff options
author | obrien <obrien@FreeBSD.org> | 2002-07-09 17:01:47 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2002-07-09 17:01:47 +0000 |
commit | bca882d5e9b0b84a954260ab62edd02e29271b16 (patch) | |
tree | d16fc1b0a4da086742254cad6b7044210547ad15 /contrib | |
parent | 14afd5a2e20db23eb22b1c4abaf77238e5fc2463 (diff) | |
download | FreeBSD-src-bca882d5e9b0b84a954260ab62edd02e29271b16.zip FreeBSD-src-bca882d5e9b0b84a954260ab62edd02e29271b16.tar.gz |
Quiet warnings by making this ANSI-C clean.
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/gdb/gdb/gdbserver/gdbreplay.c | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/contrib/gdb/gdb/gdbserver/gdbreplay.c b/contrib/gdb/gdb/gdbserver/gdbreplay.c index dce4079..e13f625 100644 --- a/contrib/gdb/gdb/gdbserver/gdbreplay.c +++ b/contrib/gdb/gdb/gdbserver/gdbreplay.c @@ -19,6 +19,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* $FreeBSD$ */ + #include "config.h" #include <stdio.h> #include <sys/file.h> @@ -30,6 +32,15 @@ #include <ctype.h> #include <fcntl.h> #include <errno.h> +#ifdef HAVE_STDLIB_H +#include <stdlib.h> +#endif +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif +#ifdef HAVE_STRING_H +#include <string.h> +#endif /* Sort of a hack... */ #define EOL (EOF - 1) @@ -40,7 +51,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 +82,7 @@ sync_error (FILE *fp, char *desc, int expect, int got) exit (1); } -void +static void remote_close (void) { close (remote_desc); @@ -80,10 +91,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 +243,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 +274,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; |