Re: AC_TYPE_UINT8_T and co

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Patrick Welche <prlw1@xxxxxxxxxxxxxx> 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.


_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux