public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-devel] [PATCH 0/1] CryptoPkg: move define to CrtLibSupport
@ 2024-01-04  8:19 Wenxing Hou
  2024-01-04  8:19 ` [edk2-devel] [PATCH 1/1] " Wenxing Hou
  0 siblings, 1 reply; 3+ messages in thread
From: Wenxing Hou @ 2024-01-04  8:19 UTC (permalink / raw)
  To: devel; +Cc: Jiewen Yao, Yi Li, Guomin Jiang

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4632

The before code will cause redefine error.
This patch move them to CrtLibSupport header.
But Openssl has already defined them internally,
need to increase support for OPENSLL_SYS_UEFI judgment.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Yi Li <yi1.li@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Signed-off-by: Wenxing Hou <wenxing.hou@intel.com>

Wenxing Hou (1):
  CryptoPkg: move define to CrtLibSupport

 CryptoPkg/Library/Include/CrtLibSupport.h | 15 +++++++++++++++
 CryptoPkg/Library/Include/stdint.h        | 10 ----------
 2 files changed, 15 insertions(+), 10 deletions(-)

-- 
2.26.2.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#113147): https://edk2.groups.io/g/devel/message/113147
Mute This Topic: https://groups.io/mt/103519076/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [edk2-devel] [PATCH 1/1] CryptoPkg: move define to CrtLibSupport
  2024-01-04  8:19 [edk2-devel] [PATCH 0/1] CryptoPkg: move define to CrtLibSupport Wenxing Hou
@ 2024-01-04  8:19 ` Wenxing Hou
  2024-01-04  8:55   ` Li, Yi
  0 siblings, 1 reply; 3+ messages in thread
From: Wenxing Hou @ 2024-01-04  8:19 UTC (permalink / raw)
  To: devel; +Cc: Jiewen Yao, Yi Li, Guomin Jiang

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4632

The before code will cause redefine error.
This patch move them to CrtLibSupport header.
But Openssl has already defined them internally,
need to increase support for OPENSLL_SYS_UEFI judgment.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Yi Li <yi1.li@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Signed-off-by: Wenxing Hou <wenxing.hou@intel.com>
---
 CryptoPkg/Library/Include/CrtLibSupport.h | 15 +++++++++++++++
 CryptoPkg/Library/Include/stdint.h        | 10 ----------
 2 files changed, 15 insertions(+), 10 deletions(-)

diff --git a/CryptoPkg/Library/Include/CrtLibSupport.h b/CryptoPkg/Library/Include/CrtLibSupport.h
index f36fe08f0c61..76591f12cb67 100644
--- a/CryptoPkg/Library/Include/CrtLibSupport.h
+++ b/CryptoPkg/Library/Include/CrtLibSupport.h
@@ -424,4 +424,19 @@ strcpy (
 #define atoi(nptr)              AsciiStrDecimalToUintn(nptr)
 #define gettimeofday(tvp, tz)   do { (tvp)->tv_sec = time(NULL); (tvp)->tv_usec = 0; } while (0)
 
+//
+// only use in Mbedlts. The Openssl has defined them internally.
+//
+#ifndef OPENSSL_SYS_UEFI
+typedef INT8   int8_t;
+typedef UINT8  uint8_t;
+typedef INT16  int16_t;
+typedef UINT16 uint16_t;
+typedef INT32  int32_t;
+typedef UINT32 uint32_t;
+typedef INT64  int64_t;
+typedef UINT64 uint64_t;
+typedef UINTN  uintptr_t;
+#endif
+
 #endif
diff --git a/CryptoPkg/Library/Include/stdint.h b/CryptoPkg/Library/Include/stdint.h
index 17b8c767d7be..786d57e8d53d 100644
--- a/CryptoPkg/Library/Include/stdint.h
+++ b/CryptoPkg/Library/Include/stdint.h
@@ -7,13 +7,3 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 **/
 
 #include <CrtLibSupport.h>
-
-typedef INT8    int8_t;
-typedef UINT8   uint8_t;
-typedef INT16   int16_t;
-typedef UINT16  uint16_t;
-typedef INT32   int32_t;
-typedef UINT32  uint32_t;
-typedef INT64   int64_t;
-typedef UINT64  uint64_t;
-typedef UINTN   uintptr_t;
-- 
2.26.2.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#113148): https://edk2.groups.io/g/devel/message/113148
Mute This Topic: https://groups.io/mt/103519077/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [edk2-devel] [PATCH 1/1] CryptoPkg: move define to CrtLibSupport
  2024-01-04  8:19 ` [edk2-devel] [PATCH 1/1] " Wenxing Hou
