]> 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 b9daaee0bc0d7aa685c95a14bc262d2a3392f5f5..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
@@ -15,6 +15,12 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 #include <OpenSslSupport.h>\r
 \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
@@ -298,3 +304,144 @@ void *UI_OpenSSL(void)
 {\r
   return NULL;\r
 }\r
+\r
+int X509_load_cert_file (VOID *ctx, const char *file, int type)\r
+{\r
+  return 0;\r
+}\r
+\r
+int X509_load_crl_file (VOID *ctx, const char *file, int type)\r
+{\r
+  return 0;\r
+}\r
+\r
+int chmod (const char *c, mode_t m)\r
+{\r
+  return -1;\r
+}\r
+\r
+int close (int f)\r
+{\r
+  return -1;\r
+}\r
+\r
+void closelog (void)\r
+{\r
+\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
+}\r
+\r
+FILE *fopen (const char *c, const char *m)\r
+{\r
+  return NULL;\r
+}\r
+\r
+size_t fread (void *b, size_t c, size_t i, FILE *f)\r
+{\r
+  return 0;\r
+}\r
+\r
+int fprintf (FILE *f, const char *s, ...)\r
+{\r
+  return 0;\r
+}\r
+\r
+uid_t getuid (void)\r
+{\r
+  return 0;\r
+}\r
+\r
+uid_t geteuid (void)\r
+{\r
+  return 0;\r
+}\r
+\r
+gid_t getgid (void)\r
+{\r
+  return 0;\r
+}\r
+\r
+gid_t getegid (void)\r
+{\r
+  return 0;\r
+}\r
+\r
+off_t lseek (int a, off_t o, int d)\r
+{\r
+  return 0;\r
+}\r
+\r
+void openlog (const char *c, int a, int b)\r
+{\r
+\r
+}\r
+\r
+ssize_t read (int f, void *b, size_t c)\r
+{\r
+  return 0;\r
+}\r
+\r
+int stat (const char *c, struct stat *s)\r
+{\r
+  return -1;\r
+}\r
+\r
+int strcasecmp (const char *c, const char *s)\r
+{\r
+  return 0;\r
+}\r
+\r
+int strncasecmp (const char *c, const char *s, size_t l)\r
+{\r
+  return 0;\r
+}\r
+\r
+void syslog (int a, const char *c, ...)\r
+{\r
+\r
+}\r
+\r
+ssize_t write (int f, const void *b, size_t l)\r
+{\r
+  return 0;\r
+}\r