X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/9a6a6502413e657277e74ac1d0842ddca34cab50..7b4e6191a77bdaff6f04af00b93eafb718b33662:/netdissect-stdinc.h diff --git a/netdissect-stdinc.h b/netdissect-stdinc.h index 2c16be39..0523620f 100644 --- a/netdissect-stdinc.h +++ b/netdissect-stdinc.h @@ -39,6 +39,8 @@ #ifndef netdissect_stdinc_h #define netdissect_stdinc_h +#include "ftmacros.h" + #include #include "compiler-tests.h" @@ -162,16 +164,21 @@ * 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 has been included, and _DEBUG is defined, and * __STDC__ is zero, will define strdup() to call @@ -233,6 +240,13 @@ typedef char* caddr_t; #include +/* + * 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(). */ @@ -242,7 +256,6 @@ typedef char* caddr_t; * Assume LL works. */ #define INT64_T_CONSTANT(constant) (constant##LL) - #endif /* _WIN32 */ /*