From 593e13f6708a53e9a56f4f74eebd73d283597f45 Mon Sep 17 00:00:00 2001 From: Callum Farmer Date: Sat, 12 Aug 2023 12:43:40 +0100 Subject: [PATCH] Rename ALIGN to EFI_ALIGN Avoid conflict with other libraries Signed-off-by: Callum Farmer --- inc/aarch64/efisetjmp_arch.h | 2 +- inc/arm/efisetjmp_arch.h | 2 +- inc/eficompiler.h | 8 ++++++-- inc/ia32/efisetjmp_arch.h | 2 +- inc/ia64/efisetjmp_arch.h | 2 +- inc/loongarch64/efisetjmp_arch.h | 2 +- inc/mips64el/efisetjmp_arch.h | 2 +- inc/riscv64/efisetjmp_arch.h | 2 +- inc/x86_64/efisetjmp_arch.h | 2 +- 9 files changed, 14 insertions(+), 10 deletions(-) diff --git a/inc/aarch64/efisetjmp_arch.h b/inc/aarch64/efisetjmp_arch.h index d960706..74e1f87 100644 --- a/inc/aarch64/efisetjmp_arch.h +++ b/inc/aarch64/efisetjmp_arch.h @@ -29,6 +29,6 @@ typedef struct { UINT64 D13; UINT64 D14; UINT64 D15; -} ALIGN(JMPBUF_ALIGN) jmp_buf[1]; +} EFI_ALIGN(JMPBUF_ALIGN) jmp_buf[1]; #endif /* GNU_EFI_AARCH64_SETJMP_H */ diff --git a/inc/arm/efisetjmp_arch.h b/inc/arm/efisetjmp_arch.h index 17f5dc0..b809453 100644 --- a/inc/arm/efisetjmp_arch.h +++ b/inc/arm/efisetjmp_arch.h @@ -16,6 +16,6 @@ typedef struct { UINT32 R12; UINT32 R13; UINT32 R14; -} ALIGN(JMPBUF_ALIGN) jmp_buf[1]; +} EFI_ALIGN(JMPBUF_ALIGN) jmp_buf[1]; #endif /* GNU_EFI_ARM_SETJMP_H */ diff --git a/inc/eficompiler.h b/inc/eficompiler.h index 8818747..bf3643b 100644 --- a/inc/eficompiler.h +++ b/inc/eficompiler.h @@ -39,9 +39,13 @@ Abstract: #endif #ifdef _MSC_EXTENSIONS -#define ALIGN(x) __declspec(align(x)) +#define EFI_ALIGN(x) __declspec(align(x)) #else -#define ALIGN(x) __attribute__((__aligned__(x))) +#define EFI_ALIGN(x) __attribute__((__aligned__(x))) +#endif + +#ifndef ALIGN +#define ALIGN(x) EFI_ALIGN(x) #endif /* Also add a catch-all on __attribute__() for MS compilers */ diff --git a/inc/ia32/efisetjmp_arch.h b/inc/ia32/efisetjmp_arch.h index a5c1a81..f65432e 100644 --- a/inc/ia32/efisetjmp_arch.h +++ b/inc/ia32/efisetjmp_arch.h @@ -10,6 +10,6 @@ typedef struct { UINT32 Ebp; UINT32 Esp; UINT32 Eip; -} ALIGN(JMPBUF_ALIGN) jmp_buf[1]; +} EFI_ALIGN(JMPBUF_ALIGN) jmp_buf[1]; #endif /* GNU_EFI_IA32_SETJMP_H */ diff --git a/inc/ia64/efisetjmp_arch.h b/inc/ia64/efisetjmp_arch.h index ceda448..7b674f6 100644 --- a/inc/ia64/efisetjmp_arch.h +++ b/inc/ia64/efisetjmp_arch.h @@ -42,6 +42,6 @@ typedef struct { UINT64 Predicates; UINT64 LoopCount; UINT64 FPSR; -} ALIGN(JMPBUF_ALIGN) jmp_buf[1]; +} EFI_ALIGN(JMPBUF_ALIGN) jmp_buf[1]; #endif /* GNU_EFI_IA64_SETJMP_H */ diff --git a/inc/loongarch64/efisetjmp_arch.h b/inc/loongarch64/efisetjmp_arch.h index 18aefaf..41ff410 100644 --- a/inc/loongarch64/efisetjmp_arch.h +++ b/inc/loongarch64/efisetjmp_arch.h @@ -18,6 +18,6 @@ typedef struct { UINT64 S6; UINT64 S7; UINT64 S8; -} ALIGN(JMPBUF_ALIGN) jmp_buf[1]; +} EFI_ALIGN(JMPBUF_ALIGN) jmp_buf[1]; #endif /* GNU_EFI_LOONGARCH64_SETJMP_H */ diff --git a/inc/mips64el/efisetjmp_arch.h b/inc/mips64el/efisetjmp_arch.h index 2b8f756..e241284 100644 --- a/inc/mips64el/efisetjmp_arch.h +++ b/inc/mips64el/efisetjmp_arch.h @@ -29,6 +29,6 @@ typedef struct { UINT64 F30; UINT64 F31; #endif -} ALIGN(JMPBUF_ALIGN) jmp_buf[1]; +} EFI_ALIGN(JMPBUF_ALIGN) jmp_buf[1]; #endif /* GNU_EFI_MIPS64EL_SETJMP_H */ diff --git a/inc/riscv64/efisetjmp_arch.h b/inc/riscv64/efisetjmp_arch.h index 9288c1f..bb6f467 100644 --- a/inc/riscv64/efisetjmp_arch.h +++ b/inc/riscv64/efisetjmp_arch.h @@ -35,6 +35,6 @@ typedef struct { UINT64 fs9; UINT64 fs10; UINT64 fs11; -} ALIGN(JMPBUF_ALIGN) jmp_buf[1]; +} EFI_ALIGN(JMPBUF_ALIGN) jmp_buf[1]; #endif /* GNU_EFI_RISCV64_SETJMP_H */ diff --git a/inc/x86_64/efisetjmp_arch.h b/inc/x86_64/efisetjmp_arch.h index b1ad1fe..8d100ae 100644 --- a/inc/x86_64/efisetjmp_arch.h +++ b/inc/x86_64/efisetjmp_arch.h @@ -17,6 +17,6 @@ typedef struct { UINT64 Rip; UINT64 MxCsr; UINT8 XmmBuffer[160]; // XMM6 - XMM15 -} ALIGN(JMPBUF_ALIGN) jmp_buf[1]; +} EFI_ALIGN(JMPBUF_ALIGN) jmp_buf[1]; #endif /* GNU_EFI_X86_64_SETJMP_H */