Index: configure.ac ================================================================== --- configure.ac +++ configure.ac @@ -138,10 +138,15 @@ dnl also used for .S files. OBJCFLAGS="$OBJCFLAGS -include inttypes.h" dnl We need -latomic for GCC's atomics to work. LIBS="$LIBS -latomic" ;; +*-*-mint*) + enable_shared="no" + enable_threads="no" # TODO + enable_sockets="no" # TODO + ;; esac AS_IF([test x"$host_os" = x"msdosdjgpp" -a x"$build_os" = x"msdosdjgpp"], [ dnl Hack to make configure find these on DOS. : ${AR:=ar.exe} @@ -824,10 +829,14 @@ AC_CHECK_FUNCS(strtof truncf) AC_CHECK_FUNC(asprintf, [ case "$host" in + *-*-mint*) + dnl asprintf is not in headers + have_asprintf="no" + ;; *-*-mingw*) dnl asprintf from MinGW is broken on older Windows versions have_asprintf="no" ;; *-psp-*) Index: src/OFDate.m ================================================================== --- src/OFDate.m +++ src/OFDate.m @@ -39,12 +39,12 @@ #import "OFInvalidArgumentException.h" #import "OFInvalidFormatException.h" #import "OFOutOfMemoryException.h" #import "OFOutOfRangeException.h" -#ifdef OF_AMIGAOS_M68K -/* amiga-gcc does not have trunc() */ +#if defined(OF_AMIGAOS_M68K) || defined(OF_MINT) +/* amiga-gcc and freemint-gcc do not have trunc() */ # define trunc(x) ((int64_t)(x)) #endif @interface OFDate () + (instancetype)of_alloc; Index: src/OFFileManager.m ================================================================== --- src/OFFileManager.m +++ src/OFFileManager.m @@ -65,10 +65,14 @@ #ifdef OF_AMIGAOS # include # include #endif + +#ifdef OF_MINT +# include +#endif @interface OFDefaultFileManager: OFFileManager @end #ifdef OF_AMIGAOS4 Index: src/OFObject.m ================================================================== --- src/OFObject.m +++ src/OFObject.m @@ -16,10 +16,11 @@ #include "config.h" #include #include #include +#include "unistd_wrapper.h" #include #ifdef OF_APPLE_RUNTIME # include Index: src/OFThread.m ================================================================== --- src/OFThread.m +++ src/OFThread.m @@ -77,10 +77,15 @@ #ifdef OF_HAVE_THREADS # import "OFThreadJoinFailedException.h" # import "OFThreadStartFailedException.h" # import "OFThreadStillRunningException.h" #endif + +#ifdef OF_MINT +/* freemint-gcc does not have trunc() */ +# define trunc(x) ((int64_t)(x)) +#endif #if defined(OF_HAVE_THREADS) # import "OFTLSKey.h" # if defined(OF_AMIGAOS) && defined(OF_HAVE_SOCKETS) # import "OFSocket.h" Index: src/platform.h ================================================================== --- src/platform.h +++ src/platform.h @@ -147,10 +147,12 @@ #elif defined(__DJGPP__) # define OF_DJGPP # define OF_MSDOS #elif defined(__riscos__) # define OF_ACORN_RISC_OS +#elif defined(__MINT__) +# define OF_MINT #endif #if defined(__ELF__) # define OF_ELF #elif defined(__MACH__)