Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit c00e734

Browse files
Fraser J. Gordonlivecodeian
authored andcommitted
Add Linux/Android arm64 support to foundation.h
1 parent 37fa7f5 commit c00e734

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

libfoundation/include/foundation.h

100644100755
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,9 @@ along with LiveCode. If not see <http://www.gnu.org/licenses/>. */
104104
// __LF__ will be defined if the native line ending is LF.
105105
#undef __LF__
106106

107+
// __LP64__ will be defined if longs and pointers are 64 bits.
108+
#undef __LP64__
109+
107110
// __HAS_CORE_FOUNDATION__ will be defined if the platform has the CF libraries.
108111
#undef __HAS_CORE_FOUNDATION__
109112

@@ -222,6 +225,12 @@ along with LiveCode. If not see <http://www.gnu.org/licenses/>. */
222225
#define __ARM__ 1
223226
#define __LP32__ 1
224227
#define __SMALL__ 1
228+
#elif defined(__aarch64__)
229+
#define __64_BIT__ 1
230+
#define __LITTLE_ENDIAN__ 1
231+
#define __ARM64__ 1
232+
#define __LP64__ 1
233+
#define __MEDIUM__ 1
225234
#endif
226235

227236
// Native char set
@@ -321,6 +330,12 @@ along with LiveCode. If not see <http://www.gnu.org/licenses/>. */
321330
#define __ARM__ (1)
322331
#define __LP32__ (1)
323332
#define __SMALL__ (1)
333+
#elif defined(__aarch64__)
334+
#define __64_BIT__ 1
335+
#define __LITTLE_ENDIAN__ 1
336+
#define __ARM64__ 1
337+
#define __LP64__ 1
338+
#define __MEDIUM__ 1
324339
#endif
325340

326341
// Native char set
@@ -460,10 +475,18 @@ along with LiveCode. If not see <http://www.gnu.org/licenses/>. */
460475
#include <stddef.h>
461476
#include <limits.h>
462477

478+
#ifndef UINT8_MIN
463479
#define UINT8_MIN (0U)
480+
#endif
481+
#ifndef UINT16_MIN
464482
#define UINT16_MIN (0U)
483+
#endif
484+
#ifndef UINT32_MIN
465485
#define UINT32_MIN (0U)
486+
#endif
487+
#ifndef UINT64_MIN
466488
#define UINT64_MIN (0ULL)
489+
#endif
467490

468491
////////////////////////////////////////////////////////////////////////////////
469492
//

0 commit comments

Comments
 (0)