ref: c6db8cf324a97306d9b08982271a6ea03a845552
parent: 78c41b012b1ce43e440a9c748b0e5607afbbca37
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Thu Apr 13 13:11:16 EDT 2023
fix mpint on big endian
--- a/posix/mp.h
+++ b/posix/mp.h
@@ -14,9 +14,14 @@
union FPdbleword
{double x;
- struct { /* little endian */+ struct {+#if BYTE_ORDER == LITTLE_ENDIAN
uint lo;
uint hi;
+#else
+ uint hi;
+ uint lo;
+#endif
};
};
--- a/posix/platform.h
+++ b/posix/platform.h
@@ -23,7 +23,6 @@
#include <unistd.h>
#include <wctype.h>
#include <wchar.h>
-#include "mp.h"
#ifndef __SIZEOF_POINTER__
#error pointer size unknown
@@ -47,3 +46,5 @@
#define BIG_ENDIAN __BIG_ENDIAN
#define BYTE_ORDER __BYTE_ORDER
#endif
+
+#include "mp.h"
--
⑨