Merge pull request #288 from carlo-bramini/fix-autoconf-1

Improve detection of "long long int"
This commit is contained in:
Michael R Sweet 2021-10-27 09:46:43 -04:00 committed by GitHub
commit a3486a3b2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 22 deletions

View File

@ -38,7 +38,7 @@
* Long long support...
*/
#undef HAVE_LONG_LONG
#undef HAVE_LONG_LONG_INT
/*

View File

@ -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

View File

@ -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);

View File

@ -77,7 +77,7 @@
* Long long support...
*/
#define HAVE_LONG_LONG 1
#define HAVE_LONG_LONG_INT 1
/*

View File

@ -38,7 +38,7 @@
* Long long support...
*/
#define HAVE_LONG_LONG 1
#define HAVE_LONG_LONG_INT 1
/*