* [PATCH v2] BaseTools/PcdValueCommon: Fix build with XCODE5
@ 2017-12-29 2:59 Alex James
2017-12-29 15:08 ` Gao, Liming
0 siblings, 1 reply; 2+ messages in thread
From: Alex James @ 2017-12-29 2:59 UTC (permalink / raw)
To: edk2-devel
Use the correct UINT64 format specifier when building on macOS. This is
needed to fix building with XCODE5.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Alex James <theracermaster@gmail.com>
---
Notes:
v2:
- Change ifdef to fix GCC build failure [Liming]
BaseTools/Source/C/Common/PcdValueCommon.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/BaseTools/Source/C/Common/PcdValueCommon.c b/BaseTools/Source/C/Common/PcdValueCommon.c
index 6ca0994744..1b7b48c125 100644
--- a/BaseTools/Source/C/Common/PcdValueCommon.c
+++ b/BaseTools/Source/C/Common/PcdValueCommon.c
@@ -266,7 +266,7 @@ Returns:
sprintf(PcdList[Index].Value, "0x%08x", (UINT32)(Value & 0xffffffff));
break;
case PcdDataTypeUint64:
-#ifdef __GNUC__
+#if defined(__GNUC__) && !defined(__APPLE__)
sprintf(PcdList[Index].Value, "0x%016lx", Value);
#else
sprintf(PcdList[Index].Value, "0x%016llx", Value);
--
2.15.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] BaseTools/PcdValueCommon: Fix build with XCODE5
2017-12-29 2:59 [PATCH v2] BaseTools/PcdValueCommon: Fix build with XCODE5 Alex James
@ 2017-12-29 15:08 ` Gao, Liming
0 siblings, 0 replies; 2+ messages in thread
From: Gao, Liming @ 2017-12-29 15:08 UTC (permalink / raw)
To: Alex James, edk2-devel@lists.01.org
Reviewed-by: Liming Gao <liming.gao@intel.com>
> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Alex James
> Sent: Friday, December 29, 2017 11:00 AM
> To: edk2-devel@lists.01.org
> Subject: [edk2] [PATCH v2] BaseTools/PcdValueCommon: Fix build with XCODE5
>
> Use the correct UINT64 format specifier when building on macOS. This is
> needed to fix building with XCODE5.
>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Alex James <theracermaster@gmail.com>
> ---
>
> Notes:
> v2:
> - Change ifdef to fix GCC build failure [Liming]
>
> BaseTools/Source/C/Common/PcdValueCommon.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/BaseTools/Source/C/Common/PcdValueCommon.c b/BaseTools/Source/C/Common/PcdValueCommon.c
> index 6ca0994744..1b7b48c125 100644
> --- a/BaseTools/Source/C/Common/PcdValueCommon.c
> +++ b/BaseTools/Source/C/Common/PcdValueCommon.c
> @@ -266,7 +266,7 @@ Returns:
> sprintf(PcdList[Index].Value, "0x%08x", (UINT32)(Value & 0xffffffff));
> break;
> case PcdDataTypeUint64:
> -#ifdef __GNUC__
> +#if defined(__GNUC__) && !defined(__APPLE__)
> sprintf(PcdList[Index].Value, "0x%016lx", Value);
> #else
> sprintf(PcdList[Index].Value, "0x%016llx", Value);
> --
> 2.15.1
>
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-12-29 15:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-29 2:59 [PATCH v2] BaseTools/PcdValueCommon: Fix build with XCODE5 Alex James
2017-12-29 15:08 ` Gao, Liming
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox