diff options
-rw-r--r-- | acinclude.m4 | 42 | ||||
-rw-r--r-- | configure.in | 106 | ||||
-rw-r--r-- | epan/packet.h | 8 | ||||
-rw-r--r-- | epan/tap.h | 4 |
4 files changed, 3 insertions, 157 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index b6eb4b5f4f..37258ed201 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1510,48 +1510,6 @@ AC_DEFUN([AC_WIRESHARK_KRB5_CHECK], AC_SUBST(KRB5_LIBS) ]) -dnl -dnl Check whether a given format can be used to print 64-bit integers -dnl -AC_DEFUN([AC_WIRESHARK_CHECK_64BIT_FORMAT], -[ - AC_MSG_CHECKING([whether %$1x can be used to format 64-bit integers]) - ac_save_CFLAGS="$CFLAGS" - ac_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $GLIB_CFLAGS" - LIBS="$GLIB_LIBS $LIBS" - AC_RUN_IFELSE( - [ - AC_LANG_SOURCE( - [[ - #include <glib.h> - #include <glib/gprintf.h> - #include <stdio.h> - - main() - { - guint64 t = 1; - char strbuf[16+1]; - g_snprintf(strbuf, sizeof strbuf, "%016$1x", t << 32); - if (strcmp(strbuf, "0000000100000000") == 0) - exit(0); - else - exit(1); - } - ]]) - ], - [ - AC_DEFINE(G_GINT64_MODIFIER, "$1", [Format modifier for printing 64-bit numbers]) - AC_MSG_RESULT(yes) - ], - [ - AC_MSG_RESULT(no) - $2 - ]) - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" -]) - # # AC_WIRESHARK_GCC_CFLAGS_CHECK # diff --git a/configure.in b/configure.in index 167affaa42..290830980c 100644 --- a/configure.in +++ b/configure.in @@ -584,14 +584,14 @@ if test "$GTK_OK" = "no" ; then wireshark_bin="" wireshark_man="" # Honor GLIB_CFLAGS - AM_PATH_GLIB_2_0(2.0.0, CFLAGS="$CFLAGS $GLIB_CFLAGS", AC_MSG_ERROR(GLib 2.0 or later distribution not found.), gmodule) + AM_PATH_GLIB_2_0(2.4.0, CFLAGS="$CFLAGS $GLIB_CFLAGS", AC_MSG_ERROR(GLib 2.0 or later distribution not found.), gmodule) else wireshark_bin="wireshark\$(EXEEXT)" wireshark_man="wireshark.1" wireshark_SUBDIRS="codecs gtk" # Honor GLIB_CFLAGS - AM_PATH_GLIB_2_0(2.0.0, , AC_MSG_ERROR(GLib 2.0 or later distribution not found.), gmodule) + AM_PATH_GLIB_2_0(2.4.0, , AC_MSG_ERROR(GLib 2.4 or later distribution not found.), gmodule) fi # @@ -630,66 +630,6 @@ else have_plugins=no fi -# -# We can't just check for <inttypes.h> - some systems have one that -# doesn't define all the PRI[doxu]64 macros. -# -AC_CHECK_HEADERS(inttypes.h, - [ - # - # OK, we have inttypes.h, but does it define those macros? - # - AC_MSG_CHECKING([[whether inttypes.h defines the PRI[doxu]64 macros]]) - AC_COMPILE_IFELSE( - [ - AC_LANG_SOURCE( - [[ - #include <inttypes.h> - #include <glib.h> - #include <stdio.h> - #include <sys/types.h> - - main() - { - printf("%" PRId64 "\n", (gint64)1); - printf("%" PRIo64 "\n", (guint64)1); - printf("%" PRIx64 "\n", (guint64)1); - printf("%" PRIX64 "\n", (guint64)1); - printf("%" PRIu64 "\n", (guint64)1); - } - ]]) - ], - [ - AC_MSG_RESULT(yes) - ac_wireshark_inttypes_h_defines_formats=yes - ], - [ - AC_MSG_RESULT(no) - ac_wireshark_inttypes_h_defines_formats=no - ]) - ], - [ - # - # We don't have inttypes.h, so it obviously can't define those - # macros. - # - ac_wireshark_inttypes_h_defines_formats=no - ]) -if test "$ac_wireshark_inttypes_h_defines_formats" = yes; then - AC_DEFINE(INTTYPES_H_DEFINES_FORMATS,,[Define if <inttypes.h> defines PRI[doxu]64 macros]) -else - AC_WIRESHARK_CHECK_64BIT_FORMAT(ll, - [ - AC_WIRESHARK_CHECK_64BIT_FORMAT(L, - [ - AC_WIRESHARK_CHECK_64BIT_FORMAT(q, - [ - AC_MSG_ERROR([neither %llx nor %Lx nor %qx worked on a 64-bit integer]) - ]) - ]) - ]) -fi - AC_SUBST(wireshark_bin) AC_SUBST(wireshark_man) @@ -1164,8 +1104,7 @@ fi AC_SUBST(LIBCAP_LIBS) dnl Checks for header files. -AC_HEADER_STDC -AC_CHECK_HEADERS(direct.h dirent.h fcntl.h grp.h netdb.h pwd.h stdarg.h stddef.h unistd.h) +AC_CHECK_HEADERS(direct.h dirent.h fcntl.h grp.h inttypes.h netdb.h pwd.h stdarg.h stddef.h unistd.h) AC_CHECK_HEADERS(sys/ioctl.h sys/param.h sys/socket.h sys/sockio.h sys/stat.h sys/time.h sys/types.h sys/utsname.h sys/wait.h) AC_CHECK_HEADERS(netinet/in.h) AC_CHECK_HEADERS(arpa/inet.h arpa/nameser.h) @@ -1290,45 +1229,6 @@ AC_C_BIGENDIAN # XXX - do we need this? AC_PROG_GCC_TRADITIONAL -# -# 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_snprintf(strbuf, sizeof strbuf, "%" G_GINT64_MODIFIER "x\n", (gint64)1); - } - ]]) - ], - [ - AC_MSG_RESULT(yes) - ], - [ - AC_MSG_RESULT(no) - AC_WIRESHARK_CHECK_64BIT_FORMAT(l, - [ - AC_WIRESHARK_CHECK_64BIT_FORMAT(ll, - [ - AC_WIRESHARK_CHECK_64BIT_FORMAT(L, - [ - AC_WIRESHARK_CHECK_64BIT_FORMAT(q, - [ - AC_MSG_ERROR([neither %lx nor %llx nor %Lx nor %qx worked on a 64-bit integer]) - ]) - ]) - ]) - ]) - ]) - GETOPT_C="" GETOPT_O="" AC_CHECK_FUNC(getopt, GETOPT_O="", diff --git a/epan/packet.h b/epan/packet.h index edaaacf66c..0ccb278576 100644 --- a/epan/packet.h +++ b/epan/packet.h @@ -25,14 +25,6 @@ #ifndef __PACKET_H__ #define __PACKET_H__ -/* - * If <inttypes.h> defines formats to be used to print 64-bit integers, - * include it. - */ -#ifdef INTTYPES_H_DEFINES_FORMATS -#include <inttypes.h> -#endif - #include "wiretap/wtap.h" #include "proto.h" #include "tvbuff.h" diff --git a/epan/tap.h b/epan/tap.h index e9890cd03b..4f4855deff 100644 --- a/epan/tap.h +++ b/epan/tap.h @@ -27,10 +27,6 @@ #include "epan/epan.h" -#ifdef INTTYPES_H_DEFINES_FORMATS -#include <inttypes.h> -#endif - /* With MSVC and a libwireshark.dll, we need a * special declaration of num_tap_filters. */ |