The second argument to Gestalt() is an SInt32, which, for backwards

compatibility reasons, is a long rather than an int in ILP32 mode
(probably dating back to the old 68000 days, when 32-bit arithmetic was
slower than 16-bit arithmetic, so an int was 16 bits and a long 32 bits
on some 68K machines) and is an int in LP64 mode.

svn path=/trunk/; revision=27921
This commit is contained in:
Guy Harris 2009-04-01 04:01:13 +00:00
parent 9c5ca83acf
commit bac808474c
1 changed files with 5 additions and 5 deletions

View File

@ -301,7 +301,7 @@ get_runtime_version_info(GString *str, void (*additional_info)(GString *))
struct utsname name;
#endif
#if HAVE_OS_X_FRAMEWORKS
long macosx_ver, macosx_major_ver, macosx_minor_ver, macosx_bugfix_ver;
SInt32 macosx_ver, macosx_major_ver, macosx_minor_ver, macosx_bugfix_ver;
#endif
g_string_append(str, "on ");
@ -473,12 +473,12 @@ get_runtime_version_info(GString *str, void (*additional_info)(GString *))
Gestalt(gestaltSystemVersionBugFix, &macosx_bugfix_ver);
g_string_append_printf(str, " (MacOS %ld.%ld.%ld)",
macosx_major_ver,
macosx_minor_ver,
macosx_bugfix_ver);
(long)macosx_major_ver,
(long)macosx_minor_ver,
(long)macosx_bugfix_ver);
} else {
g_string_append_printf(str, " (MacOS X < 10.4 [%lx])",
macosx_ver);
(long)macosx_ver);
/* See Apple's Gestalt Manager Reference for meanings
* of the macosx_ver values. */
}