@ 2024-01-04  8:55   ` Li, Yi
  0 siblings, 0 replies; 3+ messages in thread
From: Li, Yi @ 2024-01-04  8:55 UTC (permalink / raw)
  To: Hou, Wenxing, devel@edk2.groups.io; +Cc: Yao, Jiewen, Jiang, Guomin



Looks good to me.
Reviewed-by: Yi Li <yi1.li@intel.com>


-----Original Message-----
From: Hou, Wenxing <wenxing.hou@intel.com> 
Sent: Thursday, January 4, 2024 4:20 PM
To: devel@edk2.groups.io
Cc: Yao, Jiewen <jiewen.yao@intel.com>; Li, Yi1 <yi1.li@intel.com>; Jiang, Guomin <guomin.jiang@intel.com>
Subject: [PATCH 1/1] CryptoPkg: move define to CrtLibSupport

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4632

The before code will cause redefine error.
This patch move them to CrtLibSupport header.
But Openssl has already defined them internally, need to increase support for OPENSLL_SYS_UEFI judgment.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Yi Li <yi1.li@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Signed-off-by: Wenxing Hou <wenxing.hou@intel.com>
---
 CryptoPkg/Library/Include/CrtLibSupport.h | 15 +++++++++++++++
 CryptoPkg/Library/Include/stdint.h        | 10 ----------
 2 files changed, 15 insertions(+), 10 deletions(-)

diff --git a/CryptoPkg/Library/Include/CrtLibSupport.h b/CryptoPkg/Library/Include/CrtLibSupport.h
index f36fe08f0c61..76591f12cb67 100644
--- a/CryptoPkg/Library/Include/CrtLibSupport.h
+++ b/CryptoPkg/Library/Include/CrtLibSupport.h
@@ -424,4 +424,19 @@ strcpy (
 #define atoi(nptr)              AsciiStrDecimalToUintn(nptr) #define gettimeofday(tvp, tz)   do { (tvp)->tv_sec = time(NULL); (tvp)->tv_usec = 0; } while (0) +//+// only use in Mbedlts. The Openssl has defined them internally.+//+#ifndef OPENSSL_SYS_UEFI+typedef INT8   int8_t;+typedef UINT8  uint8_t;+typedef INT16  int16_t;+typedef UINT16 uint16_t;+typedef INT32  int32_t;+typedef UINT32 uint32_t;+typedef INT64  int64_t;+typedef UINT64 uint64_t;+typedef UINTN  uintptr_t;+#endif+ #endifdiff --git a/CryptoPkg/Library/Include/stdint.h b/CryptoPkg/Library/Include/stdint.h
index 17b8c767d7be..786d57e8d53d 100644
--- a/CryptoPkg/Library/Include/stdint.h
+++ b/CryptoPkg/Library/Include/stdint.h
@@ -7,13 +7,3 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 **/  #include <CrtLibSupport.h>--typedef INT8    int8_t;-typedef UINT8   uint8_t;-typedef INT16   int16_t;-typedef UINT16  uint16_t;-typedef INT32   int32_t;-typedef UINT32  uint32_t;-typedef INT64   int64_t;-typedef UINT64  uint64_t;-typedef UINTN   uintptr_t;-- 
2.26.2.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#113152): https://edk2.groups.io/g/devel/message/113152
Mute This Topic: https://groups.io/mt/103519077/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-01-04  8:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-04  8:19 [edk2-devel] [PATCH 0/1] CryptoPkg: move define to CrtLibSupport Wenxing Hou
2024-01-04  8:19 ` [edk2-devel] [PATCH 1/1] " Wenxing Hou
2024-01-04  8:55   ` Li, Yi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox