Move portability macros to `lib/common/portability_macros.h`. This file only contains platform/feature detection (e.g. 0/1 macros). This file is shared between C and ASM code, so it cannot include any C code. Rename `HUF_` ASM macros to be `ZSTD_` prefixed, and move to the new header. Restrict `ZSTD_ASM_SUPPORTED` to `__GNUC__`, because we need the GAS assembler. Finally, only include the ASM code if we are actually going to use it. This disables it on all Windows platforms, which should resolve the problem brought up in Issue #2789.
35 lines
1.1 KiB
C
35 lines
1.1 KiB
C
/* SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause */
|
|
/*
|
|
* Copyright (c) Facebook, Inc.
|
|
* All rights reserved.
|
|
*
|
|
* This source code is licensed under both the BSD-style license (found in the
|
|
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
|
|
* in the COPYING file in the root directory of this source tree).
|
|
* You may select, at your option, one of the above-listed licenses.
|
|
*/
|
|
|
|
/*
|
|
* This file includes every .c file needed for decompression.
|
|
* It is used by lib/decompress_unzstd.c to include the decompression
|
|
* source into the translation-unit, so it can be used for kernel
|
|
* decompression.
|
|
*/
|
|
|
|
/*
|
|
* Disable the ASM Huffman implementation because we need to
|
|
* include all the sources.
|
|
*/
|
|
#define ZSTD_DISABLE_ASM 1
|
|
|
|
#include "common/debug.c"
|
|
#include "common/entropy_common.c"
|
|
#include "common/error_private.c"
|
|
#include "common/fse_decompress.c"
|
|
#include "common/zstd_common.c"
|
|
#include "decompress/huf_decompress.c"
|
|
#include "decompress/zstd_ddict.c"
|
|
#include "decompress/zstd_decompress.c"
|
|
#include "decompress/zstd_decompress_block.c"
|
|
#include "zstd_decompress_module.c"
|