12#ifndef __CRT_LIB_SUPPORT_H__
13#define __CRT_LIB_SUPPORT_H__
25#define MAX_STRING_SIZE 0x1000
44#ifdef CONFIG_HEADER_BN_H
45 #error CONFIG_HEADER_BN_H already defined
48#define CONFIG_HEADER_BN_H
50#if !defined (SIXTY_FOUR_BIT) && !defined (THIRTY_TWO_BIT)
51 #if defined (MDE_CPU_X64) || defined (MDE_CPU_AARCH64) || defined (MDE_CPU_IA64) || defined (MDE_CPU_RISCV64) || defined (MDE_CPU_LOONGARCH64)
58 #elif defined (MDE_CPU_IA32) || defined (MDE_CPU_ARM) || defined (MDE_CPU_EBC)
61 #error Unknown target architecture
68#if !defined (__CC_ARM)
69#define va_list VA_LIST
71#define va_start VA_START
74#define va_start(Marker, Parameter) __va_start(Marker, Parameter)
75#define va_arg(Marker, TYPE) __va_arg(Marker, TYPE)
76#define va_end(Marker) ((void)0)
83#define EAFNOSUPPORT 47
84#define INT_MAX 0x7FFFFFFF
85#define INT_MIN (-INT_MAX-1)
86#define LONG_MAX 0X7FFFFFFFL
87#define LONG_MIN (-LONG_MAX-1)
88#define UINT_MAX 0xFFFFFFFF
89#define ULONG_MAX 0xFFFFFFFF
91#define SIZE_MAX 0xFFFFFFFF
104#define NS_IN6ADDRSZ 16
112typedef UINTN intptr_t;
113typedef INTN ptrdiff_t;
116typedef UINT8 __uint8_t;
117typedef UINT8 sa_family_t;
121typedef CHAR16 wchar_t;
155 sa_family_t sa_family;
388 int (*)(
const void *,
const void *)
401#if defined (__GNUC__) && (__GNUC__ >= 2)
424 const char *strSource
430 const char *strSource,
437 const char *strSource
443#define memcpy(dest, source, count) CopyMem(dest,source,(UINTN)(count))
444#define memset(dest, ch, count) SetMem(dest,(UINTN)(count),(UINT8)(ch))
445#define memchr(buf, ch, count) ScanMem8(buf,(UINTN)(count),(UINT8)ch)
446#define memcmp(buf1, buf2, count) (int)(CompareMem(buf1,buf2,(UINTN)(count)))
447#define memmove(dest, source, count) CopyMem(dest,source,(UINTN)(count))
448#define strlen(str) (size_t)(AsciiStrnLenS(str,MAX_STRING_SIZE))
449#define strncmp(string1, string2, count) (int)(AsciiStrnCmp(string1,string2,(UINTN)(count)))
450#define strcasecmp(str1, str2) (int)AsciiStriCmp(str1,str2)
451#define strstr(s1, s2) AsciiStrStr(s1,s2)
452#define sprintf(buf, ...) AsciiSPrint(buf,MAX_STRING_SIZE,__VA_ARGS__)
453#define localtime(timer) NULL
454#define assert(expression)
455#define offsetof(type, member) OFFSET_OF(type,member)
456#define atoi(nptr) AsciiStrDecimalToUintn(nptr)
long strtol(const char *, char **, int)
void qsort(void *, size_t, size_t, int(*)(const void *, const void *))
size_t fread(void *, size_t, size_t, FILE *)
struct tm * gmtime(const time_t *)
FILE * fopen(const char *, const char *)
size_t fwrite(const void *, size_t, size_t, FILE *)
unsigned long long UINT64 __attribute__((aligned(8)))