brintos

brintos / llvm-project-archived public Read only

0
0
Text · 875 B · c10bd2d Raw
30 lines · c
1/*===---- __stddef_null.h - Definition of NULL -----------------------------===2 *3 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4 * See https://llvm.org/LICENSE.txt for license information.5 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6 *7 *===-----------------------------------------------------------------------===8 */9 10#if !defined(NULL) || !__building_module(_Builtin_stddef)11 12/* linux/stddef.h will define NULL to 0. glibc (and other) headers then define13 * __need_NULL and rely on stddef.h to redefine NULL to the correct value again.14 * Modules don't support redefining macros like that, but support that pattern15 * in the non-modules case.16 */17#undef NULL18 19#ifdef __cplusplus20#if !defined(__MINGW32__) && !defined(_MSC_VER)21#define NULL __null22#else23#define NULL 024#endif25#else26#define NULL ((void*)0)27#endif28 29#endif30