X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=CryptoPkg%2FInclude%2FOpenSslSupport.h;h=e6858a94a484f49c6ede8943c7185ee918d8de84;hp=239ae8bd6f417a5713a0bac652a366c6f37aa159;hb=420e508397c7775667f6935405bbd4accecd232e;hpb=84c7452165816ed26cd5bdeb5666d4dc0026f116 diff --git a/CryptoPkg/Include/OpenSslSupport.h b/CryptoPkg/Include/OpenSslSupport.h index 239ae8bd6f..e6858a94a4 100644 --- a/CryptoPkg/Include/OpenSslSupport.h +++ b/CryptoPkg/Include/OpenSslSupport.h @@ -1,7 +1,7 @@ /** @file Root include file to support building OpenSSL Crypto Library. -Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved.
+Copyright (c) 2010 - 2017, 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 @@ -21,6 +21,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include #include +#define OPENSSLDIR "" +#define ENGINESDIR "" + #define MAX_STRING_SIZE 0x1000 // @@ -69,7 +72,7 @@ typedef VOID *FILE; #endif // -// #defines from EFI Application Toolkit required to buiild Open SSL +// #defines from EFI Application Toolkit required to build Open SSL // #define ENOMEM 12 /* Cannot allocate memory */ #define EINVAL 22 /* Invalid argument */ @@ -90,9 +93,10 @@ typedef VOID *FILE; #define LOG_DEBUG 7 /* debug-level messages */ #define LOG_PID 0x01 /* log the pid with each message */ #define LOG_CONS 0x02 /* log on the console if errors in sending */ +#define CHAR_BIT 8 /* Number of bits in a char */ // -// Macros from EFI Application Toolkit required to buiild Open SSL +// Macros from EFI Application Toolkit required to build Open SSL // /* The offsetof() macro calculates the offset of a structure member in its structure. Unfortunately this cannot be written down @@ -102,7 +106,7 @@ typedef VOID *FILE; #define offsetof(type, member) OFFSET_OF (type, member) // -// Basic types from EFI Application Toolkit required to buiild Open SSL +// Basic types from EFI Application Toolkit required to build Open SSL // typedef UINTN size_t; typedef INTN ssize_t; @@ -118,9 +122,11 @@ typedef UINT16 nlink_t; typedef int pid_t; typedef void *DIR; typedef void __sighandler_t (int); +typedef UINT8 __uint8_t; +typedef UINT8 sa_family_t; // -// Structures from EFI Application Toolkit required to buiild Open SSL +// Structures from EFI Application Toolkit required to build Open SSL // struct tm { int tm_sec; /* seconds after the minute [0-60] */ @@ -172,13 +178,19 @@ struct stat { INT64 st_qspare[2]; }; +struct sockaddr { + __uint8_t sa_len; /* total length */ + sa_family_t sa_family; /* address family */ + char sa_data[14]; /* actually longer; address value */ +}; + // -// Externs from EFI Application Toolkit required to buiild Open SSL +// Externs from EFI Application Toolkit required to build Open SSL // extern int errno; // -// Function prototypes from EFI Application Toolkit required to buiild Open SSL +// Function prototypes from EFI Application Toolkit required to build Open SSL // void *malloc (size_t); void *realloc (void *, size_t); @@ -208,6 +220,9 @@ int strncmp (const char *, const char *, size_t); char *strrchr (const char *, int); unsigned long strtoul (const char *, char **, int); long strtol (const char *, char **, int); +char *strerror (int); +size_t strspn (const char *, const char *); +size_t strcspn (const char *, const char *); int printf (const char *, ...); int sscanf (const char *, const char *, ...); int open (const char *, int, ...); @@ -247,7 +262,7 @@ void abort (void); __sighandler_t *signal (int, __sighandler_t *); // -// Global variables from EFI Application Toolkit required to buiild Open SSL +// Global variables from EFI Application Toolkit required to build Open SSL // extern FILE *stderr; extern FILE *stdin; @@ -261,7 +276,6 @@ extern FILE *stdout; #define memchr(buf,ch,count) ScanMem8(buf,(UINTN)(count),(UINT8)ch) #define memcmp(buf1,buf2,count) (int)(CompareMem(buf1,buf2,(UINTN)(count))) #define memmove(dest,source,count) CopyMem(dest,source,(UINTN)(count)) -#define strcmp AsciiStrCmp #define strncmp(string1,string2,count) (int)(AsciiStrnCmp(string1,string2,(UINTN)(count))) #define strcpy(strDest,strSource) AsciiStrCpyS(strDest,MAX_STRING_SIZE,strSource) #define strncpy(strDest,strSource,count) AsciiStrnCpyS(strDest,MAX_STRING_SIZE,strSource,(UINTN)count) @@ -273,5 +287,6 @@ extern FILE *stdout; #define localtime(timer) NULL #define gmtime_r(timer,result) (result = NULL) #define atoi(nptr) AsciiStrDecimalToUintn(nptr) +#define gettimeofday(tvp,tz) do { (tvp)->tv_sec = time(NULL); (tvp)->tv_usec = 0; } while (0) #endif