diff --git a/README b/README index 9fad2ca..0782818 100644 --- a/README +++ b/README @@ -53,16 +53,10 @@ old build system and doing something like mkdir -p build/debug-linux cd build/debug-linux - ../../util/configure.sh '--host=i486-linux' '--build=i486-linux' '--front-end=x' '--host-gcc=gcc -m32' '--cflags=-fno-strict-aliasing -I/usr/X11R6/include -O0 -finline-functions -g -Wall' '--root=../..' '--host-file-format=glibc' '--sound=linux' '--syn68k-host=i486-linux-glibc' + ../../util/configure.sh '--host=i486-linux' '--build=i486-linux' '--front-end=sdl' '--host-gcc=gcc -m32' '--cflags=-fno-strict-aliasing -I/usr/X11R6/include -O0 -finline-functions -g -Wall' '--root=../..' '--host-file-format=glibc' '--sound=sdl' '--syn68k-host=i486-linux-glibc' make -However, you may find that you need to hand-edit Makefile and change the line - -BUILD_GCC = gcc - -to - -BUILD_GCC = gcc -m32 +The above works on Fedora 10 x86_64. In the past it was possible to cross-compile a version of Executor for Windows using mingw32. So far that port hasn't been tried since diff --git a/src/config/Makefile.in b/src/config/Makefile.in index 0b5f6fc..db24735 100644 --- a/src/config/Makefile.in +++ b/src/config/Makefile.in @@ -59,7 +59,7 @@ HOST_LD = splosion # these are compilers for the host BUILD_CC = cc -BUILD_GCC = gcc +BUILD_GCC = gcc -m32 ifobjc # currently, objc compilers are only used on NEXTSTEP builds. diff --git a/src/config/os/cygwin32/win_time.c b/src/config/os/cygwin32/win_time.c index 842a389..aefd807 100644 --- a/src/config/os/cygwin32/win_time.c +++ b/src/config/os/cygwin32/win_time.c @@ -19,10 +19,10 @@ PRIVATE uint64 system_time_to_micro_time (const SYSTEMTIME *timep) { FILETIME file_time; - uint64 retval; + uint64_t retval; SystemTimeToFileTime (timep, &file_time); - retval = ((((uint64) file_time.dwHighDateTime) << 32) | + retval = ((((uint64_t) file_time.dwHighDateTime) << 32) | (uint32) file_time.dwLowDateTime) / 10; return retval; } @@ -31,7 +31,7 @@ PRIVATE void gettimeofday (struct timeval *tvp, void *ignored) { SYSTEMTIME system_time, unix_epoch; - uint64 now_micro_time; + uint64_t now_micro_time; unix_epoch.wYear = 1970; unix_epoch.wMonth = 1; diff --git a/src/config/os/linux/linux.h b/src/config/os/linux/linux.h index 90e174d..69e8acd 100644 --- a/src/config/os/linux/linux.h +++ b/src/config/os/linux/linux.h @@ -68,7 +68,13 @@ extern void *mmap_permanent_memory (unsigned long amount_wanted); #define HAVE_MMAP -#define CONFIG_OFFSET_P 0 /* don't normally use offset memory */ +/* + * In the bad old days we could allocate page 0 and use it and not have + * to offset memory. These days that's rarely allowed, and machines are + * fast enough that it doesn't matter. + */ + +#define CONFIG_OFFSET_P 1 /* don't normally use offset memory */ extern int ROMlib_launch_native_app (int n_filenames, char **filenames); diff --git a/src/emustubs.c b/src/emustubs.c index 3c4101c..e7586eb 100644 --- a/src/emustubs.c +++ b/src/emustubs.c @@ -2811,7 +2811,7 @@ STUB (Microseconds) { unsigned long ms = msecs_elapsed (); EM_D0 = ms * 1000; - EM_A0 = ((uint64) ms * 1000) >> 32; + EM_A0 = ((uint64_t) ms * 1000) >> 32; RTS (); } diff --git a/src/include/rsys/custom.h b/src/include/rsys/custom.h index 1c93377..8c91ae9 100644 --- a/src/include/rsys/custom.h +++ b/src/include/rsys/custom.h @@ -50,9 +50,9 @@ header_t; typedef struct { - uint64 magic; + uint64_t magic; header_t headers[0]; - uint8 filler[CUSTOM_BLOCK_SIZE - sizeof (uint64)]; + uint8 filler[CUSTOM_BLOCK_SIZE - sizeof (uint64_t)]; } custom_block_t; diff --git a/src/include/rsys/soundopts.h b/src/include/rsys/soundopts.h index 0d38414..795387d 100644 --- a/src/include/rsys/soundopts.h +++ b/src/include/rsys/soundopts.h @@ -44,7 +44,7 @@ extern void clear_pending_sounds (void); extern HIDDEN_SndChannelPtr allchans; -typedef uint64 snd_time; +typedef uint64_t snd_time; #define SND_PROMOTE(x) (((snd_time)x) << (4 * sizeof (snd_time))) #define SND_DEMOTE(x) (((snd_time)x) >> (4 * sizeof (snd_time))) diff --git a/src/include/rsys/types.h b/src/include/rsys/types.h index 6ea9ad4..33bc4a4 100644 --- a/src/include/rsys/types.h +++ b/src/include/rsys/types.h @@ -8,8 +8,6 @@ typedef unsigned short uint16; typedef signed short int16; typedef unsigned int uint32; typedef signed int int32; -typedef signed long long int64; -typedef unsigned long long uint64; #define INT_TYPES_TYPEDEFED #endif /* !INT_TYPES_TYPEDEFED */ diff --git a/src/interfacelib.c b/src/interfacelib.c index 842f146..0d11bb1 100644 --- a/src/interfacelib.c +++ b/src/interfacelib.c @@ -2291,10 +2291,10 @@ CallUniversalProc_from_native (UniversalProcPtr proc, ProcInfoType info, ...) } PRIVATE void -microseconds (uint64 *retp) +microseconds (uint64_t *retp) { warning_trace_info (NULL_STRING); - *retp = (uint64) (uint32) msecs_elapsed () * 1000; + *retp = (uint64_t) (uint32) msecs_elapsed () * 1000; } PRIVATE void diff --git a/util/configure.sh b/util/configure.sh index 65f11ce..2253c8b 100755 --- a/util/configure.sh +++ b/util/configure.sh @@ -577,4 +577,9 @@ echo "${root}/util/configure.sh $arguments" >> config.status chmod +x config.status +# If we're using this old configure script, then we're probably not dealing +# with 64-bit machines. The new build system constructs config.h for us. + +echo '#define SIZEOF_CHAR_P 4' > config.h + echo "Executor is now configured for \`${host_arch}-${host_os}/${front_end}'."