summaryrefslogtreecommitdiff
path: root/cross
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2023-01-29 12:48:54 +0800
committerPo Lu <luangruo@yahoo.com>2023-01-29 12:48:54 +0800
commitad90fe7db73f342f5df207f19f5b345ccb42bad8 (patch)
tree46fdd7d8f771beae0dd91b0b05e032ad323eca78 /cross
parent492aa74b13bb2c9d5a751d043fed2ef9e9365781 (diff)
downloademacs-ad90fe7db73f342f5df207f19f5b345ccb42bad8.tar.gz
Check in missing files
* .gitignore: * cross/lib/_Noreturn.h (_Noreturn): Add missing gnulib files.
Diffstat (limited to 'cross')
-rw-r--r--cross/lib/_Noreturn.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/cross/lib/_Noreturn.h b/cross/lib/_Noreturn.h
new file mode 100644
index 00000000000..6ecea98b54a
--- /dev/null
+++ b/cross/lib/_Noreturn.h
@@ -0,0 +1,50 @@
+/* A C macro for declaring that a function does not return.
+ Copyright (C) 2011-2023 Free Software Foundation, Inc.
+
+ This program 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 of the License, or
+ (at your option) any later version.
+
+ This program 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 this program. If not, see <https://www.gnu.org/licenses/>. */
+
+#ifndef _Noreturn
+# if (defined __cplusplus \
+ && ((201103 <= __cplusplus && !(__GNUC__ == 4 && __GNUC_MINOR__ == 7)) \
+ || (defined _MSC_VER && 1900 <= _MSC_VER)) \
+ && 0)
+ /* [[noreturn]] is not practically usable, because with it the syntax
+ extern _Noreturn void func (...);
+ would not be valid; such a declaration would only be valid with 'extern'
+ and '_Noreturn' swapped, or without the 'extern' keyword. However, some
+ AIX system header files and several gnulib header files use precisely
+ this syntax with 'extern'. */
+# define _Noreturn [[noreturn]]
+# elif (defined __clang__ && __clang_major__ < 16 \
+ && defined _GL_WORK_AROUND_LLVM_BUG_59792)
+ /* Compile with -D_GL_WORK_AROUND_LLVM_BUG_59792 to work around
+ that rare LLVM bug, though you may get many false-alarm warnings. */
+# define _Noreturn
+# elif ((!defined __cplusplus || defined __clang__) \
+ && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \
+ || (!defined __STRICT_ANSI__ \
+ && (4 < __GNUC__ + (7 <= __GNUC_MINOR__) \
+ || (defined __apple_build_version__ \
+ ? 6000000 <= __apple_build_version__ \
+ : 3 < __clang_major__ + (5 <= __clang_minor__))))))
+ /* _Noreturn works as-is. */
+# elif (2 < __GNUC__ + (8 <= __GNUC_MINOR__) || defined __clang__ \
+ || 0x5110 <= __SUNPRO_C)
+# define _Noreturn __attribute__ ((__noreturn__))
+# elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0)
+# define _Noreturn __declspec (noreturn)
+# else
+# define _Noreturn
+# endif
+#endif