]> git.proxmox.com Git - mirror_edk2.git/blobdiff - CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c
CryptoPkg SysCall Lib: Fix warning with GCC in CrtWrapper.c
[mirror_edk2.git] / CryptoPkg / Library / BaseCryptLib / SysCall / CrtWrapper.c
index 46574dc8f545caa70438f60eb4368a5f804c270c..7b3dda70e0941242e5b53af89d9bb878aaeca6df 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
@@ -326,11 +330,42 @@ void closelog (void)
 \r
 }\r
 \r
+#ifdef __GNUC__\r
+\r
+typedef\r
+VOID\r
+(EFIAPI *NoReturnFuncPtr)(\r
+  VOID\r
+  ) __attribute__((__noreturn__));\r
+\r
+\r
+STATIC\r
+VOID\r
+EFIAPI\r
+NopFunction (\r
+  VOID\r
+  )\r
+{\r
+}\r
+\r
+\r
 void exit (int e)\r
 {\r
+  NoReturnFuncPtr NoReturnFunc;\r
+\r
+  NoReturnFunc = (NoReturnFuncPtr) NopFunction;\r
+\r
+  NoReturnFunc ();\r
+}\r
+\r
+#else\r
 \r
+void exit (int e)\r
+{\r
 }\r
 \r
+#endif\r
+\r
 int fclose (FILE *f)\r
 {\r
   return 0;\r