]> The Tcpdump Group git mirrors - tcpdump/blobdiff - tcpdump-stdinc.h
With .devel, add -g3 for MIPS C and DEC C.
[tcpdump] / tcpdump-stdinc.h
index d350d1be126b3c7529162fc95eeef83434cd8be2..eb6c9428d9064260a68948128a3a8df3921fa656 100644 (file)
@@ -69,8 +69,6 @@
 #define read _read
 #define close _close
 #define O_RDONLY _O_RDONLY
-
-typedef short ino_t;
 #endif /* __MINGW32__ */
 
 #ifdef __MINGW32__
@@ -84,6 +82,13 @@ extern const char *inet_ntop (int, const void *, char *, size_t);
 extern int inet_pton (int, const char *, void *);
 extern int inet_aton (const char *cp, struct in_addr *addr);
 
+/*
+ * With MSVC, for C, __inline is used to make a function an inline.
+ */
+#ifdef _MSC_VER
+#define inline __inline
+#endif
+
 #ifndef INET6_ADDRSTRLEN
 #define INET6_ADDRSTRLEN 46
 #endif
@@ -166,7 +171,11 @@ typedef char* caddr_t;
  * Note: this also requires that padding be put into the structure,
  * at least for compilers where it's implemented as __attribute__((packed)).
  */
+#if defined(_MSC_VER) && defined(UNALIGNED)
+/* MSVC may have its own macro defined with the same name and purpose. */
+#else
 #define UNALIGNED      __attribute__((packed))
+#endif
 
 #if defined(WIN32) || defined(MSDOS)
   #define FOPEN_READ_TXT   "rt"