]> The Tcpdump Group git mirrors - tcpdump/blobdiff - netdissect-stdinc.h
Handle very large -f files by rejecting them.
[tcpdump] / netdissect-stdinc.h
index 8282c58462be3ac8e92a4c915eb3c1aa5c4652ce..9941c2a16a10708498aa92fecf26ee9f66e39aee 100644 (file)
 #ifdef _MSC_VER
 #define stat _stat
 #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
+
 #endif  /* _MSC_VER */
 
 /*
@@ -211,6 +218,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
+
 #endif /* _WIN32 */
 
 #ifndef HAVE___ATTRIBUTE__