From 9ffa1d1f29fc1ac92f28e809aa5bf97897338d1d Mon Sep 17 00:00:00 2001 From: barracuda156 Date: Sat, 20 Jan 2024 16:48:45 +0800 Subject: [PATCH 6/6] Fix endianness includes and macros diff --git a68g-config.h a68g-config.h index d3a0e0e..3c87975 100644 --- a68g-config.h +++ a68g-config.h @@ -66,7 +66,13 @@ /* #undef HAVE_DLFCN_H */ /* Define to 1 if you have the header file. */ -#define HAVE_ENDIAN_H 1 +/* #define HAVE_ENDIAN_H 1 */ + +/* Define to 1 if you have the header file. */ +#define HAVE_MACHINE_ENDIAN_H 1 + +/* Define to 1 if you have the header file. */ +/* #define HAVE_SYS_ENDIAN_H 1 */ /* Define to 1 if you have the header file. */ #define HAVE_ERRNO_H 1 diff --git configure.ac configure.ac index e27241e..2e8c6f5 100644 --- configure.ac +++ configure.ac @@ -728,7 +728,7 @@ AC_HEADER_SYS_WAIT AC_HEADER_TIOCGWINSZ -AC_CHECK_HEADERS([assert.h complex.h ctype.h endian.h errno.h execinfo.h fcntl.h fenv.h float.h libgen.h limits.h malloc.h regex.h setjmp.h signal.h stdarg.h stddef.h stdio.h stdlib.h sys/ioctl.h sys/resource.h termios.h sys/time.h unistd.h]) +AC_CHECK_HEADERS([assert.h complex.h ctype.h endian.h machine/endian.h sys/endian.h errno.h execinfo.h fcntl.h fenv.h float.h libgen.h limits.h malloc.h regex.h setjmp.h signal.h stdarg.h stddef.h stdio.h stdlib.h sys/ioctl.h sys/resource.h termios.h sys/time.h unistd.h]) # # Functions we expect. diff --git src/include/a68g-includes.h src/include/a68g-includes.h index 6134842..a680378 100644 --- src/include/a68g-includes.h +++ src/include/a68g-includes.h @@ -75,6 +75,10 @@ #if defined (HAVE_ENDIAN_H) #include +#elif defined (HAVE_MACHINE_ENDIAN_H) + #include +#elif defined (HAVE_SYS_ENDIAN_H) + #include #endif #if defined (HAVE_ERRNO_H)