From e324a62898faf5d73f7f0ed6cee17e816fac4c7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Mon, 6 Feb 2017 22:46:57 +0000 Subject: [PATCH] [BOOTLIB]: Make the EfiPrintf with __FUNCTION__ work also on GCC. Also, on MSVC (2010 at least), concatenating without converting __FUNCTION__ to unicode and adding 'L' for the "\r\n" returned error C2308. svn path=/trunk/; revision=73736 --- reactos/boot/environ/lib/mm/mm.c | 20 +++++--------------- reactos/boot/environ/lib/mm/pagealloc.c | 8 ++------ 2 files changed, 7 insertions(+), 21 deletions(-) diff --git a/reactos/boot/environ/lib/mm/mm.c b/reactos/boot/environ/lib/mm/mm.c index b3a25ddfa34..688ed8f5d19 100644 --- a/reactos/boot/environ/lib/mm/mm.c +++ b/reactos/boot/environ/lib/mm/mm.c @@ -146,10 +146,8 @@ MmSelectMappingAddress ( } /* We don't support virtual memory yet @TODO */ -#ifdef _MSC_VER // Fuck gcc. - EfiPrintf(L"not yet implemented in " __FUNCTION__ "\r\n"); + EfiPrintf(L"not yet implemented in %S\r\n", __FUNCTION__); EfiStall(1000000); -#endif return STATUS_NOT_IMPLEMENTED; } @@ -189,10 +187,8 @@ MmMapPhysicalAddress ( } /* We don't support virtual memory yet @TODO */ -#ifdef _MSC_VER // Fuck gcc. - EfiPrintf(L"not yet implemented in " __FUNCTION__ "\r\n"); + EfiPrintf(L"not yet implemented in %S\r\n", __FUNCTION__); EfiStall(1000000); -#endif return STATUS_NOT_IMPLEMENTED; } @@ -281,10 +277,8 @@ BlMmMapPhysicalAddressEx ( if (MmTranslationType != BlNone) { /* We don't support virtual memory yet @TODO */ -#ifdef _MSC_VER // Fuck gcc. - EfiPrintf(L"not yet implemented in " __FUNCTION__ "\r\n"); + EfiPrintf(L"not yet implemented in %S\r\n", __FUNCTION__); EfiStall(1000000); -#endif Status = STATUS_NOT_IMPLEMENTED; goto Quickie; } @@ -319,10 +313,8 @@ MmUnmapVirtualAddress ( else { /* We don't support virtual memory yet @TODO */ -#ifdef _MSC_VER // Fuck gcc. - EfiPrintf(L"not yet implemented in " __FUNCTION__ "\r\n"); + EfiPrintf(L"not yet implemented in %S\r\n", __FUNCTION__); EfiStall(1000000); -#endif Status = STATUS_NOT_IMPLEMENTED; } } @@ -357,10 +349,8 @@ BlMmUnmapVirtualAddressEx ( if ((NT_SUCCESS(Status)) && (MmTranslationType != BlNone)) { /* We don't support virtual memory yet @TODO */ -#ifdef _MSC_VER // Fuck gcc. - EfiPrintf(L"not yet implemented in " __FUNCTION__ "\r\n"); + EfiPrintf(L"not yet implemented in %S\r\n", __FUNCTION__); EfiStall(1000000); -#endif Status = STATUS_NOT_IMPLEMENTED; } } diff --git a/reactos/boot/environ/lib/mm/pagealloc.c b/reactos/boot/environ/lib/mm/pagealloc.c index 9912b40e948..5644f11c9ea 100644 --- a/reactos/boot/environ/lib/mm/pagealloc.c +++ b/reactos/boot/environ/lib/mm/pagealloc.c @@ -188,10 +188,8 @@ MmPapAllocateRegionFromMdl ( /* Are we allocating from the virtual memory list? */ if (CurrentList == &MmMdlMappedUnallocated) { -#ifdef _MSC_VER // Fuck gcc. - EfiPrintf(L"not yet implemented in " __FUNCTION__ "\r\n"); + EfiPrintf(L"not yet implemented in %S\r\n", __FUNCTION__); EfiStall(1000000); -#endif return STATUS_NOT_IMPLEMENTED; } @@ -443,10 +441,8 @@ MmPapAllocatePagesInRange ( if (MmTranslationType != BlNone) { /* We don't support virtual memory yet @TODO */ -#ifdef _MSC_VER // Fuck gcc. - EfiPrintf(L"not yet implemented in " __FUNCTION__ "\r\n"); + EfiPrintf(L"not yet implemented in %S\r\n", __FUNCTION__); EfiStall(1000000); -#endif Status = STATUS_NOT_IMPLEMENTED; goto Exit; }