1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-17 18:05:06 +00:00

LibC: Fix redeclaration in x86_64/regs.h

In QtCreator (and under weird configurations with gcc), this used to
fail with the error messages like: "error: member of anonymous union
redeclares '___'".

This patch gives each member a unique name.
This commit is contained in:
Ben Wiederhake 2021-09-16 20:45:42 +02:00 committed by Linus Groh
parent 8ba572d650
commit f9a4f4f7e6

View file

@ -12,15 +12,15 @@
union { \ union { \
u64 r##num; \ u64 r##num; \
struct { \ struct { \
u32 _; \ u32 _unused##num; \
union { \ union { \
u32 r##num##d; \ u32 r##num##d; \
struct { \ struct { \
u16 __; \ u16 __unused##num; \
union { \ union { \
u16 r##num##w; \ u16 r##num##w; \
struct { \ struct { \
u8 ___; \ u8 ___unused##num; \
u8 r##num##b; \ u8 r##num##b; \
}; \ }; \
}; \ }; \
@ -34,12 +34,12 @@
u64 r##letter##x; \ u64 r##letter##x; \
struct \ struct \
{ \ { \
u32 _; \ u32 _unused##letter; \
union { \ union { \
u32 e##letter##x; \ u32 e##letter##x; \
struct \ struct \
{ \ { \
u16 __; \ u16 __unused##letter; \
union { \ union { \
u16 letter##x; \ u16 letter##x; \
struct { \ struct { \
@ -57,16 +57,16 @@
u64 r##name; \ u64 r##name; \
struct \ struct \
{ \ { \
u32 _; \ u32 _unused##name; \
union { \ union { \
u32 e##name; \ u32 e##name; \
struct \ struct \
{ \ { \
u16 __; \ u16 __unused##name; \
union { \ union { \
u16 name; \ u16 name; \
struct { \ struct { \
u8 ___; \ u8 ___unused##name; \
u8 name##l; \ u8 name##l; \
}; \ }; \
}; \ }; \