summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPeter Jones <pjones@redhat.com>2021-03-09 14:40:03 -0500
committerPeter Jones <pjones@redhat.com>2021-03-10 15:54:20 -0500
commit9beca885c29c77bb901547321a5ce6fd3c9c8ee3 (patch)
treeb61a67de468dfdff2225d52b03f280b807714215 /lib
parent766aac4d5cfbe76026be5ce718b0883ee211f323 (diff)
downloadefi-boot-shim-9beca885c29c77bb901547321a5ce6fd3c9c8ee3.tar.gz
efi-boot-shim-9beca885c29c77bb901547321a5ce6fd3c9c8ee3.zip
Fix stdarg to work the same everywhere.
This gets us the same working definition for VA_* va_* etc everywhere, and it's the same definition edk2 is using. Signed-off-by: Peter Jones <pjones@redhat.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/Makefile3
-rw-r--r--lib/console.c12
2 files changed, 7 insertions, 8 deletions
diff --git a/lib/Makefile b/lib/Makefile
index 63893c3e..0d2d0a9d 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -17,8 +17,7 @@ CLANG_BUGS = $(if $(findstring gcc,$(CC)),-maccumulate-outgoing-args,)
ifeq ($(ARCH),x86_64)
FEATUREFLAGS += -m64 -mno-mmx -mno-sse -mno-red-zone -nostdinc $(CLANG_BUGS)
-DEFINES += -DEFI_FUNCTION_WRAPPER -DGNU_EFI_USE_MS_ABI \
- -UNO_BUILTIN_VA_FUNCS -DMDE_CPU_X64
+DEFINES += -DMDE_CPU_X64
endif
ifeq ($(ARCH),ia32)
FEATUREFLAGS += -m32 -mno-mmx -mno-sse -mno-red-zone -nostdinc $(CLANG_BUGS)
diff --git a/lib/console.c b/lib/console.c
index 32c6d55d..2da20b31 100644
--- a/lib/console.c
+++ b/lib/console.c
@@ -86,15 +86,15 @@ VOID console_fini(VOID)
UINTN EFIAPI
console_print(const CHAR16 *fmt, ...)
{
- elf_va_list args;
+ va_list args;
UINTN ret;
if (!console_text_mode)
setup_console(1);
- elf_va_start(args, fmt);
+ va_start(args, fmt);
ret = VPrint(fmt, args);
- elf_va_end(args);
+ va_end(args);
return ret;
}
@@ -103,7 +103,7 @@ UINTN EFIAPI
console_print_at(UINTN col, UINTN row, const CHAR16 *fmt, ...)
{
SIMPLE_TEXT_OUTPUT_INTERFACE *co = ST->ConOut;
- elf_va_list args;
+ va_list args;
UINTN ret;
if (!console_text_mode)
@@ -111,9 +111,9 @@ console_print_at(UINTN col, UINTN row, const CHAR16 *fmt, ...)
co->SetCursorPosition(co, col, row);
- elf_va_start(args, fmt);
+ va_start(args, fmt);
ret = VPrint(fmt, args);
- elf_va_end(args);
+ va_end(args);
return ret;
}