[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AC_TYPE_UINT8_T and co
From: |
Paul Eggert |
Subject: |
Re: AC_TYPE_UINT8_T and co |
Date: |
Wed, 30 May 2007 14:39:35 -0700 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) |
Patrick Welche <address@hidden> writes:
> How does that sound?
The "right" way to do it in portable C99 code is this way:
#include <stdint.h>
#ifdef INT64_MAX
code using int64_t
#else
long-winded int32_t alternative
#endif
If you're using Gnulib's stdint module
<http://www.gnu.org/software/gnulib/MODULES.html#module=stdint> that's
all you need to do. If you'd rather not use Gnulib for whatever
reason, you can approximate it this way:
# in configure.ac:
AC_TYPE_INT64_T
/* in C89 or C99 source: */
#if HAVE_STDINT_H
# include <stdint.h>
#endif
#if defined INT64_MAX || defined int64_t
code using int64_t
#else
long-winded int32_t alternative
#endif
So configure.ac shouldn't need AC_CHECK_TYPES([int64_t]) at all.
- Re: AC_TYPE_UINT8_T and co, (continued)
- Re: AC_TYPE_UINT8_T and co, Patrick Welche, 2007/05/29
- Re: AC_TYPE_UINT8_T and co, Patrick Welche, 2007/05/29
- Message not available
- Re: AC_TYPE_UINT8_T and co, Patrick Welche, 2007/05/29
- Re: AC_TYPE_UINT8_T and co, Paul Eggert, 2007/05/29
- Re: AC_TYPE_UINT8_T and co, Stepan Kasal, 2007/05/30
- Re: AC_TYPE_UINT8_T and co, Patrick Welche, 2007/05/30
- Re: AC_TYPE_UINT8_T and co, Stepan Kasal, 2007/05/30
- Re: AC_TYPE_UINT8_T and co, Paul Eggert, 2007/05/30
- Re: AC_TYPE_UINT8_T and co, Stepan Kasal, 2007/05/30
- Re: AC_TYPE_UINT8_T and co, Patrick Welche, 2007/05/30
- Re: AC_TYPE_UINT8_T and co,
Paul Eggert <=
- Re: AC_TYPE_UINT8_T and co, Paul Eggert, 2007/05/31
- Re: AC_TYPE_UINT8_T and co, Patrick Welche, 2007/05/29
Re: AC_TYPE_UINT8_T and co, Paul Eggert, 2007/05/29