]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
slirp: some additional minor changes
authorFrode Solheim <frode@fs-uae.net>
Fri, 4 Sep 2015 23:47:40 +0000 (01:47 +0200)
committerFrode Solheim <frode@fs-uae.net>
Fri, 4 Sep 2015 23:47:40 +0000 (01:47 +0200)
od-win32/inttypes.h [deleted file]
slirp/cksum.cpp
slirp/libslirp.h
slirp/slirp.h

diff --git a/od-win32/inttypes.h b/od-win32/inttypes.h
deleted file mode 100644 (file)
index aae92fb..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#include <stdint.h>
-
-typedef uint8_t u_int8_t;
-typedef uint16_t u_int16_t;
-typedef uint32_t u_int32_t;
-typedef uint64_t u_int64_t;
-
-typedef u_int8_t uint8;
-typedef u_int16_t uint16;
-typedef u_int32_t uint32;
index 6184b64aa2337e372afdba58501df9c13e3e0268..41c4adbf1c70a205b6b26575485b22f1111eddc5 100644 (file)
@@ -72,7 +72,7 @@ int cksum(struct mbuf *m, int len)
        /*
         * Force to even boundary.
         */
-       if ((1 & (long) w) && (mlen > 0)) {
+       if ((1 & (uintptr_t) w) && (mlen > 0)) {
                REDUCE;
                sum <<= 8;
                s_util.c[0] = *(u_int8_t *)w;
index 424a18a01efe27c50d401091157d5ec538d56877..53acac81e16ef3fa38d3a8147b96b0f03a83f7eb 100644 (file)
@@ -9,10 +9,6 @@ int inet_aton(const char *cp, struct in_addr *ia);
 #include <arpa/inet.h>
 #endif
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 int slirp_init(void);
 void slirp_cleanup(void);
 
@@ -34,8 +30,4 @@ int slirp_add_exec(int do_pty, const char *args, int addr_low_byte,
 
 extern char slirp_hostname[33];
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif
index 4d0d67016e925ed2bb3f31a3e1bbd15827588eb0..3d815c7dde127f9db5e8ebd5b552776236a7b9c6 100644 (file)
 #include "slirp_config.h"
 
 #ifdef _WIN32
-# include <inttypes.h>
+# include <stdint.h>
+
+typedef uint8_t u_int8_t;
+typedef uint16_t u_int16_t;
+typedef uint32_t u_int32_t;
+typedef uint64_t u_int64_t;
+
+typedef u_int8_t uint8;
+typedef u_int16_t uint16;
+typedef u_int32_t uint32;
 
 #ifdef _MSC_VER
 #define container_of(address, type, field) ((type *)( \
@@ -364,7 +373,7 @@ struct tcpcb *tcp_drop(struct tcpcb *tp, int err);
 #define MAX_MRU 16384
 #endif
 
-#ifndef _WIN32
+#ifndef _MSC_VER
 #define min(x,y) ((x) < (y) ? (x) : (y))
 #define max(x,y) ((x) > (y) ? (x) : (y))
 #endif