Ethereal-dev: [Ethereal-dev] Some Mandrake 64 bit fixes

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Joerg Mayer <jmayer@xxxxxxxxx>
Date: Sat, 17 Jul 2004 00:30:57 +0200
... which I didn't apply because I'm not sure that intttype.h is portable.

 Ciao
    Joerg


>From Mandrake SRPM:
 * Wed Apr 14 2004 Gwenole Beauchesne <gbeauchesne@xxxxxxxxxxxxxxxx> 0.10.3-4mdk
 - some 64-bit fixes

--- ethereal-0.10.3/epan/ftypes/ftype-integer.c.64bit-fixes	2004-02-28 19:06:39.000000000 +0100
+++ ethereal-0.10.3/epan/ftypes/ftype-integer.c	2004-04-14 16:35:26.000000000 +0200
@@ -28,6 +28,7 @@
 #include <errno.h>
 #include "ftypes-int.h"
 #include <epan/resolv.h>
+#include <inttypes.h>
 
 
 static void
@@ -63,7 +64,7 @@ val_from_unparsed(fvalue_t *fv, char *s,
 	}
 	if (errno == ERANGE) {
 		if (logfunc != NULL) {
-			if (fv->value.integer == ULONG_MAX) {
+			if (fv->value.integer == UINT32_MAX) {
 				logfunc("\"%s\" causes an integer overflow.",
 				    s);
 			}
--- ethereal-0.10.3/epan/dfilter/scanner.l.64bit-fixes	2004-02-28 19:06:39.000000000 +0100
+++ ethereal-0.10.3/epan/dfilter/scanner.l	2004-04-14 16:36:35.000000000 +0200
@@ -27,6 +27,7 @@
 
 #include <stdlib.h>
 #include <errno.h>
+#include <inttypes.h>
 
 #include "glib-util.h"
 #include "dfilter-int.h"
@@ -321,7 +322,7 @@ str_to_guint32(char *s, guint32* pint)
 		return FALSE;
 	}
 	if (errno == ERANGE) {
-		if (integer == LONG_MAX) {
+		if (integer == INT32_MAX) {
 			dfilter_fail("\"%s\" causes an integer overflow.", s);
 		}
 		else {
-- 
Joerg Mayer                                           <jmayer@xxxxxxxxx>
We are stuck with technology when what we really want is just stuff that
works. Some say that should read Microsoft instead of technology.