forked from osmocom/wireshark
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
This commit is contained in:
parent
c59f032fec
commit
0457e756b1
|
@ -246,14 +246,16 @@ AC_DEFUN([AC_WIRETAP_CHECK_64BIT_FORMAT],
|
|||
AC_LANG_SOURCE(
|
||||
[[
|
||||
#include <glib.h>
|
||||
#if GTK_MAJOR_VERSION >= 2
|
||||
#include <glib/gprintf.h>
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
|
||||
main()
|
||||
{
|
||||
guint64 t = 1;
|
||||
char strbuf[16+1];
|
||||
g_sprintf(strbuf, "%016$1x", t << 32);
|
||||
g_snprintf(strbuf, sizeof strbuf, "%016$1x", t << 32);
|
||||
if (strcmp(strbuf, "0000000100000000") == 0)
|
||||
exit(0);
|
||||
else
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
]])
|
||||
],
|
||||
|
|
Loading…
Reference in New Issue