X-Git-Url: https://code.delx.au/refind/blobdiff_plain/e63c2d65be451323f51c85910d1e125deb1ad1ea..bda402d8bb74587c5a813c94a0c8626e0e4f18fe:/libeg/lodepng.h diff --git a/libeg/lodepng.h b/libeg/lodepng.h index bd3b714..1d2cd25 100644 --- a/libeg/lodepng.h +++ b/libeg/lodepng.h @@ -24,7 +24,7 @@ freely, subject to the following restrictions: */ /* * This version of lodepng.h is modified for use with rEFInd. Some options - * are commented out and two definitions (commented on shortly) are added + * are commented out and several definitions (commented on shortly) are added * for GNU-EFI compatibility. The associated lodepng.c file is unmodified * from the original. */ @@ -34,15 +34,22 @@ freely, subject to the following restrictions: #include /*for size_t*/ -// Below two lines required for GNU-EFI (program hangs when run without them, -// and associated function in lodepng_xtra.c) +// Below block of lines required for GNU-EFI and TianoCore (program hangs +// when run without them, and associated function in lodepng_xtra.c) int MyStrlen(const char *InString); #define strlen(c) MyStrlen(c) +#include +#define abs(x) (((x) < 0) ? -(x) : (x)) #ifdef __MAKEWITH_GNUEFI #include #include -#define memcpy(a, b, c) CopyMem(a, b, c) +#else +#include "../include/tiano_includes.h" #endif +VOID *MyMemSet(VOID *s, int c, size_t n); +VOID *MyMemCpy(void *__restrict __dest, const void *__restrict __src, size_t __n); +#define memset(s, c, n) MyMemSet(s, c, n) +#define memcpy(d, s, n) MyMemCpy(d, s, n) #ifdef __cplusplus #include