]> The Tcpdump Group git mirrors - tcpdump/blobdiff - netdissect-stdinc.h
OpenFlow: Have a function for each message type.
[tcpdump] / netdissect-stdinc.h
index 567fb8ef31a3e81f0209a9e5d5efb36108c0a54e..0639b8819595cf8b18930ded6cc924657ba31510 100644 (file)
 #include <stdio.h>
 #include <winsock2.h>
 #include <ws2tcpip.h>
-#include <ctype.h>
 #include <time.h>
 #include <io.h>
 #include <fcntl.h>
    * by adding a preceding underscore; we *want* the UN*Xisms, so add
    * #defines to let us use them.
    */
-  #define isascii __isascii
   #define isatty _isatty
   #define stat _stat
   #define strdup _strdup
   #define open _open
-  #define fstat _fstat
   #define read _read
   #define close _close
   #define O_RDONLY _O_RDONLY
 
+  /*
+   * We define our_fstat64 as _fstati64, and define our_statb as
+   * struct _stati64, so we get 64-bit file sizes.
+   */
+  #define our_fstat _fstati64
+  #define our_statb struct _stati64
+
   /*
    * If <crtdbg.h> has been included, and _DEBUG is defined, and
    * __STDC__ is zero, <crtdbg.h> will define strdup() to call
@@ -222,7 +226,6 @@ typedef char* caddr_t;
  * Includes and definitions for various flavors of UN*X.
  */
 
-#include <ctype.h>
 #include <unistd.h>
 #include <netdb.h>
 #include <sys/param.h>
@@ -235,6 +238,13 @@ typedef char* caddr_t;
 
 #include <arpa/inet.h>
 
+/*
+ * We should have large file support enabled, if it's available,
+ * so just use fstat as our_fstat and struct stat as our_statb.
+ */
+#define our_fstat fstat
+#define our_statb struct stat
+
 /*
  * Assume all UN*Xes have strtoll(), and use it for strtoint64_t().
  */
@@ -244,7 +254,6 @@ typedef char* caddr_t;
  * Assume LL works.
  */
 #define INT64_T_CONSTANT(constant)     (constant##LL)
-
 #endif /* _WIN32 */
 
 /*