Add SIZEOF_{LONG,POINTER,SIZE_T} checks
This commit is contained in:
parent
8e969c04e2
commit
fba5138c0d
16
libbuild2-autoconf/libbuild2/autoconf/checks/SIZEOF_LONG.h
Normal file
16
libbuild2-autoconf/libbuild2/autoconf/checks/SIZEOF_LONG.h
Normal file
@ -0,0 +1,16 @@
|
||||
// SIZEOF_LONG
|
||||
|
||||
#undef SIZEOF_LONG
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# define SIZEOF_LONG 4
|
||||
#else
|
||||
/* Both GCC and Clang (and maybe others) define __SIZEOF_LONG__. */
|
||||
# ifdef __SIZEOF_LONG__
|
||||
# define SIZEOF_LONG __SIZEOF_LONG__
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef SIZEOF_LONG
|
||||
# error unable to determine size of long int
|
||||
#endif
|
@ -0,0 +1,23 @@
|
||||
// SIZEOF_POINTER
|
||||
|
||||
/* See also SIZEOF_SIZE_T (the two may not be the same). */
|
||||
|
||||
#undef SIZEOF_POINTER
|
||||
|
||||
#ifdef _MSC_VER
|
||||
/* _WIN64 is defined for both x64 (x86_64) and ARM64 (aarch64). */
|
||||
# ifdef _WIN64
|
||||
# define SIZEOF_POINTER 8
|
||||
# else
|
||||
# define SIZEOF_POINTER 4
|
||||
# endif
|
||||
#else
|
||||
/* Both GCC and Clang (and maybe others) define __SIZEOF_POINTER__. */
|
||||
# ifdef __SIZEOF_POINTER__
|
||||
# define SIZEOF_POINTER __SIZEOF_POINTER__
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef SIZEOF_POINTER
|
||||
# error unable to determine size of pointer
|
||||
#endif
|
23
libbuild2-autoconf/libbuild2/autoconf/checks/SIZEOF_SIZE_T.h
Normal file
23
libbuild2-autoconf/libbuild2/autoconf/checks/SIZEOF_SIZE_T.h
Normal file
@ -0,0 +1,23 @@
|
||||
// SIZEOF_SIZE_T
|
||||
|
||||
/* See also SIZEOF_POINTER (the two may not be the same). */
|
||||
|
||||
#undef SIZEOF_SIZE_T
|
||||
|
||||
#ifdef _MSC_VER
|
||||
/* _WIN64 is defined for both x64 (x86_64) and ARM64 (aarch64). */
|
||||
# ifdef _WIN64
|
||||
# define SIZEOF_SIZE_T 8
|
||||
# else
|
||||
# define SIZEOF_SIZE_T 4
|
||||
# endif
|
||||
#else
|
||||
/* Both GCC and Clang (and maybe others) define __SIZEOF_SIZE_T__. */
|
||||
# ifdef __SIZEOF_SIZE_T__
|
||||
# define SIZEOF_SIZE_T __SIZEOF_SIZE_T__
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef SIZEOF_SIZE_T
|
||||
# error unable to determine size of size_t
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user