Browse Source

[core] use system xxhash lib if available

master
Glenn Strauss 2 months ago
parent
commit
28b086aa26
2 changed files with 22 additions and 0 deletions
  1. +7
    -0
      src/algo_xxhash.c
  2. +15
    -0
      src/algo_xxhash.h

+ 7
- 0
src/algo_xxhash.c View File

@ -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
- 0
src/algo_xxhash.h View File

@ -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