]> code.delx.au - refind/blobdiff - libeg/lodepng.h
Version 0.10.4 release.
[refind] / libeg / lodepng.h
index 5fae53de44e3f4b2624dbfedf10af0cbb611530e..1d2cd2534682e9ea18f645ff69ac7866d45004c6 100644 (file)
@@ -34,15 +34,22 @@ freely, subject to the following restrictions:
 
 #include <string.h> /*for size_t*/
 
-// Below block of 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 <stdlib.h>
+#define abs(x) (((x) < 0) ? -(x) : (x))
 #ifdef __MAKEWITH_GNUEFI
 #include <efi.h>
 #include <efilib.h>
-#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 <vector>