From patchwork Mon May 16 19:25:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 9105521 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 64DFFBF29F for ; Mon, 16 May 2016 19:25:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B454E200CF for ; Mon, 16 May 2016 19:25:58 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E2C4B200E9 for ; Mon, 16 May 2016 19:25:57 +0000 (UTC) Received: from localhost ([::1]:46944 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2O9N-0007HF-4Y for patchwork-qemu-devel@patchwork.kernel.org; Mon, 16 May 2016 15:25:57 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48318) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2O8z-0007BB-Eq for qemu-devel@nongnu.org; Mon, 16 May 2016 15:25:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b2O8r-0004OT-Q5 for qemu-devel@nongnu.org; Mon, 16 May 2016 15:25:33 -0400 Received: from hera.aquilenet.fr ([141.255.128.1]:54462) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2O8r-0004Ns-DY for qemu-devel@nongnu.org; Mon, 16 May 2016 15:25:25 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id C63DD865E; Mon, 16 May 2016 21:25:21 +0200 (CEST) Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bRNm--bKryUx; Mon, 16 May 2016 21:25:21 +0200 (CEST) Received: from var.youpi.perso.aquilenet.fr (unknown [IPv6:2a01:cb19:1ba:5d00:3602:86ff:fe2c:6a19]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 754E68659; Mon, 16 May 2016 21:25:21 +0200 (CEST) Received: from samy by var.youpi.perso.aquilenet.fr with local (Exim 4.87) (envelope-from ) id 1b2O8m-0006W8-Md; Mon, 16 May 2016 21:25:20 +0200 From: Samuel Thibault To: qemu-devel@nongnu.org, peter.maydell@linaro.org Date: Mon, 16 May 2016 21:25:18 +0200 Message-Id: <1463426720-25008-3-git-send-email-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1463426720-25008-1-git-send-email-samuel.thibault@ens-lyon.org> References: <1463426720-25008-1-git-send-email-samuel.thibault@ens-lyon.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 141.255.128.1 Subject: [Qemu-devel] [PULL 2/4] slirp: Remove obsolete backward-compatibility cruft X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: jan.kiszka@siemens.com, Thomas Huth , Samuel Thibault Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Thomas Huth The slirp code does not use index() and gethostid() anymore, so these parts can be removed without problems. memmove() and strerror() should be available on each of the supported platforms nowadays, too, so these wrappers are also not needed anymore. And we certainly also do not support Ultrix anymore, so no need to keep the code for this platform anymore. Signed-off-by: Thomas Huth Reviewed-by: Peter Maydell Signed-off-by: Samuel Thibault --- slirp/misc.c | 21 --------------------- slirp/slirp.h | 28 ---------------------------- slirp/slirp_config.h | 12 ------------ 3 files changed, 61 deletions(-) diff --git a/slirp/misc.c b/slirp/misc.c index 2fbd048..1a0ea1b 100644 --- a/slirp/misc.c +++ b/slirp/misc.c @@ -60,27 +60,6 @@ int add_exec(struct ex_list **ex_ptr, int do_pty, char *exec, return 0; } -#ifndef HAVE_STRERROR - -/* - * For systems with no strerror - */ - -extern int sys_nerr; -extern char *sys_errlist[]; - -char * -strerror(error) - int error; -{ - if (error < sys_nerr) - return sys_errlist[error]; - else - return "Unknown error."; -} - -#endif - #ifdef _WIN32 diff --git a/slirp/slirp.h b/slirp/slirp.h index 203deec..5b5df59 100644 --- a/slirp/slirp.h +++ b/slirp/slirp.h @@ -23,11 +23,6 @@ typedef char *caddr_t; # include #endif - -#ifndef HAVE_MEMMOVE -#define memmove(x, y, z) bcopy(y, x, z) -#endif - #ifndef _WIN32 #include #endif @@ -37,17 +32,6 @@ typedef char *caddr_t; #include #endif -/* Systems lacking strdup() definition in . */ -#if defined(ultrix) -char *strdup(const char *); -#endif - -/* Systems lacking malloc() definition in . */ -#if defined(ultrix) || defined(hcx) -void *malloc(size_t arg); -void free(void *ptr); -#endif - #ifndef NO_UNIX_SOCKETS #include #endif @@ -259,18 +243,6 @@ void if_start(Slirp *); void if_start(struct ttys *); #endif -#ifndef HAVE_STRERROR - char *strerror(int error); -#endif - -#ifndef HAVE_INDEX - char *index(const char *, int); -#endif - -#ifndef HAVE_GETHOSTID - long gethostid(void); -#endif - #ifndef _WIN32 #include #endif diff --git a/slirp/slirp_config.h b/slirp/slirp_config.h index a5fa36e..c59f655 100644 --- a/slirp/slirp_config.h +++ b/slirp/slirp_config.h @@ -34,9 +34,6 @@ #define HAVE_SYS_FILIO_H #endif -/* Define if you have strerror */ -#define HAVE_STRERROR - /* Define if you have sys/bitypes.h */ #undef HAVE_SYS_BITYPES_H @@ -82,15 +79,6 @@ #define HAVE_INET_ATON #endif -/* Define if you have index() */ -#define HAVE_INDEX - -/* Define if you have memmove */ -#define HAVE_MEMMOVE - -/* Define if you have gethostid */ -#define HAVE_GETHOSTID - /* Define if you DON'T have unix-domain sockets */ #undef NO_UNIX_SOCKETS #ifdef _WIN32