jamvm
view src/class.h @ 400:5baaa2bcac6b
Support flipping between GNU Classpath and OpenJDK using configure (thanks to twisti).
2008-08-04 Andrew John Hughes <gnu_andrew@member.fsf.org>
* configure.ac:
Add --with-java-runtime-library from CACAO and
change --with-classpath-install-dir to
--with-java-runtime-library-install-dir.
* lib/Makefile.am,
* src/class.h,
* src/dll.c:
Define class library and native libs location
depending on value of --with-java-runtime-library.
2008-08-04 Andrew John Hughes <gnu_andrew@member.fsf.org>
* configure.ac:
Add --with-java-runtime-library from CACAO and
change --with-classpath-install-dir to
--with-java-runtime-library-install-dir.
* lib/Makefile.am,
* src/class.h,
* src/dll.c:
Define class library and native libs location
depending on value of --with-java-runtime-library.
| author | andrew |
|---|---|
| date | Tue Aug 05 04:48:38 2008 +0100 (2008-08-05) |
| parents | f5d648451987 |
| children |
line source
1 /*
2 * Copyright (C) 2003, 2004, 2005, 2006, 2007
3 * Robert Lougher <rob@lougher.org.uk>.
4 *
5 * This file is part of JamVM.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2,
10 * or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 */
22 /* Macros for reading data values from class files - values
23 are in big endian format, and non-aligned. See arch.h
24 for READ_DBL - this is platform dependent */
26 #define READ_U1(v,p,l) v = *(p)++
27 #define READ_U2(v,p,l) v = ((p)[0]<<8)|(p)[1]; (p)+=2
28 #define READ_U4(v,p,l) v = ((p)[0]<<24)|((p)[1]<<16)|((p)[2]<<8)|(p)[3]; (p)+=4
29 #define READ_U8(v,p,l) v = ((u8)(p)[0]<<56)|((u8)(p)[1]<<48)|((u8)(p)[2]<<40) \
30 |((u8)(p)[3]<<32)|((u8)(p)[4]<<24)|((u8)(p)[5]<<16) \
31 |((u8)(p)[6]<<8)|(u8)(p)[7]; (p)+=8
33 #define READ_INDEX(v,p,l) READ_U2(v,p,l)
34 #define READ_TYPE_INDEX(v,cp,t,p,l) READ_U2(v,p,l)
36 /* The default value of the boot classpath is based on the JamVM
37 and Classpath install directories. If zip support is enabled
38 the classes will be contained in ZIP files, else they will be
39 separate class files in a directory structure */
41 #ifdef USE_ZIP
42 #define JAMVM_CLASSES INSTALL_DIR"/share/jamvm/classes.zip"
43 #ifdef WITH_JAVA_RUNTIME_LIBRARY_CLASSPATH
44 #define CLASSPATH_CLASSES RUNTIME_INSTALL_DIR"/share/classpath/glibj.zip"
45 #elif WITH_JAVA_RUNTIME_LIBRARY_OPENJDK
46 #define CLASSPATH_CLASSES RUNTIME_INSTALL_DIR"/jre/lib/rt.jar"
47 #endif
48 #else
49 #define JAMVM_CLASSES INSTALL_DIR"/share/jamvm/classes"
50 #ifdef WITH_JAVA_RUNTIME_LIBRARY_CLASSPATH
51 #define CLASSPATH_CLASSES RUNTIME_INSTALL_DIR"/share/classpath"
52 #elif WITH_JAVA_RUNTIME_LIBRARY_OPENJDK
53 #define CLASSPATH_CLASSES RUNTIME_INSTALL_DIR"/jre/lib"
54 #endif
55 #endif
57 #define DFLT_BCP JAMVM_CLASSES":"CLASSPATH_CLASSES
