mirror of
https://github.com/transmission/transmission.git
synced 2025-12-20 02:18:42 +00:00
* feat: CRC32-C * feat: canonical peer priority calculation bep-40 * test: add test cases for IPv4 canonical peer priority * refactor: compare by canonical priority * fix: use network byte order for peer ports * test: more cases * build: xcode Co-authored-by: Dzmitry Neviadomski <nevack.d@gmail.com> * ci: test system crc32c library --------- Co-authored-by: Dzmitry Neviadomski <nevack.d@gmail.com>
49 lines
1.5 KiB
C
49 lines
1.5 KiB
C
// Copyright 2017 The CRC32C Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file. See the AUTHORS file for names of contributors.
|
|
|
|
#ifndef CRC32C_CRC32C_CONFIG_H_
|
|
#define CRC32C_CRC32C_CONFIG_H_
|
|
|
|
// Define to 1 if building for a big-endian platform.
|
|
#undef BYTE_ORDER_BIG_ENDIAN
|
|
|
|
// Define to 1 if the compiler has the __builtin_prefetch intrinsic.
|
|
#if __has_builtin(__builtin_prefetch)
|
|
#define HAVE_BUILTIN_PREFETCH 1
|
|
#else
|
|
#undef HAVE_BUILTIN_PREFETCH
|
|
#endif
|
|
|
|
// Define to 1 if targeting X86 and the compiler has the _mm_prefetch intrinsic.
|
|
#undef HAVE_MM_PREFETCH
|
|
|
|
// Define to 1 if targeting X86 and the compiler has the _mm_crc32_u{8,32,64}
|
|
// intrinsics.
|
|
#if defined(__x86_64__)
|
|
#define HAVE_SSE42 1
|
|
#else
|
|
#undef HAVE_SSE42
|
|
#endif
|
|
|
|
// Define to 1 if targeting ARM and the compiler has the __crc32c{b,h,w,d} and
|
|
// the vmull_p64 intrinsics.
|
|
#if defined(__aarch64__)
|
|
#define HAVE_ARM64_CRC32C 1
|
|
#else
|
|
#undef HAVE_ARM64_CRC32C
|
|
#endif
|
|
|
|
// Define to 1 if the system libraries have the getauxval function in the
|
|
// <sys/auxv.h> header. Should be true on Linux and Android API level 20+.
|
|
#undef HAVE_STRONG_GETAUXVAL
|
|
|
|
// Define to 1 if the compiler supports defining getauxval as a weak symbol.
|
|
// Should be true for any compiler that supports __attribute__((weak)).
|
|
#undef HAVE_WEAK_GETAUXVAL
|
|
|
|
// Define to 1 if CRC32C tests have been built with Google Logging.
|
|
#undef CRC32C_TESTS_BUILT_WITH_GLOG
|
|
|
|
#endif // CRC32C_CRC32C_CONFIG_H_
|