aboutsummaryrefslogtreecommitdiffstats
path: root/epan/pint.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2001-10-29 21:56:50 +0000
committerGuy Harris <guy@alum.mit.edu>2001-10-29 21:56:50 +0000
commit62d224011d6315fedb5d66810692e54697f031d9 (patch)
treef845fe3e32eeff95a9e4dfbfc6224de31b41267b /epan/pint.h
parentd850e01b43e0bab9b0278c788e4005b61e3bc5a4 (diff)
Stop using "tvb_get_ntohll()" and "%llX" in the BOOTP dissector, as the
former depends on having "guint64" and the latter depends on "%ll[douxX]" being what's used to print 64-bit integers, and there are platforms on which Etheeal runs that don't have "guint64" or that don't use "%ll[douxX]" to print 64-bit integers. Get rid of the routines to extract 64-bit integers into "gint64"s and "guint64"s, as per Ronnie Sahlberg's suggestion, to discourage people from writing code that won't work on all platforms; they should be using FT_UINT64, or the routines in "int-64bit.c", instead. svn path=/trunk/; revision=4102
Diffstat (limited to 'epan/pint.h')
-rw-r--r--epan/pint.h26
1 files changed, 1 insertions, 25 deletions
diff --git a/epan/pint.h b/epan/pint.h
index 380880bbc6..2eaef53153 100644
--- a/epan/pint.h
+++ b/epan/pint.h
@@ -2,7 +2,7 @@
* Definitions for extracting and translating integers safely and portably
* via pointers.
*
- * $Id: pint.h,v 1.3 2000/11/11 10:23:43 guy Exp $
+ * $Id: pint.h,v 1.4 2001/10/29 21:56:48 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -32,10 +32,6 @@
/* Pointer versions of ntohs and ntohl. Given a pointer to a member of a
* byte array, returns the value of the two or four bytes at the pointer.
* The pletoh[sl] versions return the little-endian representation.
- *
- * If G_HAVE_GINT64 is defined, so we can use "gint64" and "guint64" to
- * refer to 64-bit integral quantities, we also provide pntohll and
- * phtolell, which extract 64-bit integral quantities.
*/
#define pntohs(p) ((guint16) \
@@ -51,16 +47,6 @@
(guint32)*((guint8 *)(p)+2)<<8| \
(guint32)*((guint8 *)(p)+3)<<0)
-#ifdef G_HAVE_GINT64
-#define pntohll(p) ((guint64)*((guint8 *)(p)+0)<<56| \
- (guint64)*((guint8 *)(p)+1)<<48| \
- (guint64)*((guint8 *)(p)+2)<<40| \
- (guint64)*((guint8 *)(p)+3)<<32| \
- (guint64)*((guint8 *)(p)+4)<<24| \
- (guint64)*((guint8 *)(p)+5)<<16| \
- (guint64)*((guint8 *)(p)+6)<<8| \
- (guint64)*((guint8 *)(p)+7)<<0)
-#endif
#define pletohs(p) ((guint16) \
((guint16)*((guint8 *)(p)+1)<<8| \
@@ -75,16 +61,6 @@
(guint32)*((guint8 *)(p)+1)<<8| \
(guint32)*((guint8 *)(p)+0)<<0)
-#ifdef G_HAVE_GINT64
-#define pletohll(p) ((guint64)*((guint8 *)(p)+7)<<56| \
- (guint64)*((guint8 *)(p)+6)<<48| \
- (guint64)*((guint8 *)(p)+5)<<40| \
- (guint64)*((guint8 *)(p)+4)<<32| \
- (guint64)*((guint8 *)(p)+3)<<24| \
- (guint64)*((guint8 *)(p)+2)<<16| \
- (guint64)*((guint8 *)(p)+1)<<8| \
- (guint64)*((guint8 *)(p)+0)<<0)
-#endif
/* Macros to byte-swap 32-bit and 16-bit quantities. */