]> The Tcpdump Group git mirrors - tcpdump/blobdiff - tcpdump-stdinc.h
u_intN_t is dead, long live uintN_t.
[tcpdump] / tcpdump-stdinc.h
index dde6c50785bc4ad3174cf500b5570cfed0e84db7..0a94bb59ccaab89005d537855c605e33e12a182f 100644 (file)
@@ -57,9 +57,6 @@
 #endif
 
 #if !defined(__MINGW32__) && !defined(__WATCOMC__)
-#undef toascii
-#define isascii __isascii
-#define toascii __toascii
 #define stat _stat
 #define open _open
 #define fstat _fstat
@@ -90,10 +87,6 @@ extern int inet_aton (const char *cp, struct in_addr *addr);
 #define INET6_ADDRSTRLEN 46
 #endif
 
-#ifndef toascii
-#define toascii(c) ((c) & 0x7f)
-#endif
-
 #ifndef caddr_t
 typedef char* caddr_t;
 #endif /* caddr_t */
@@ -111,14 +104,9 @@ typedef char* caddr_t;
 #include <netdb.h>
 #if HAVE_INTTYPES_H
 #include <inttypes.h>
-#else
-#if HAVE_STDINT_H
+#elif HAVE_STDINT_H
 #include <stdint.h>
 #endif
-#endif
-#ifdef HAVE_SYS_BITYPES_H
-#include <sys/bitypes.h>
-#endif
 #include <sys/param.h>
 #include <sys/types.h>                 /* concession to AIX */
 #include <sys/time.h>
@@ -275,4 +263,11 @@ typedef char* caddr_t;
  * end of Apple deprecation workaround macros
  */
 
+#ifndef min
+#define min(a,b) ((a)>(b)?(b):(a))
+#endif
+#ifndef max
+#define max(a,b) ((b)>(a)?(b):(a))
+#endif
+
 #endif /* tcpdump_stdinc_h */