1 /* 2 * Copyright (c) 2006, 2009, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 # include "incls/_precompiled.incl" 26 # include "incls/_vm_version_solaris_sparc.cpp.incl" 27 28 # include <sys/auxv.h> 29 # include <sys/auxv_SPARC.h> 30 # include <sys/systeminfo.h> 31 32 // We need to keep these here as long as we have to build on Solaris 33 // versions before 10. 34 #ifndef SI_ARCHITECTURE_32 35 #define SI_ARCHITECTURE_32 516 /* basic 32-bit SI_ARCHITECTURE */ 36 #endif 37 38 #ifndef SI_ARCHITECTURE_64 39 #define SI_ARCHITECTURE_64 517 /* basic 64-bit SI_ARCHITECTURE */ 40 #endif 41 42 static void do_sysinfo(int si, const char* string, int* features, int mask) { 43 char tmp; 44 size_t bufsize = sysinfo(si, &tmp, 1); 45 46 // All SI defines used below must be supported. | 1 /* 2 * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 #include "precompiled.hpp" 26 #include "runtime/os.hpp" 27 #include "vm_version_sparc.hpp" 28 29 # include <sys/auxv.h> 30 # include <sys/auxv_SPARC.h> 31 # include <sys/systeminfo.h> 32 33 // We need to keep these here as long as we have to build on Solaris 34 // versions before 10. 35 #ifndef SI_ARCHITECTURE_32 36 #define SI_ARCHITECTURE_32 516 /* basic 32-bit SI_ARCHITECTURE */ 37 #endif 38 39 #ifndef SI_ARCHITECTURE_64 40 #define SI_ARCHITECTURE_64 517 /* basic 64-bit SI_ARCHITECTURE */ 41 #endif 42 43 static void do_sysinfo(int si, const char* string, int* features, int mask) { 44 char tmp; 45 size_t bufsize = sysinfo(si, &tmp, 1); 46 47 // All SI defines used below must be supported. |