+7
-3
@@ -399,14 +399,18 @@ public:
|
|||||||
[AC_MSG_RESULT([no])])
|
[AC_MSG_RESULT([no])])
|
||||||
AC_LANG_POP(C++)
|
AC_LANG_POP(C++)
|
||||||
|
|
||||||
AC_CHECK_DECLS([__builtin_bswap64, __builtin_ctz])
|
|
||||||
|
|
||||||
AC_CHECK_DECL([mach_absolute_time],
|
AC_CHECK_DECL([mach_absolute_time],
|
||||||
[AC_DEFINE([HAVE_MACH_ABSOLUTE_TIME], [1],
|
[AC_DEFINE([HAVE_MACH_ABSOLUTE_TIME], [1],
|
||||||
[Define if mach_absolute_time is available.])],
|
[Define if mach_absolute_time is available.])],
|
||||||
, [[#include <mach/mach_time.h>]])
|
, [[#include <mach/mach_time.h>]])
|
||||||
|
|
||||||
AC_CHECK_DECLS([be64toh, betoh64], [], [],
|
|
||||||
|
AC_CHECK_DECLS([__builtin_ctz])
|
||||||
|
|
||||||
|
AC_CHECK_DECLS([ffs], [], [],
|
||||||
|
[[#include <strings.h>]])
|
||||||
|
|
||||||
|
AC_CHECK_DECLS([be64toh, betoh64, bswap64, __builtin_bswap64], [], [],
|
||||||
[[#if defined(HAVE_ENDIAN_H)
|
[[#if defined(HAVE_ENDIAN_H)
|
||||||
#include <endian.h>
|
#include <endian.h>
|
||||||
#elif defined(HAVE_SYS_ENDIAN_H)
|
#elif defined(HAVE_SYS_ENDIAN_H)
|
||||||
|
|||||||
@@ -80,6 +80,15 @@
|
|||||||
#include "ae.h"
|
#include "ae.h"
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#if defined(HAVE_STRINGS_H)
|
||||||
|
#include <strings.h>
|
||||||
|
#endif
|
||||||
|
#if defined(HAVE_ENDIAN_H)
|
||||||
|
#include <endian.h>
|
||||||
|
#elif defined(HAVE_SYS_ENDIAN_H)
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/endian.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Define standard sized integers */
|
/* Define standard sized integers */
|
||||||
#if defined(_MSC_VER) && (_MSC_VER < 1600)
|
#if defined(_MSC_VER) && (_MSC_VER < 1600)
|
||||||
@@ -110,6 +119,8 @@
|
|||||||
|
|
||||||
#if _MSC_VER
|
#if _MSC_VER
|
||||||
#define bswap64(x) _byteswap_uint64(x)
|
#define bswap64(x) _byteswap_uint64(x)
|
||||||
|
#elif HAVE_DECL_BSWAP64
|
||||||
|
/* nothing */
|
||||||
#elif HAVE_DECL___BUILTIN_BSWAP64
|
#elif HAVE_DECL___BUILTIN_BSWAP64
|
||||||
#define bswap64(x) __builtin_bswap64(x) /* GCC 4.3+ */
|
#define bswap64(x) __builtin_bswap64(x) /* GCC 4.3+ */
|
||||||
#else
|
#else
|
||||||
@@ -130,6 +141,8 @@
|
|||||||
static inline unsigned ntz(unsigned x) {_BitScanForward(&x,x);return x;}
|
static inline unsigned ntz(unsigned x) {_BitScanForward(&x,x);return x;}
|
||||||
#elif HAVE_DECL___BUILTIN_CTZ
|
#elif HAVE_DECL___BUILTIN_CTZ
|
||||||
#define ntz(x) __builtin_ctz((unsigned)(x)) /* GCC 3.4+ */
|
#define ntz(x) __builtin_ctz((unsigned)(x)) /* GCC 3.4+ */
|
||||||
|
#elif HAVE_DECL_FFS
|
||||||
|
#define ntz(x) (ffs(x) - 1)
|
||||||
#else
|
#else
|
||||||
#if (L_TABLE_SZ <= 9) && (L_TABLE_SZ_IS_ENOUGH) /* < 2^13 byte texts */
|
#if (L_TABLE_SZ <= 9) && (L_TABLE_SZ_IS_ENOUGH) /* < 2^13 byte texts */
|
||||||
static inline unsigned ntz(unsigned x) {
|
static inline unsigned ntz(unsigned x) {
|
||||||
|
|||||||
Reference in New Issue
Block a user