mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-23 21:40:12 +00:00
bfa864e164
This causes issues when using clang with -frewrite-includes to e.g., submit the translation unit to a distributed compiler. In my case, I was building Firefox using sccache. See [1] for a reduced test-case since I initially thought this was a clang bug, and [2] for more context. Apparently doing this is invalid C++ per [cpp.cond], which mentions [3]: > The #ifdef and #ifndef directives, and the defined conditional > inclusion operator, shall treat __has_include and __has_cpp_attribute > as if they were the names of defined macros. The identifiers > __has_include and __has_cpp_attribute shall not appear in any context > not mentioned in this subclause. [1]: https://bugs.llvm.org/show_bug.cgi?id=43982 [2]: https://bugs.llvm.org/show_bug.cgi?id=37990 [3]: http://eel.is/c++draft/cpp.cond#7.sentence-2 Change-Id: Id4b8ee19176a9e4624b533087ba870c418f27e60
40 lines
1.4 KiB
C
40 lines
1.4 KiB
C
/* statx-related definitions and declarations. Linux version.
|
|
Copyright (C) 2018-2019 Free Software Foundation, Inc.
|
|
This file is part of the GNU C Library.
|
|
|
|
The GNU C Library is free software; you can redistribute it and/or
|
|
modify it under the terms of the GNU Lesser General Public
|
|
License as published by the Free Software Foundation; either
|
|
version 2.1 of the License, or (at your option) any later version.
|
|
|
|
The GNU C Library is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Lesser General Public License for more details.
|
|
|
|
You should have received a copy of the GNU Lesser General Public
|
|
License along with the GNU C Library; if not, see
|
|
<https://www.gnu.org/licenses/>. */
|
|
|
|
/* This interface is based on <linux/stat.h> in Linux. */
|
|
|
|
#ifndef _SYS_STAT_H
|
|
# error Never include <bits/statx.h> directly, include <sys/stat.h> instead.
|
|
#endif
|
|
|
|
/* Use the Linux kernel header if available. */
|
|
|
|
/* Use "" to work around incorrect macro expansion of the
|
|
__has_include argument (GCC PR 80005). */
|
|
#ifdef __has_include
|
|
# if __has_include ("linux/stat.h")
|
|
# include "linux/stat.h"
|
|
# ifdef STATX_TYPE
|
|
# define __statx_timestamp_defined 1
|
|
# define __statx_defined 1
|
|
# endif
|
|
# endif
|
|
#endif
|
|
|
|
#include <bits/statx-generic.h>
|