1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-01-01 17:24:50 +01:00

36577: supplement 36559 to using LONG_MAX for 64-bit long

This commit is contained in:
Peter Stephenson 2015-09-21 14:39:21 +01:00
parent 5476e011f1
commit 8b84419f45
3 changed files with 13 additions and 0 deletions

View file

@ -16,6 +16,9 @@
2015-09-21 Peter Stephenson <p.stephenson@samsung.com> 2015-09-21 Peter Stephenson <p.stephenson@samsung.com>
* 36577: configure.ac, Src/zsh.h: supplement 36559 to
use LONG_MAX for 64-bit long.
* unposted: Src/zsh.h: typo in 36559. * unposted: Src/zsh.h: typo in 36559.
2015-09-19 Barton E. Schaefer <schaefer@zsh.org> 2015-09-19 Barton E. Schaefer <schaefer@zsh.org>

View file

@ -39,9 +39,13 @@ typedef ZSH_64_BIT_TYPE zlong;
#if defined(ZLONG_IS_LONG_LONG) && defined(LLONG_MAX) #if defined(ZLONG_IS_LONG_LONG) && defined(LLONG_MAX)
#define ZLONG_MAX LLONG_MAX #define ZLONG_MAX LLONG_MAX
#else #else
#ifdef ZLONG_IS_LONG_64
#define ZLONG_MAX LONG_MAX
#else
/* umm... */ /* umm... */
#define ZLONG_MAX ((zlong)9223372036854775807) #define ZLONG_MAX ((zlong)9223372036854775807)
#endif #endif
#endif
#ifdef ZSH_64_BIT_UTYPE #ifdef ZSH_64_BIT_UTYPE
typedef ZSH_64_BIT_UTYPE zulong; typedef ZSH_64_BIT_UTYPE zulong;
#else #else

View file

@ -1079,9 +1079,15 @@ main() { return sizeof(ino_t) < 8; }
fi fi
AH_TEMPLATE([ZLONG_IS_LONG_LONG], AH_TEMPLATE([ZLONG_IS_LONG_LONG],
[Define to 1 if the zlong type uses long long int.]) [Define to 1 if the zlong type uses long long int.])
AH_TEMPLATE([ZLONG_IS_LONG_64],
[Define to 1 if the zlong type uses 64-bit long int.])
if test "$zsh_cv_64_bit_type" = "long long"; then if test "$zsh_cv_64_bit_type" = "long long"; then
dnl Remember this so we can get (s)printf output right. dnl Remember this so we can get (s)printf output right.
AC_DEFINE(ZLONG_IS_LONG_LONG) AC_DEFINE(ZLONG_IS_LONG_LONG)
else
if test "$zsh_cv_64_bit_type" = "long"; then
AC_DEFINE(ZLONG_IS_LONG_64)
fi
fi fi
dnl We'll blithely assume (f)printf supports the same types as sprintf. dnl We'll blithely assume (f)printf supports the same types as sprintf.