aboutsummaryrefslogtreecommitdiffstats
path: root/version_info.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2012-09-08 07:46:56 +0000
committerGuy Harris <guy@alum.mit.edu>2012-09-08 07:46:56 +0000
commit001dbcfc0b168c5180c452cd3535438ad76a9237 (patch)
treebd9461d81dc45795b9682cc8f2f6da4aa8d59b99 /version_info.c
parent50351aa1c43241d581304583d585b405a022eeb8 (diff)
We no longer use Gestalt(), so there's no need to check for it.
We *do*, however, use CFPropertyListCreateWithStream(), so we need to check for it, and, if we're able to use the OS X frameworks at all, use CFPropertyListCreateFromStream() if we don't have CFPropertyListCreateWithStream(). svn path=/trunk/; revision=44812
Diffstat (limited to 'version_info.c')
-rw-r--r--version_info.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/version_info.c b/version_info.c
index 887c42fa4b..60021c7705 100644
--- a/version_info.c
+++ b/version_info.c
@@ -259,9 +259,15 @@ get_os_x_version_info(GString *str)
CFRelease(system_version_plist_stream);
return FALSE;
}
+#ifdef HAVE_CFPROPERTYLISTCREATEWITHSTREAM
system_version_dict = CFPropertyListCreateWithStream(NULL,
system_version_plist_stream, 0, kCFPropertyListImmutable,
NULL, NULL);
+#else
+ system_version_dict = CFPropertyListCreateFromStream(NULL,
+ system_version_plist_stream, 0, kCFPropertyListImmutable,
+ NULL, NULL);
+#endif
if (system_version_dict == NULL)
return FALSE;
if (CFGetTypeID(system_version_dict) != CFDictionaryGetTypeID()) {