Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1705,6 +1705,35 @@ EOF | |
echo $datatype | ||
} | ||
|
||
# | ||
# Check whether the system is 32-bit | ||
# | ||
pointer_is_32bit() { | ||
cat > tmp_pointer_is_32bit.cpp << EOF | ||
int main() { | ||
void *p; | ||
int v = (int)p; | ||
return 0; | ||
} | ||
EOF | ||
$CXX $CXXFLAGS -c -o $TMPO.o tmp_pointer_is_32bit.cpp 2>/dev/null | ||
status=$? | ||
cc_check_clean tmp_pointer_is_32bit.cpp | ||
return $status | ||
} | ||
|
||
echo_n "Checking 64-bitness... " | ||
pointer_is_32bit | ||
if test $? -eq 0; then | ||
type_ptr=int32 | ||
echo "no" | ||
add_line_to_config_h "/* #define SCUMM_64BITS */" | ||
else | ||
type_ptr=int64 | ||
echo "yes" | ||
add_line_to_config_h "#define SCUMM_64BITS" | ||
fi | ||
|
||
# | ||
# Determine data type sizes | ||
# | ||
|
@@ -1726,6 +1755,17 @@ TMPR="$?" | |
echo "$type_4_byte" | ||
test $TMPR -eq 0 || exit 1 # check exit code of subshell | ||
|
||
echo_n "Type with 8 bytes... " | ||
type_8_byte=`find_type_with_size 8` | ||
TMPR="$?" | ||
echo "$type_8_byte" | ||
if test $TMPR -eq 0; then | ||
_def_64bit_type_signed="typedef signed $type_8_byte int64;" | ||
_def_64bit_type_unsigned="typedef unsigned $type_8_byte uint64;" | ||
fi | ||
# force cleanup after check for 8 bytes type | ||
cc_check_clean tmp_find_type_with_size.cpp | ||
|
||
# | ||
# Check whether memory alignment is required | ||
# | ||
|
@@ -3853,6 +3893,17 @@ typedef signed $type_1_byte int8; | |
typedef signed $type_2_byte int16; | ||
typedef signed $type_4_byte int32; | ||
/* 64-bit stuff */ | ||
$_def_64bit_type_signed | ||
#if defined(__APPLE__) && !defined(__ppc__) | ||
#ifndef _UINT64 | ||
#define _UINT64 | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
clone2727
via email
Contributor
|
||
$_def_64bit_type_unsigned | ||
#endif | ||
#else | ||
$_def_64bit_type_unsigned | ||
#endif | ||
#endif /* CONFIG_H */ | ||
EOF | ||
|
||
|
1 comment
on commit 0024228
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW, indention in this patch is different from the rest of configure: It uses 8 spaces per level, instead of 1 tab (of width 4)
Why is this mysterious macro being defined on Mac OS X? I can't think of a reason, but I am sure you had a good one, but shouldn't this then be explained in a comment?