From 8c3d65a83512f452a05d635adc56ced7525458ea Mon Sep 17 00:00:00 2001 From: jent Date: Thu, 2 Jul 2009 03:13:39 -0600 Subject: [PATCH] Hopefully including the top carbon header will fix the issues we had when we tried to include just Gestalt.h --- classpath/java-lang.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/classpath/java-lang.cpp b/classpath/java-lang.cpp index df456844b4..c9f7142fd8 100644 --- a/classpath/java-lang.cpp +++ b/classpath/java-lang.cpp @@ -38,7 +38,7 @@ #ifdef __APPLE__ # define SO_SUFFIX ".jnilib" -//#include "Gestalt.h" +#include #elif defined WIN32 # define SO_SUFFIX ".dll" #else @@ -380,16 +380,15 @@ Java_java_lang_System_getProperty(JNIEnv* e, jclass, jstring name, #endif } else if (strcmp(chars, "os.version") == 0) { #ifdef __APPLE__ -/* unsigned size = 32; + unsigned size = 32; char buffer[size]; long minorVersion, majorVersion; Gestalt(gestaltSystemVersionMajor, &majorVersion); Gestalt(gestaltSystemVersionMinor, &minorVersion); - snprintf(buffer, size, "%lld.%lld", majorVersion, minorVersion); - r = e->NewStringUTF(buffer);*/ - r = e->NewStringUTF("I hate OSX"); + snprintf(buffer, size, "%ld.%ld", majorVersion, minorVersion); + r = e->NewStringUTF(buffer); #else struct utsname system_id; uname(&system_id);