mirror of
https://github.com/michaelrsweet/mxml.git
synced 2024-11-24 11:25:30 +00:00
Merge pull request #288 from carlo-bramini/fix-autoconf-1
Improve detection of "long long int"
This commit is contained in:
commit
a3486a3b2a
@ -38,7 +38,7 @@
|
||||
* Long long support...
|
||||
*/
|
||||
|
||||
#undef HAVE_LONG_LONG
|
||||
#undef HAVE_LONG_LONG_INT
|
||||
|
||||
|
||||
/*
|
||||
|
18
configure.ac
18
configure.ac
@ -130,23 +130,7 @@ AS_IF([test "x$use_vsnprintf" != xyes], [
|
||||
|
||||
|
||||
dnl Check for "long long" support...
|
||||
AC_CACHE_CHECK([for long long int], [ac_cv_c_long_long], [
|
||||
AS_IF([test "$GCC" = yes], [
|
||||
ac_cv_c_long_long=yes
|
||||
], [
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
|
||||
long long int i;]])
|
||||
], [
|
||||
ac_cv_c_long_long=yes
|
||||
], [
|
||||
ac_cv_c_long_long=no
|
||||
])
|
||||
])
|
||||
])
|
||||
|
||||
AS_IF([test $ac_cv_c_long_long = yes], [
|
||||
AC_DEFINE([HAVE_LONG_LONG], [Have the long long type?])
|
||||
])
|
||||
AC_TYPE_LONG_LONG_INT
|
||||
|
||||
|
||||
dnl Threading support
|
||||
|
@ -374,11 +374,11 @@ _mxml_vsnprintf(char *buffer, /* O - Output buffer */
|
||||
if ((width + 2) > sizeof(temp))
|
||||
break;
|
||||
|
||||
#ifdef HAVE_LONG_LONG
|
||||
#ifdef HAVE_LONG_LONG_INT
|
||||
if (size == 'L')
|
||||
sprintf(temp, tformat, va_arg(ap, long long));
|
||||
else
|
||||
#endif /* HAVE_LONG_LONG */
|
||||
#endif /* HAVE_LONG_LONG_INT */
|
||||
sprintf(temp, tformat, va_arg(ap, int));
|
||||
|
||||
bytes += strlen(temp);
|
||||
|
@ -77,7 +77,7 @@
|
||||
* Long long support...
|
||||
*/
|
||||
|
||||
#define HAVE_LONG_LONG 1
|
||||
#define HAVE_LONG_LONG_INT 1
|
||||
|
||||
|
||||
/*
|
||||
|
@ -38,7 +38,7 @@
|
||||
* Long long support...
|
||||
*/
|
||||
|
||||
#define HAVE_LONG_LONG 1
|
||||
#define HAVE_LONG_LONG_INT 1
|
||||
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user