diff options
author | guy <guy> | 2004-04-17 04:33:16 +0000 |
---|---|---|
committer | guy <guy> | 2004-04-17 04:33:16 +0000 |
commit | 1875b8ffe1dd76012ee876094ffc85382cc810ea (patch) | |
tree | c67d399d505bb88f08990c01086f159ec0d09617 /missing | |
parent | c33a30afdebb474e413becf957e3dc5f708c1b4d (diff) | |
download | tcpdump-1875b8ffe1dd76012ee876094ffc85382cc810ea.tar.gz |
First stage of adding support for 64-bit integral data types - this
causes "int64_t" and "u_int64_t" to be defined by the configure script,
and causes "missing/bittypes.h" to attempt to define "u_int64_t" in a
fashion that should, with any luck, work on MSVC++ and various flavors
of GNU C on Windows.
Diffstat (limited to 'missing')
-rw-r--r-- | missing/bittypes.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/missing/bittypes.h b/missing/bittypes.h index 577da944..2ee7dae4 100644 --- a/missing/bittypes.h +++ b/missing/bittypes.h @@ -65,3 +65,21 @@ typedef unsigned short u_int32_t; #endif #endif /* HAVE_U_INT32_T */ + +#ifndef HAVE_U_INT64_T + +#if SIZEOF_LONG_LONG == 8 +typedef unsigned long long u_int64_t; +#elif defined(_MSC_EXTENSIONS) +typedef _int64 u_int64_t; +#elif SIZEOF_INT == 8 +typedef unsigned int u_int64_t; +#elif SIZEOF_LONG == 8 +typedef unsigned long u_int64_t; +#elif SIZEOF_SHORT == 8 +typedef unsigned short u_int64_t; +#else /* XXX */ +#error "there's no appropriate type for u_int64_t" +#endif + +#endif /* HAVE_U_INT64_T */ |