qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Samuel Thibault <samuel.thibault@ens-lyon.org>, qemu-devel@nongnu.org
Cc: Jan Kiszka <jan.kiszka@siemens.com>, qemu-trivial@nongnu.org
Subject: [Qemu-devel] [PATCH 2/4] slirp: Remove obsolete backward-compatibility cruft
Date: Fri, 13 May 2016 09:04:30 +0200	[thread overview]
Message-ID: <1463123072-30603-3-git-send-email-thuth@redhat.com> (raw)
In-Reply-To: <1463123072-30603-1-git-send-email-thuth@redhat.com>

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 <thuth@redhat.com>
---
 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 <sys/bitypes.h>
 #endif
 
-
-#ifndef HAVE_MEMMOVE
-#define memmove(x, y, z) bcopy(y, x, z)
-#endif
-
 #ifndef _WIN32
 #include <sys/uio.h>
 #endif
@@ -37,17 +32,6 @@ typedef char *caddr_t;
 #include <arpa/inet.h>
 #endif
 
-/* Systems lacking strdup() definition in <string.h>. */
-#if defined(ultrix)
-char *strdup(const char *);
-#endif
-
-/* Systems lacking malloc() definition in <stdlib.h>. */
-#if defined(ultrix) || defined(hcx)
-void *malloc(size_t arg);
-void free(void *ptr);
-#endif
-
 #ifndef NO_UNIX_SOCKETS
 #include <sys/un.h>
 #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 <netdb.h>
 #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
-- 
1.8.3.1

  parent reply	other threads:[~2016-05-13  7:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-13  7:04 [Qemu-devel] [PATCH 0/4] slirp: Spring-cleaning Thomas Huth
2016-05-13  7:04 ` [Qemu-devel] [PATCH 1/4] slirp: Clean up slirp_config.h Thomas Huth
2016-05-13  7:04 ` Thomas Huth [this message]
2016-05-13  7:04 ` [Qemu-devel] [PATCH 3/4] slirp: Remove some unused code from slirp.h Thomas Huth
2016-05-13  7:04 ` [Qemu-devel] [PATCH 4/4] slirp: Clean up osdep.h related header inclusions Thomas Huth
2016-05-13  9:42 ` [Qemu-devel] [PATCH 0/4] slirp: Spring-cleaning Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1463123072-30603-3-git-send-email-thuth@redhat.com \
    --to=thuth@redhat.com \
    --cc=jan.kiszka@siemens.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=samuel.thibault@ens-lyon.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).