X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=CryptoPkg%2FLibrary%2FBaseCryptLib%2FSysCall%2FCrtWrapper.c;h=a2386bc0730c26ad4c0a78d3a39b8900c8e67dc5;hp=7b3dda70e0941242e5b53af89d9bb878aaeca6df;hb=32387e0081db5ec9cda2b58f72e2ccb04e3ff48e;hpb=f114914b39c03f6af3173ba3aae09395ed65faaa diff --git a/CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c b/CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c index 7b3dda70e0..a2386bc073 100644 --- a/CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c +++ b/CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c @@ -2,7 +2,7 @@ C Run-Time Libraries (CRT) Wrapper Implementation for OpenSSL-based Cryptographic Library. -Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.
+Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -18,11 +18,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. int errno = 0; FILE *stderr = NULL; -FILE *stdin = NULL; +FILE *stdin = NULL; FILE *stdout = NULL; typedef -INTN +int (*SORT_COMPARE)( IN VOID *Buffer1, IN VOID *Buffer2 @@ -244,7 +244,10 @@ void qsort (void *base, size_t num, size_t width, int (*compare)(const void *, c ASSERT (base != NULL); ASSERT (compare != NULL); - Buffer = AllocatePool (width); + // + // Use CRT-style malloc to cover BS and RT memory allocation. + // + Buffer = malloc (width); ASSERT (Buffer != NULL); // @@ -252,7 +255,7 @@ void qsort (void *base, size_t num, size_t width, int (*compare)(const void *, c // QuickSortWorker (base, (UINTN)num, (UINTN)width, (SORT_COMPARE)compare, Buffer); - FreePool (Buffer); + free (Buffer); return; } @@ -381,6 +384,11 @@ size_t fread (void *b, size_t c, size_t i, FILE *f) return 0; } +int fputs (const char *s, FILE *f) +{ + return 0; +} + int fprintf (FILE *f, const char *s, ...) { return 0; @@ -445,3 +453,8 @@ ssize_t write (int f, const void *b, size_t l) { return 0; } + +int printf (char const *fmt, ...) +{ + return 0; +}