1
0
mirror of https://github.com/simh/simh.git synced 2026-01-25 19:56:25 +00:00

slirp: cleanup for submission upstream back to qemu

Minimize the include file set and their contents to only provide the slirp
 referenced qemu includes and interfaces.
This commit is contained in:
Mark Pizzolato
2015-10-22 09:55:05 -07:00
parent eff1ef12e7
commit 7ad57d7fa8
98 changed files with 386 additions and 15031 deletions

View File

@@ -13,23 +13,7 @@
extern int slirp_debug;
#if defined(HAVE_SLIRP_NETWORK) /* simh build indicator */
#include <stdio.h>
#define DEVICE void
extern void *slirp_dptr;
extern int slirp_dbit;
extern void _sim_debug (int dbits, DEVICE* dptr, const char* fmt, ...);
#define DEBUG_CALL(x) do {if (slirp_debug & DBG_CALL) { _sim_debug (slirp_dbit, slirp_dptr, "%s...\n", x); };} while (0)
#define DEBUG_ARG(x, y) do {if (slirp_debug & DBG_CALL) {_sim_debug (slirp_dbit, slirp_dptr, x, y); _sim_debug (slirp_dbit, slirp_dptr, "\n"); };} while (0)
#define DEBUG_ARGS(...) do {if (slirp_debug & DBG_CALL) { _sim_debug (slirp_dbit, slirp_dptr, ## __VA_ARGS__); };} while (0)
#define DEBUG_MISC(...) do {if (slirp_debug & DBG_MISC) { _sim_debug (slirp_dbit, slirp_dptr, ## __VA_ARGS__); };} while (0)
#define DEBUG_ERROR(...) do {if (slirp_debug & DBG_ERROR) { _sim_debug (slirp_dbit, slirp_dptr, ## __VA_ARGS__); };} while (0)
#define DPRINTF(fmt, ...) do {if (slirp_debug & DBG_CALL) { _sim_debug (slirp_dbit, slirp_dptr, fmt, ## __VA_ARGS__); };} while (0)
#else /* !defined(HAVE_SLIRP_NETWORK) */
#ifndef USE_SIMH_SLIRP_DEBUG /* simh build indicator */
#ifdef DEBUG
@@ -52,6 +36,24 @@ extern void _sim_debug (int dbits, DEVICE* dptr, const char* fmt, ...);
#define DPRINTF(fmt, ...) do {} while (0)
#endif
#else /* defined(USE_SIMH_SLIRP_DEBUG) */
#include <stdio.h>
#define DEVICE void
extern void *slirp_dptr;
extern int slirp_dbit;
extern void _sim_debug (int dbits, DEVICE* dptr, const char* fmt, ...);
#define DEBUG_CALL(x) do {if (slirp_debug & DBG_CALL) { _sim_debug (slirp_dbit, slirp_dptr, "%s...\n", x); };} while (0)
#define DEBUG_ARG(x, y) do {if (slirp_debug & DBG_CALL) {_sim_debug (slirp_dbit, slirp_dptr, x, y); _sim_debug (slirp_dbit, slirp_dptr, "\n"); };} while (0)
#define DEBUG_ARGS(...) do {if (slirp_debug & DBG_CALL) { _sim_debug (slirp_dbit, slirp_dptr, ## __VA_ARGS__); };} while (0)
#define DEBUG_MISC(...) do {if (slirp_debug & DBG_MISC) { _sim_debug (slirp_dbit, slirp_dptr, ## __VA_ARGS__); };} while (0)
#define DEBUG_ERROR(...) do {if (slirp_debug & DBG_ERROR) { _sim_debug (slirp_dbit, slirp_dptr, ## __VA_ARGS__); };} while (0)
#define DPRINTF(fmt, ...) do {if (slirp_debug & DBG_CALL) { _sim_debug (slirp_dbit, slirp_dptr, fmt, ## __VA_ARGS__); };} while (0)
#endif
#endif