mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
Add BSWAP64 macro.
This is like BSWAP32, but for 64-bit values. Since we've got two of them now and they have use cases (like sortsupport) beyond CRCs, move the definitions to their own header file. Peter Geoghegan
This commit is contained in:
@ -214,6 +214,24 @@ fi])# PGAC_C_BUILTIN_BSWAP32
|
||||
|
||||
|
||||
|
||||
# PGAC_C_BUILTIN_BSWAP64
|
||||
# -------------------------
|
||||
# Check if the C compiler understands __builtin_bswap64(),
|
||||
# and define HAVE__BUILTIN_BSWAP64 if so.
|
||||
AC_DEFUN([PGAC_C_BUILTIN_BSWAP64],
|
||||
[AC_CACHE_CHECK(for __builtin_bswap64, pgac_cv__builtin_bswap64,
|
||||
[AC_COMPILE_IFELSE([AC_LANG_SOURCE(
|
||||
[static unsigned long int x = __builtin_bswap64(0xaabbccddeeff0011);]
|
||||
)],
|
||||
[pgac_cv__builtin_bswap64=yes],
|
||||
[pgac_cv__builtin_bswap64=no])])
|
||||
if test x"$pgac_cv__builtin_bswap64" = xyes ; then
|
||||
AC_DEFINE(HAVE__BUILTIN_BSWAP64, 1,
|
||||
[Define to 1 if your compiler understands __builtin_bswap64.])
|
||||
fi])# PGAC_C_BUILTIN_BSWAP64
|
||||
|
||||
|
||||
|
||||
# PGAC_C_BUILTIN_CONSTANT_P
|
||||
# -------------------------
|
||||
# Check if the C compiler understands __builtin_constant_p(),
|
||||
|
Reference in New Issue
Block a user