]> git.proxmox.com Git - mirror_edk2.git/commitdiff
CryptoPkg OpenSslSupport.h: Do not instantiate data in an include file
authorjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 4 May 2011 00:56:11 +0000 (00:56 +0000)
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 4 May 2011 00:56:11 +0000 (00:56 +0000)
Include files should never instantiate data.  Data should only
be referenced as an 'extern' within include files.

The previous code would generate a GCC warning, since the static
data items were not always referenced.

Signed-off-by: jljusten
Reviewed-by: qlong
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11608 6f19259b-4bc3-4df7-8a09-765794883524

CryptoPkg/Include/OpenSslSupport.h
CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c

index 258854b10172b4d2510fb53964186fd7fda70a55..dc25fd7b7222fc34eb5d44234c134cf929532710 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
@@ -219,9 +219,9 @@ __sighandler_t *signal     (int, __sighandler_t *);
 //\r
 // Global variables from EFI Application Toolkit required to buiild Open SSL\r
 //\r
-static FILE  *stderr;\r
-static FILE  *stdin;\r
-static 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
index 46574dc8f545caa70438f60eb4368a5f804c270c..79957cc89f780ce45a5fb11b4e15750e1f9b1989 100644 (file)
@@ -2,7 +2,7 @@
   C Run-Time Libraries (CRT) Wrapper Implementation for OpenSSL-based\r
   Cryptographic Library.\r
 \r
-Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2009 - 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
@@ -17,6 +17,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 int errno = 0;\r
 \r
+FILE  *stderr = NULL;\r
+FILE  *stdin = NULL;\r
+FILE  *stdout = NULL;\r
+\r
 typedef\r
 INTN\r
 (*SORT_COMPARE)(\r