xref: /freebsd/contrib/llvm-project/clang/lib/Headers/stdalign.h (revision 0fca6ea1d4eea4c934cfff25ac9ee8ad6fe95583)
10b57cec5SDimitry Andric /*===---- stdalign.h - Standard header for alignment ------------------------===
20b57cec5SDimitry Andric  *
30b57cec5SDimitry Andric  * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
40b57cec5SDimitry Andric  * See https://llvm.org/LICENSE.txt for license information.
50b57cec5SDimitry Andric  * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
60b57cec5SDimitry Andric  *
70b57cec5SDimitry Andric  *===-----------------------------------------------------------------------===
80b57cec5SDimitry Andric  */
90b57cec5SDimitry Andric 
100b57cec5SDimitry Andric #ifndef __STDALIGN_H
110b57cec5SDimitry Andric #define __STDALIGN_H
120b57cec5SDimitry Andric 
13*0fca6ea1SDimitry Andric #if defined(__MVS__) && __has_include_next(<stdalign.h>)
14*0fca6ea1SDimitry Andric #include_next <stdalign.h>
15*0fca6ea1SDimitry Andric #else
16*0fca6ea1SDimitry Andric 
1706c3fb27SDimitry Andric #if defined(__cplusplus) ||                                                    \
185f757f3fSDimitry Andric     (defined(__STDC_VERSION__) && __STDC_VERSION__ < 202311L)
190b57cec5SDimitry Andric #ifndef __cplusplus
200b57cec5SDimitry Andric #define alignas _Alignas
210b57cec5SDimitry Andric #define alignof _Alignof
220b57cec5SDimitry Andric #endif
230b57cec5SDimitry Andric 
240b57cec5SDimitry Andric #define __alignas_is_defined 1
250b57cec5SDimitry Andric #define __alignof_is_defined 1
2606c3fb27SDimitry Andric #endif /* __STDC_VERSION__ */
270b57cec5SDimitry Andric 
28*0fca6ea1SDimitry Andric #endif /* __MVS__ */
290b57cec5SDimitry Andric #endif /* __STDALIGN_H */
30