View | Details | Raw Unified | Return to bug 209019 | Differences between
and this patch

Collapse All | Expand All

(-)configure.ac (-3 / +7 lines)
Lines 322-335 public: Link Here
322
  [AC_MSG_RESULT([no])])
322
  [AC_MSG_RESULT([no])])
323
AC_LANG_POP(C++)
323
AC_LANG_POP(C++)
324
324
325
AC_CHECK_DECLS([__builtin_bswap64, __builtin_ctz])
326
327
AC_CHECK_DECL([mach_absolute_time],
325
AC_CHECK_DECL([mach_absolute_time],
328
  [AC_DEFINE([HAVE_MACH_ABSOLUTE_TIME], [1],
326
  [AC_DEFINE([HAVE_MACH_ABSOLUTE_TIME], [1],
329
     [Define if mach_absolute_time is available.])],
327
     [Define if mach_absolute_time is available.])],
330
  , [[#include <mach/mach_time.h>]])
328
  , [[#include <mach/mach_time.h>]])
331
329
332
AC_CHECK_DECLS([be64toh, betoh64], [], [],
330
331
AC_CHECK_DECLS([__builtin_ctz])
332
333
AC_CHECK_DECLS([ffs], [], [],
334
  [[#include <strings.h>]])
335
336
AC_CHECK_DECLS([be64toh, betoh64, bswap64, __builtin_bswap64], [], [],
333
  [[#if defined(HAVE_ENDIAN_H)
337
  [[#if defined(HAVE_ENDIAN_H)
334
#include <endian.h>
338
#include <endian.h>
335
#elif defined(HAVE_SYS_ENDIAN_H)
339
#elif defined(HAVE_SYS_ENDIAN_H)
(-)src/crypto/ocb.cc (+14 lines)
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) {

Return to bug 209019