]> git.proxmox.com Git - mirror_edk2.git/blobdiff - CryptoPkg/Include/OpenSslSupport.h
ArmPlatformPkg: Use the new PCDs defined in MdePkg and MdeModulePkg.
[mirror_edk2.git] / CryptoPkg / Include / OpenSslSupport.h
index 571511582edd673d1f34a911d1e188722d749d42..ed889e91c7cc7aaee2cf608f4951d810bff103e0 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Root include file to support building OpenSSL Crypto Library.\r
 \r
-Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -30,10 +30,16 @@ typedef VOID  *FILE;
 //\r
 // Map all va_xxxx elements to VA_xxx defined in MdePkg/Include/Base.h\r
 //\r
+#if !defined(__CC_ARM) // if va_list is not already defined\r
 #define va_list   VA_LIST\r
 #define va_arg    VA_ARG\r
 #define va_start  VA_START\r
 #define va_end    VA_END\r
+#else // __CC_ARM\r
+#define va_start(Marker, Parameter)   __va_start(Marker, Parameter)\r
+#define va_arg(Marker, TYPE)          __va_arg(Marker, TYPE)\r
+#define va_end(Marker)                ((void)0)\r
+#endif\r
 \r
 //\r
 // #defines from EFI Application Toolkit required to buiild Open SSL\r
@@ -66,7 +72,7 @@ typedef VOID  *FILE;
    portably, hence it is provided by a Standard C header file.\r
    For pre-Standard C compilers, here is a version that usually works\r
    (but watch out!): */\r
-#define offsetof(type, member) ( (int) & ((type*)0) -> member )\r
+#define offsetof(type, member) OFFSET_OF (type, member)\r
 \r
 //\r
 // Basic types from EFI Application Toolkit required to buiild Open SSL\r
@@ -211,9 +217,9 @@ __sighandler_t *signal     (int, __sighandler_t *);
 //\r
 // Global variables from EFI Application Toolkit required to buiild Open SSL\r
 //\r
-FILE  *stderr;\r
-FILE  *stdin;\r
-FILE  *stdout;\r
+extern FILE  *stderr;\r
+extern FILE  *stdin;\r
+extern FILE  *stdout;\r
 \r
 //\r
 // Macros that directly map functions to BaseLib, BaseMemoryLib, and DebugLib functions\r
@@ -233,7 +239,6 @@ FILE  *stdout;
 #define abort()                           ASSERT (FALSE)\r
 #define assert(expression)\r
 #define localtime(timer)                  NULL\r
-#define gmtime(timer)                     NULL\r
 #define gmtime_r(timer,result)            (result = NULL)\r
 \r
 #endif\r