Lines 72-80
Link Here
|
72 |
/* Includes and compiler specific definitions */ |
72 |
/* Includes and compiler specific definitions */ |
73 |
/* ----------------------------------------------------------------------- */ |
73 |
/* ----------------------------------------------------------------------- */ |
74 |
|
74 |
|
|
|
75 |
#include "config.h" |
75 |
#include "ae.h" |
76 |
#include "ae.h" |
76 |
#include <stdlib.h> |
77 |
#include <stdlib.h> |
77 |
#include <string.h> |
78 |
#include <string.h> |
|
|
79 |
#if defined(HAVE_STRINGS_H) |
80 |
#include <strings.h> |
81 |
#endif |
82 |
#if defined(HAVE_ENDIAN_H) |
83 |
#include <endian.h> |
84 |
#elif defined(HAVE_SYS_ENDIAN_H) |
85 |
#include <sys/types.h> |
86 |
#include <sys/endian.h> |
87 |
#endif |
78 |
|
88 |
|
79 |
/* Define standard sized integers */ |
89 |
/* Define standard sized integers */ |
80 |
#if defined(_MSC_VER) && (_MSC_VER < 1600) |
90 |
#if defined(_MSC_VER) && (_MSC_VER < 1600) |
Lines 101-106
Link Here
|
101 |
|
111 |
|
102 |
#if _MSC_VER |
112 |
#if _MSC_VER |
103 |
#define bswap64(x) _byteswap_uint64(x) |
113 |
#define bswap64(x) _byteswap_uint64(x) |
|
|
114 |
#elif HAVE_DECL_BSWAP64 |
115 |
/* nothing */ |
104 |
#elif HAVE_DECL___BUILTIN_BSWAP64 |
116 |
#elif HAVE_DECL___BUILTIN_BSWAP64 |
105 |
#define bswap64(x) __builtin_bswap64(x) /* GCC 4.3+ */ |
117 |
#define bswap64(x) __builtin_bswap64(x) /* GCC 4.3+ */ |
106 |
#else |
118 |
#else |
Lines 121-126
Link Here
|
121 |
static inline unsigned ntz(unsigned x) {_BitScanForward(&x,x);return x;} |
133 |
static inline unsigned ntz(unsigned x) {_BitScanForward(&x,x);return x;} |
122 |
#elif HAVE_DECL___BUILTIN_CTZ |
134 |
#elif HAVE_DECL___BUILTIN_CTZ |
123 |
#define ntz(x) __builtin_ctz((unsigned)(x)) /* GCC 3.4+ */ |
135 |
#define ntz(x) __builtin_ctz((unsigned)(x)) /* GCC 3.4+ */ |
|
|
136 |
#elif HAVE_DECL_FFS |
137 |
#define ntz(x) (ffs(x) - 1) |
124 |
#else |
138 |
#else |
125 |
#if (L_TABLE_SZ <= 9) && (L_TABLE_SZ_IS_ENOUGH) /* < 2^13 byte texts */ |
139 |
#if (L_TABLE_SZ <= 9) && (L_TABLE_SZ_IS_ENOUGH) /* < 2^13 byte texts */ |
126 |
static inline unsigned ntz(unsigned x) { |
140 |
static inline unsigned ntz(unsigned x) { |