brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 8628277 Raw
46 lines · c
1//===-- Including localtime.h in overlay mode -----------------------------===//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#ifndef LLVM_LIBC_HDR_LOCALTIME_OVERLAY_H10#define LLVM_LIBC_HDR_LOCALTIME_OVERLAY_H11 12#ifdef LIBC_FULL_BUILD13#error "This header should only be included in overlay mode"14#endif15 16// Overlay mode17 18// glibc <unistd.h> header might provide extern inline definitions for few19// functions, causing external alias errors.  They are guarded by20// `__USE_EXTERN_INLINES` macro.21 22#ifdef __USE_EXTERN_INLINES23#define LIBC_OLD_USE_EXTERN_INLINES24#undef __USE_EXTERN_INLINES25#endif26 27#ifndef __NO_INLINE__28#define __NO_INLINE__ 129#define LIBC_SET_NO_INLINE30#endif31 32#include <localtime.h>33#include <localtime_r.h>34 35#ifdef LIBC_SET_NO_INLINE36#undef __NO_INLINE__37#undef LIBC_SET_NO_INLINE38#endif39 40#ifdef LIBC_OLD_USE_EXTERN_INLINES41#define __USE_EXTERN_INLINES42#undef LIBC_OLD_USE_EXTERN_INLINES43#endif44 45#endif // LLVM_LIBC_HDR_LOCALTIME_OVERLAY_H46