aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/configure.in
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2006-05-15 05:28:56 +0000
committerGuy Harris <guy@alum.mit.edu>2006-05-15 05:28:56 +0000
commitc914d509a026163023ee0b02fb50d14865a81d63 (patch)
treeaab153d2aa268e6c40caa152e658dcb8c2b73fd9 /wiretap/configure.in
parent2f568ce9eabbb1e7ff8475e420c9f76ccc7bc89f (diff)
Fix some compiler warnings.
That requires that we define G_GINT64_MODIFIER ourselves if glib.h doesn't define it for us, as that's what should be used to print 64-bit integral values in any calls that use any of the GLib printf functions (directly or indirectly). svn path=/trunk/; revision=18154
Diffstat (limited to 'wiretap/configure.in')
-rw-r--r--wiretap/configure.in36
1 files changed, 36 insertions, 0 deletions
diff --git a/wiretap/configure.in b/wiretap/configure.in
index ad14196f2e..1a8c34911a 100644
--- a/wiretap/configure.in
+++ b/wiretap/configure.in
@@ -176,6 +176,42 @@ AC_CHECK_HEADERS(sys/time.h netinet/in.h unistd.h fcntl.h sys/stat.h sys/types.h
AC_C_BIGENDIAN
#
+# Does GLib define G_GINT64_MODIFIER?
+#
+AC_MSG_CHECKING([[whether glib.h defines the G_GINT64_MODIFIER macro]])
+AC_COMPILE_IFELSE(
+ [
+ AC_LANG_SOURCE(
+ [[
+ #include <glib.h>
+ #include <glib/gprintf.h>
+ #include <stdio.h>
+
+ main()
+ {
+ char strbuf[16+1];
+ g_sprintf(strbuf, "%" G_GINT64_MODIFIER "x\n", (gint64)1);
+ }
+ ]])
+ ],
+ [
+ AC_MSG_RESULT(yes)
+ ],
+ [
+ AC_MSG_RESULT(no)
+ AC_WIRETAP_CHECK_64BIT_FORMAT(ll,
+ [
+ AC_WIRETAP_CHECK_64BIT_FORMAT(L,
+ [
+ AC_WIRETAP_CHECK_64BIT_FORMAT(q,
+ [
+ AC_MSG_ERROR([neither %llx nor %Lx nor %qx worked on a 64-bit integer])
+ ])
+ ])
+ ])
+ ])
+
+#
# Look for libpcap, so we can include <pcap.h> in libpcap.c if it's
# found.
#