From patchwork Fri May 13 07:04:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 9088301 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 1D204BF29F for ; Fri, 13 May 2016 07:05:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 744B9201F2 for ; Fri, 13 May 2016 07:05:09 +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 A2CE42017E for ; Fri, 13 May 2016 07:05:08 +0000 (UTC) Received: from localhost ([::1]:32977 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b179n-00006r-Md for patchwork-qemu-devel@patchwork.kernel.org; Fri, 13 May 2016 03:05:07 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54645) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b179R-0008Gc-SW for qemu-devel@nongnu.org; Fri, 13 May 2016 03:04:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b179L-0003PD-L9 for qemu-devel@nongnu.org; Fri, 13 May 2016 03:04:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35518) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b179L-0003P5-CB; Fri, 13 May 2016 03:04:39 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E30687F36F; Fri, 13 May 2016 07:04:38 +0000 (UTC) Received: from thh440s.fritz.box (vpn1-7-225.ams2.redhat.com [10.36.7.225]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u4D74XkY010464; Fri, 13 May 2016 03:04:37 -0400 From: Thomas Huth To: Samuel Thibault , qemu-devel@nongnu.org Date: Fri, 13 May 2016 09:04:30 +0200 Message-Id: <1463123072-30603-3-git-send-email-thuth@redhat.com> In-Reply-To: <1463123072-30603-1-git-send-email-thuth@redhat.com> References: <1463123072-30603-1-git-send-email-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Fri, 13 May 2016 07:04:38 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 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: qemu-trivial@nongnu.org, Jan Kiszka 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 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 --- 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