Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] G_GUINT64_CONSTANT()

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Tue, 14 Apr 2009 09:38:54 -0700

On Apr 14, 2009, at 3:18 AM, Kukosa, Tomas wrote:

Do you have any proposal for solutuion?

G_GINT4_CONSTANT() *isn't* 2.10-and-later, and we've been using it for a while:

	$ egrep '64.*CONST' epan/*.c
	tvbuff.c:    G_GINT64_CONSTANT(0xffffffffffffffffU),
	tvbuff.c:    G_GINT64_CONSTANT(0x7fffffffffffffffU),
	tvbuff.c:    G_GINT64_CONSTANT(0x3fffffffffffffffU),
	tvbuff.c:    G_GINT64_CONSTANT(0x1fffffffffffffffU),
	tvbuff.c:    G_GINT64_CONSTANT(0x0fffffffffffffffU),
	tvbuff.c:    G_GINT64_CONSTANT(0x07ffffffffffffffU),
	tvbuff.c:    G_GINT64_CONSTANT(0x03ffffffffffffffU),
	tvbuff.c:    G_GINT64_CONSTANT(0x01ffffffffffffffU)

Unless 2.10 changes G_GINT64_CONSTANT() *not* to work if you put a U at the end of the constant, we can just use G_GINT64_CONSTANT(); alternatively, we could perhaps do

	#ifndef G_GUINT4_CONSTANT
#define G_GUINT64_CONSTANT(c) something that sticks a "U" immediately after the constant and passes it to G_GINT64_CONSTANT()
	#endif

in some appropriate header file if there's a way to do that with the C preprocessor.