mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-12-23 02:01:55 +00:00
Birdtest: U64_C() macro
This commit is contained in:
parent
ca996d807f
commit
804ee1458d
@ -247,6 +247,10 @@ AC_TRY_COMPILE([#include <sys/types.h>
|
||||
AC_C_BIGENDIAN([AC_DEFINE(CPU_BIG_ENDIAN)], [AC_DEFINE(CPU_LITTLE_ENDIAN)],
|
||||
[AC_MSG_ERROR([Cannot determine CPU endianity.])])
|
||||
|
||||
AC_CHECK_SIZEOF(unsigned int)
|
||||
AC_CHECK_SIZEOF(unsigned long)
|
||||
AC_CHECK_SIZEOF(unsigned long long)
|
||||
|
||||
BIRD_CHECK_INTEGERS
|
||||
BIRD_CHECK_STRUCT_ALIGN
|
||||
BIRD_CHECK_TIME_T
|
||||
|
@ -20,7 +20,13 @@
|
||||
#include "lib/sha512.h"
|
||||
#include "lib/unaligned.h"
|
||||
|
||||
#define U64_C(c) (c ## UL) /* Maybe is system dependent */
|
||||
#if SIZEOF_UNSIGNED_INT == 8
|
||||
#define U64_C(c) (c ## U)
|
||||
#elif SIZEOF_UNSIGNED_LONG == 8
|
||||
#define U64_C(c) (c ## UL)
|
||||
#elif SIZEOF_UNSIGNED_LONG_LONG == 8
|
||||
#define U64_C(c) (c ## ULL)
|
||||
#endif
|
||||
|
||||
static uint sha512_transform(void *context, const byte *data, size_t nblks);
|
||||
|
||||
|
@ -66,4 +66,13 @@
|
||||
/* We have stdint.h */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* The size of `unsigned int', as computed by sizeof. */
|
||||
#undef SIZEOF_UNSIGNED_INT
|
||||
|
||||
/* The size of `unsigned long', as computed by sizeof. */
|
||||
#undef SIZEOF_UNSIGNED_LONG
|
||||
|
||||
/* The size of `unsigned long long', as computed by sizeof. */
|
||||
#undef SIZEOF_UNSIGNED_LONG_LONG
|
||||
|
||||
#define CONFIG_PATH ?
|
||||
|
@ -15,6 +15,18 @@
|
||||
/* Include OS configuration file as chosen in autoconf.h */
|
||||
#include SYSCONF_INCLUDE
|
||||
|
||||
/* The AC_CHECK_SIZEOF() in configure fails for some machines.
|
||||
* we provide some fallback values here */
|
||||
#ifndef SIZEOF_UNSIGNED_INT
|
||||
# define SIZEOF_UNSIGNED_INT 4
|
||||
#endif
|
||||
#ifndef SIZEOF_UNSIGNED_LONG
|
||||
# define SIZEOF_UNSIGNED_LONG 4
|
||||
#endif
|
||||
#ifndef SIZEOF_UNSIGNED_LONG_LONG
|
||||
# define SIZEOF_UNSIGNED_LONG_LONG 8
|
||||
#endif
|
||||
|
||||
#ifndef MACROS_ONLY
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user