You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mt...@apache.org on 2009/09/23 13:05:52 UTC
svn commit: r818052 -
/commons/sandbox/runtime/trunk/src/main/native/os/darwin/os.c
Author: mturk
Date: Wed Sep 23 11:05:51 2009
New Revision: 818052
URL: http://svn.apache.org/viewvc?rev=818052&view=rev
Log:
Darwin's uname is really wired
Modified:
commons/sandbox/runtime/trunk/src/main/native/os/darwin/os.c
Modified: commons/sandbox/runtime/trunk/src/main/native/os/darwin/os.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/darwin/os.c?rev=818052&r1=818051&r2=818052&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/darwin/os.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/darwin/os.c Wed Sep 23 11:05:51 2009
@@ -55,8 +55,15 @@
ACR_JNI_EXPORT_DECLARE(jstring, Os, getMachine)(ACR_JNISTDARGS)
{
struct utsname sys;
- if (!uname(&sys))
- return CSTR_TO_JSTRING(sys.machine);
+ if (!uname(&sys)) {
+#if CC_SIZEOF_VOIDP == 8
+ if (strstr(sys.machine, "86")) {
+ return CSTR_TO_JSTRING("x86_64");
+ }
+ else
+#endif
+ return CSTR_TO_JSTRING(sys.machine);
+ }
else
return NULL;
}