diff options
| author | Kevin Newton <kddnewton@gmail.com> | 2026-01-28 08:44:13 -0500 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2026-01-28 13:53:48 +0000 |
| commit | 3b22e32fa50c2c18663be87dad4d11a266954773 (patch) | |
| tree | 8ee10e8874d30cdde3e2434862c6c0ba042e0cde | |
| parent | bea48adbcacc29cce9536977e15ceba0d65c8a02 (diff) | |
[ruby/prism] Use align keywords instead of the header
OpenBSD is advertising to the preprocessor that it supports C11
but does not include the stdalign.h header. We do not actually need
the header, since we can just use the keywords.
https://github.com/ruby/prism/commit/b3e2708fff
| -rw-r--r-- | prism/defines.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/prism/defines.h b/prism/defines.h index c41e6031a3..f6bd1dbe40 100644 --- a/prism/defines.h +++ b/prism/defines.h @@ -263,13 +263,11 @@ * specify alignment in a compiler-agnostic way. */ #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L /* C11 or later */ - #include <stdalign.h> - /** Specify alignment for a type or variable. */ - #define PRISM_ALIGNAS(size) alignas(size) + #define PRISM_ALIGNAS _Alignas /** Get the alignment requirement of a type. */ - #define PRISM_ALIGNOF(type) alignof(type) + #define PRISM_ALIGNOF _Alignof #elif defined(__GNUC__) || defined(__clang__) /** Specify alignment for a type or variable. */ #define PRISM_ALIGNAS(size) __attribute__((aligned(size))) |
