Browse Source

[core] use system xxhash lib if available

master
Glenn Strauss 1 year ago
parent
commit
28b086aa26
  1. 7
      src/algo_xxhash.c
  2. 15
      src/algo_xxhash.h

7
src/algo_xxhash.c

@ -1,3 +1,8 @@
#include "first.h"
typedef int innocuous_typedef_to_quiet_empty_translation_unit_compiler_warning;
#ifndef HAVE_XXHASH_H
/*
* xxHash - Extremely Fast Hash algorithm
* Copyright (C) 2012-2020 Yann Collet
@ -41,3 +46,5 @@
#define XXH_IMPLEMENTATION /* access definitions */
#include "algo_xxhash.h"
#endif /* ! HAVE_XXHASH_H */

15
src/algo_xxhash.h

@ -1,8 +1,19 @@
#ifndef INCLUDED_ALGO_XXHASH_H
#define INCLUDED_ALGO_XXHASH_H
#include "first.h"
/*(lighttpd customization)*/
/*#define XXH_NO_INLINE_HINTS 1*/
/*#define XXH_REROLL 1*/
#define XXH_NO_LONG_LONG
#ifdef HAVE_XXHASH_H
#include <xxhash.h>
#else /* ! HAVE_XXHASH_H */
/*
* xxHash - Extremely Fast Hash algorithm
* Header File
@ -4769,3 +4780,7 @@ XXH128_hashFromCanonical(const XXH128_canonical_t* src)
#if defined (__cplusplus)
}
#endif
#endif /* ! HAVE_XXHASH_H */
#endif

Loading…
Cancel
Save