mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:17:44 +00:00
Userland: Guard set_jmp.h static_assert check to cpp impls only
This commit is contained in:
parent
1700b6d113
commit
de0861581e
1 changed files with 15 additions and 8 deletions
|
@ -48,14 +48,21 @@ struct __jmp_buf {
|
||||||
typedef struct __jmp_buf jmp_buf[1];
|
typedef struct __jmp_buf jmp_buf[1];
|
||||||
typedef struct __jmp_buf sigjmp_buf[1];
|
typedef struct __jmp_buf sigjmp_buf[1];
|
||||||
|
|
||||||
#ifdef __i386__
|
|
||||||
static_assert(sizeof(struct __jmp_buf) == 32, "struct __jmp_buf unsynchronized with i386/setjmp.S");
|
/**
|
||||||
#elif __x86_64__
|
* Since setjmp.h may be included in ports / c-projects, we need to guard this
|
||||||
static_assert(sizeof(struct __jmp_buf) == 72, "struct __jmp_buf unsynchronized with x86_64/setjmp.S");
|
*
|
||||||
#elif __aarch64__
|
*/
|
||||||
static_assert(sizeof(struct __jmp_buf) == 184, "struct __jmp_buf unsynchronized with aarch64/setjmp.S");
|
#ifdef __cplusplus
|
||||||
#else
|
#ifdef __i386__
|
||||||
# error
|
static_assert(sizeof(struct __jmp_buf) == 32, "struct __jmp_buf unsynchronized with i386/setjmp.S");
|
||||||
|
#elif __x86_64__
|
||||||
|
static_assert(sizeof(struct __jmp_buf) == 72, "struct __jmp_buf unsynchronized with x86_64/setjmp.S");
|
||||||
|
#elif __aarch64__
|
||||||
|
static_assert(sizeof(struct __jmp_buf) == 184, "struct __jmp_buf unsynchronized with aarch64/setjmp.S");
|
||||||
|
#else
|
||||||
|
#error
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue