diff options
author | Guy Harris <guy@alum.mit.edu> | 2006-05-15 22:21:51 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2006-05-15 22:21:51 +0000 |
commit | 0457e756b1c81f1f0a5f4d47f49769e5a6971e7e (patch) | |
tree | 5434e3d7816191f76e2083bf797739e3336c1b14 /wiretap/configure.in | |
parent | c59f032fec45b7439625b21e1eed719c40c46447 (diff) |
GLib 1.2[.x] doesn't have g_sprintf(), it just has g_snprintf(); use
that.
It also doesn't hae <glib/gprintf.h>, so use that only for GLib 2.0 and
later.
svn path=/trunk/; revision=18169
Diffstat (limited to 'wiretap/configure.in')
-rw-r--r-- | wiretap/configure.in | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/wiretap/configure.in b/wiretap/configure.in index 1a8c34911a..0d7884dcba 100644 --- a/wiretap/configure.in +++ b/wiretap/configure.in @@ -184,13 +184,15 @@ AC_COMPILE_IFELSE( AC_LANG_SOURCE( [[ #include <glib.h> + #if GTK_MAJOR_VERSION >= 2 #include <glib/gprintf.h> + #endif #include <stdio.h> main() { char strbuf[16+1]; - g_sprintf(strbuf, "%" G_GINT64_MODIFIER "x\n", (gint64)1); + g_snprintf(strbuf, sizeof strbuf, "%" G_GINT64_MODIFIER "x\n", (gint64)1); } ]]) ], |