1*61145dc2SMartin Matuska // SPDX-License-Identifier: BSD-3-Clause 2eda14cbcSMatt Macy /* 3eda14cbcSMatt Macy * BSD 3-Clause New License (https://spdx.org/licenses/BSD-3-Clause.html) 4eda14cbcSMatt Macy * 5eda14cbcSMatt Macy * Redistribution and use in source and binary forms, with or without 6eda14cbcSMatt Macy * modification, are permitted provided that the following conditions are met: 7eda14cbcSMatt Macy * 8eda14cbcSMatt Macy * 1. Redistributions of source code must retain the above copyright notice, 9eda14cbcSMatt Macy * this list of conditions and the following disclaimer. 10eda14cbcSMatt Macy * 11eda14cbcSMatt Macy * 2. Redistributions in binary form must reproduce the above copyright notice, 12eda14cbcSMatt Macy * this list of conditions and the following disclaimer in the documentation 13eda14cbcSMatt Macy * and/or other materials provided with the distribution. 14eda14cbcSMatt Macy * 15eda14cbcSMatt Macy * 3. Neither the name of the copyright holder nor the names of its 16eda14cbcSMatt Macy * contributors may be used to endorse or promote products derived from this 17eda14cbcSMatt Macy * software without specific prior written permission. 18eda14cbcSMatt Macy * 19eda14cbcSMatt Macy * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20eda14cbcSMatt Macy * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21eda14cbcSMatt Macy * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22eda14cbcSMatt Macy * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 23eda14cbcSMatt Macy * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24eda14cbcSMatt Macy * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25eda14cbcSMatt Macy * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26eda14cbcSMatt Macy * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27eda14cbcSMatt Macy * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28eda14cbcSMatt Macy * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29eda14cbcSMatt Macy * POSSIBILITY OF SUCH DAMAGE. 30eda14cbcSMatt Macy */ 31eda14cbcSMatt Macy 32eda14cbcSMatt Macy /* 33eda14cbcSMatt Macy * Copyright (c) 2014-2019, Allan Jude 34eda14cbcSMatt Macy * Copyright (c) 2020, Brian Behlendorf 35eda14cbcSMatt Macy * Copyright (c) 2020, Michael Niewöhner 36eda14cbcSMatt Macy */ 37eda14cbcSMatt Macy 38eda14cbcSMatt Macy #ifndef _ZSTD_STDLIB_H 39eda14cbcSMatt Macy #define _ZSTD_STDLIB_H 40eda14cbcSMatt Macy 41eda14cbcSMatt Macy #ifdef __cplusplus 42eda14cbcSMatt Macy extern "C" { 43eda14cbcSMatt Macy #endif 44eda14cbcSMatt Macy 45eda14cbcSMatt Macy #undef GCC_VERSION 46eda14cbcSMatt Macy 47eda14cbcSMatt Macy /* 48eda14cbcSMatt Macy * Define calloc, malloc, free to make building work. They are never really used 49eda14cbcSMatt Macy * in zstdlib.c since allocation is done in zstd.c. 50eda14cbcSMatt Macy */ 51eda14cbcSMatt Macy #define calloc(n, sz) NULL 52eda14cbcSMatt Macy #define malloc(sz) NULL 53eda14cbcSMatt Macy #define free(ptr) 54eda14cbcSMatt Macy 55eda14cbcSMatt Macy #ifdef __cplusplus 56eda14cbcSMatt Macy } 57eda14cbcSMatt Macy #endif 58eda14cbcSMatt Macy 59eda14cbcSMatt Macy #endif /* _ZSTD_STDLIB_H */ 60