diff options
author | Guy Harris <guy@alum.mit.edu> | 2009-04-01 04:01:13 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2009-04-01 04:01:13 +0000 |
commit | bac808474c1b87760504493080e639d3b1dbb81e (patch) | |
tree | ea6f284493f0788bff24ef20e95f08c9b6213627 /version_info.c | |
parent | 9c5ca83acf3aea0aa7108f08efeb1f6c7e3866af (diff) |
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
Diffstat (limited to 'version_info.c')
-rw-r--r-- | version_info.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/version_info.c b/version_info.c index 5dafbec214..440bb6cb9f 100644 --- a/version_info.c +++ b/version_info.c @@ -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. */ } |