From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12661 invoked by alias); 28 Jun 2002 03:47:23 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 12651 invoked from network); 28 Jun 2002 03:47:21 -0000 Received: from unknown (HELO dragon.nuxi.com) (66.92.13.169) by sources.redhat.com with SMTP; 28 Jun 2002 03:47:21 -0000 Received: from dragon.nuxi.com (obrien@localhost [127.0.0.1]) by dragon.nuxi.com (8.12.4/8.12.2) with ESMTP id g5S3lKtL013469 for ; Thu, 27 Jun 2002 20:47:20 -0700 (PDT) (envelope-from obrien@dragon.nuxi.com) Received: (from obrien@localhost) by dragon.nuxi.com (8.12.5/8.12.4/Submit) id g5S3lKUk013468 for gdb-patches@sources.redhat.com; Thu, 27 Jun 2002 20:47:20 -0700 (PDT) Date: Thu, 27 Jun 2002 20:47:00 -0000 From: "David O'Brien" To: gdb-patches@sources.redhat.com Subject: [5.2.1] quiet warnings for gdbreplay.c Message-ID: <20020627204720.A13445@dragon.nuxi.com> Reply-To: obrien@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i X-Operating-System: FreeBSD 5.0-CURRENT Organization: The NUXI BSD group X-Pgp-Rsa-Fingerprint: B7 4D 3E E9 11 39 5F A3 90 76 5D 69 58 D9 98 7A X-Pgp-Rsa-Keyid: 1024/34F9F9D5 X-SW-Source: 2002-06/txt/msg00564.txt.bz2 OK to apply? 2002-06-27 David O'Brien * gdbserver/gdbreplay.c: Include stdlib.h, unistd.h, and string.h if they exist. Static'ize internal functions to quiet warnings. Index: gdbserver/gdbreplay.c =================================================================== RCS file: /cvs/src/src/gdb/gdbserver/gdbreplay.c,v retrieving revision 1.4.10.1 diff -u -r1.4.10.1 gdbreplay.c --- gdbserver/gdbreplay.c 29 Mar 2002 19:03:34 -0000 1.4.10.1 +++ gdbserver/gdbreplay.c 28 Jun 2002 03:46:28 -0000 @@ -30,6 +30,15 @@ #include #include #include +#ifdef HAVE_STDLIB_H +#include +#endif +#ifdef HAVE_UNISTD_H +#include +#endif +#ifdef HAVE_STRING_H +#include +#endif /* Sort of a hack... */ #define EOL (EOF - 1) @@ -40,7 +49,7 @@ 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 +80,7 @@ exit (1); } -void +static void remote_close (void) { close (remote_desc); @@ -80,10 +89,12 @@ /* 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 +241,7 @@ /* 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 +272,7 @@ /* 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;