📄 ax_create_stdint_h.m4
字号:
#ifdef _STDINT_HAVE_U_INT_TYPES#undef _STDINT_NEED_INT_MODEL_T#endif#ifdef _STDINT_CHAR_MODEL#if _STDINT_CHAR_MODEL+0 == 122 || _STDINT_CHAR_MODEL+0 == 124#ifndef _STDINT_BYTE_MODEL#define _STDINT_BYTE_MODEL 12#endif#endif#endif#ifndef _STDINT_HAVE_INT_LEAST32_T#define _STDINT_NEED_INT_LEAST_T#endif#ifndef _STDINT_HAVE_INT_FAST32_T#define _STDINT_NEED_INT_FAST_T#endif#ifndef _STDINT_HEADER_INTPTR#define _STDINT_NEED_INTPTR_T#ifndef _STDINT_HAVE_INTMAX_T#define _STDINT_NEED_INTMAX_T#endif#endif/* .................... definition part ............................ *//* some system headers have good uint64_t */#ifndef _HAVE_UINT64_T#if defined _STDINT_HAVE_UINT64_T || defined HAVE_UINT64_T#define _HAVE_UINT64_T#elif defined _STDINT_HAVE_U_INT64_T || defined HAVE_U_INT64_T#define _HAVE_UINT64_Ttypedef u_int64_t uint64_t;#endif#endif#ifndef _HAVE_UINT64_T/* .. here are some common heuristics using compiler runtime specifics */#if defined __STDC_VERSION__ && defined __STDC_VERSION__ >= 199901L#define _HAVE_UINT64_T#define _HAVE_LONGLONG_UINT64_Ttypedef long long int64_t;typedef unsigned long long uint64_t;#elif !defined __STRICT_ANSI__#if defined _MSC_VER || defined __WATCOMC__ || defined __BORLANDC__#define _HAVE_UINT64_Ttypedef __int64 int64_t;typedef unsigned __int64 uint64_t;#elif defined __GNUC__ || defined __MWERKS__ || defined __ELF__/* note: all ELF-systems seem to have loff-support which needs 64-bit */#if !defined _NO_LONGLONG#define _HAVE_UINT64_T#define _HAVE_LONGLONG_UINT64_Ttypedef long long int64_t;typedef unsigned long long uint64_t;#endif#elif defined __alpha || (defined __mips && defined _ABIN32)#if !defined _NO_LONGLONGtypedef long int64_t;typedef unsigned long uint64_t;#endif /* compiler/cpu type to define int64_t */#endif#endif#endif#if defined _STDINT_HAVE_U_INT_TYPES/* int8_t int16_t int32_t defined by inet code, redeclare the u_intXX types */typedef u_int8_t uint8_t;typedef u_int16_t uint16_t;typedef u_int32_t uint32_t;/* glibc compatibility */#ifndef __int8_t_defined#define __int8_t_defined#endif#endif#ifdef _STDINT_NEED_INT_MODEL_T/* we must guess all the basic types. Apart from byte-adressable system, *//* there a few 32-bit-only dsp-systems that we guard with BYTE_MODEL 8-} *//* (btw, those nibble-addressable systems are way off, or so we assume) */dnl /* have a look at "64bit and data size neutrality" at */dnl /* http://unix.org/version2/whatsnew/login_64bit.html */dnl /* (the shorthand "ILP" types always have a "P" part) */#if defined _STDINT_BYTE_MODEL#if _STDINT_LONG_MODEL+0 == 242/* 2:4:2 = IP16 = a normal 16-bit system */typedef unsigned char uint8_t;typedef unsigned short uint16_t;typedef unsigned long uint32_t;#ifndef __int8_t_defined#define __int8_t_definedtypedef char int8_t;typedef short int16_t;typedef long int32_t;#endif#elif _STDINT_LONG_MODEL+0 == 244 || _STDINT_LONG_MODEL == 444/* 2:4:4 = LP32 = a 32-bit system derived from a 16-bit *//* 4:4:4 = ILP32 = a normal 32-bit system */typedef unsigned char uint8_t;typedef unsigned short uint16_t;typedef unsigned int uint32_t;#ifndef __int8_t_defined#define __int8_t_definedtypedef char int8_t;typedef short int16_t;typedef int int32_t;#endif#elif _STDINT_LONG_MODEL+0 == 484 || _STDINT_LONG_MODEL+0 == 488/* 4:8:4 = IP32 = a 32-bit system prepared for 64-bit *//* 4:8:8 = LP64 = a normal 64-bit system */typedef unsigned char uint8_t;typedef unsigned short uint16_t;typedef unsigned int uint32_t;#ifndef __int8_t_defined#define __int8_t_definedtypedef char int8_t;typedef short int16_t;typedef int int32_t;#endif/* this system has a "long" of 64bit */#ifndef _HAVE_UINT64_T#define _HAVE_UINT64_Ttypedef unsigned long uint64_t;typedef long int64_t;#endif#elif _STDINT_LONG_MODEL+0 == 448/* LLP64 a 64-bit system derived from a 32-bit system */typedef unsigned char uint8_t;typedef unsigned short uint16_t;typedef unsigned int uint32_t;#ifndef __int8_t_defined#define __int8_t_definedtypedef char int8_t;typedef short int16_t;typedef int int32_t;#endif/* assuming the system has a "long long" */#ifndef _HAVE_UINT64_T#define _HAVE_UINT64_T#define _HAVE_LONGLONG_UINT64_Ttypedef unsigned long long uint64_t;typedef long long int64_t;#endif#else#define _STDINT_NO_INT32_T#endif#else#define _STDINT_NO_INT8_T#define _STDINT_NO_INT32_T#endif#endif/* * quote from SunOS-5.8 sys/inttypes.h: * Use at your own risk. As of February 1996, the committee is squarely * behind the fixed sized types; the "least" and "fast" types are still being * discussed. The probability that the "fast" types may be removed before * the standard is finalized is high enough that they are not currently * implemented. */#if defined _STDINT_NEED_INT_LEAST_Ttypedef int8_t int_least8_t;typedef int16_t int_least16_t;typedef int32_t int_least32_t;#ifdef _HAVE_UINT64_Ttypedef int64_t int_least64_t;#endiftypedef uint8_t uint_least8_t;typedef uint16_t uint_least16_t;typedef uint32_t uint_least32_t;#ifdef _HAVE_UINT64_Ttypedef uint64_t uint_least64_t;#endif /* least types */#endif#if defined _STDINT_NEED_INT_FAST_Ttypedef int8_t int_fast8_t;typedef int int_fast16_t;typedef int32_t int_fast32_t;#ifdef _HAVE_UINT64_Ttypedef int64_t int_fast64_t;#endiftypedef uint8_t uint_fast8_t;typedef unsigned uint_fast16_t;typedef uint32_t uint_fast32_t;#ifdef _HAVE_UINT64_Ttypedef uint64_t uint_fast64_t;#endif /* fast types */#endif#ifdef _STDINT_NEED_INTMAX_T#ifdef _HAVE_UINT64_Ttypedef int64_t intmax_t;typedef uint64_t uintmax_t;#elsetypedef long intmax_t;typedef unsigned long uintmax_t;#endif#endif#ifdef _STDINT_NEED_INTPTR_T#ifndef __intptr_t_defined#define __intptr_t_defined/* we encourage using "long" to store pointer values, never use "int" ! */#if _STDINT_LONG_MODEL+0 == 242 || _STDINT_LONG_MODEL+0 == 484typedef unsigned int uintptr_t;typedef int intptr_t;#elif _STDINT_LONG_MODEL+0 == 244 || _STDINT_LONG_MODEL+0 == 444typedef unsigned long uintptr_t;typedef long intptr_t;#elif _STDINT_LONG_MODEL+0 == 448 && defined _HAVE_UINT64_Ttypedef uint64_t uintptr_t;typedef int64_t intptr_t;#else /* matches typical system types ILP32 and LP64 - but not IP16 or LLP64 */typedef unsigned long uintptr_t;typedef long intptr_t;#endif#endif#endif/* The ISO C99 standard specifies that in C++ implementations these should only be defined if explicitly requested. */#if !defined __cplusplus || defined __STDC_CONSTANT_MACROS#ifndef UINT32_C/* Signed. */# define INT8_C(c) c# define INT16_C(c) c# define INT32_C(c) c# ifdef _HAVE_LONGLONG_UINT64_T# define INT64_C(c) c ## L# else# define INT64_C(c) c ## LL# endif/* Unsigned. */# define UINT8_C(c) c ## U# define UINT16_C(c) c ## U# define UINT32_C(c) c ## U# ifdef _HAVE_LONGLONG_UINT64_T# define UINT64_C(c) c ## UL# else# define UINT64_C(c) c ## ULL# endif/* Maximal type. */# ifdef _HAVE_LONGLONG_UINT64_T# define INTMAX_C(c) c ## L# define UINTMAX_C(c) c ## UL# else# define INTMAX_C(c) c ## LL# define UINTMAX_C(c) c ## ULL# endif /* literalnumbers */#endif#endif/* These limits are merily those of a two complement byte-oriented system *//* Minimum of signed integral types. */# define INT8_MIN (-128)# define INT16_MIN (-32767-1)# define INT32_MIN (-2147483647-1)# define INT64_MIN (-__INT64_C(9223372036854775807)-1)/* Maximum of signed integral types. */# define INT8_MAX (127)# define INT16_MAX (32767)# define INT32_MAX (2147483647)# define INT64_MAX (__INT64_C(9223372036854775807))/* Maximum of unsigned integral types. */# define UINT8_MAX (255)# define UINT16_MAX (65535)# define UINT32_MAX (4294967295U)# define UINT64_MAX (__UINT64_C(18446744073709551615))/* Minimum of signed integral types having a minimum size. */# define INT_LEAST8_MIN INT8_MIN# define INT_LEAST16_MIN INT16_MIN# define INT_LEAST32_MIN INT32_MIN# define INT_LEAST64_MIN INT64_MIN/* Maximum of signed integral types having a minimum size. */# define INT_LEAST8_MAX INT8_MAX# define INT_LEAST16_MAX INT16_MAX# define INT_LEAST32_MAX INT32_MAX# define INT_LEAST64_MAX INT64_MAX/* Maximum of unsigned integral types having a minimum size. */# define UINT_LEAST8_MAX UINT8_MAX# define UINT_LEAST16_MAX UINT16_MAX# define UINT_LEAST32_MAX UINT32_MAX# define UINT_LEAST64_MAX UINT64_MAX /* shortcircuit*/#endif /* once */#endif#endifSTDINT_EOFfi if cmp -s $ac_stdint_h $ac_stdint 2>/dev/null; then AC_MSG_NOTICE([$ac_stdint_h is unchanged]) else ac_dir=`AS_DIRNAME(["$ac_stdint_h"])` AS_MKDIR_P(["$ac_dir"]) rm -f $ac_stdint_h mv $ac_stdint $ac_stdint_h fi],[# variables for create stdint.h replacementPACKAGE="$PACKAGE"VERSION="$VERSION"ac_stdint_h="$ac_stdint_h"_ac_stdint_h=AS_TR_CPP(_$PACKAGE-$ac_stdint_h)ac_cv_stdint_message="$ac_cv_stdint_message"ac_cv_header_stdint_t="$ac_cv_header_stdint_t"ac_cv_header_stdint_x="$ac_cv_header_stdint_x"ac_cv_header_stdint_o="$ac_cv_header_stdint_o"ac_cv_header_stdint_u="$ac_cv_header_stdint_u"ac_cv_type_uint64_t="$ac_cv_type_uint64_t"ac_cv_type_u_int64_t="$ac_cv_type_u_int64_t"ac_cv_char_data_model="$ac_cv_char_data_model"ac_cv_long_data_model="$ac_cv_long_data_model"ac_cv_type_int_least32_t="$ac_cv_type_int_least32_t"ac_cv_type_int_fast32_t="$ac_cv_type_int_fast32_t"ac_cv_type_intmax_t="$ac_cv_type_intmax_t"])])
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -