1985
|
1 /*
|
|
2 * Copyright (c) 1999, 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 #ifndef JAVA_MD_H
|
|
26 #define JAVA_MD_H
|
|
27
|
|
28 #include <jni.h>
|
|
29 #include <windows.h>
|
|
30 #include <io.h>
|
|
31 #ifndef GAMMA
|
|
32 #include "manifest_info.h"
|
|
33 #endif
|
|
34 #include "jli_util.h"
|
|
35
|
|
36 #ifdef GAMMA
|
|
37 #define stricmp _stricmp
|
|
38 #define strnicmp _strnicmp
|
|
39 #define snprintf _snprintf
|
|
40 #define strdup _strdup
|
|
41 #endif
|
|
42
|
|
43 #define PATH_SEPARATOR ';'
|
|
44 #define FILESEP "\\"
|
|
45 #define FILE_SEPARATOR '\\'
|
|
46 #define IS_FILE_SEPARATOR(c) ((c) == '\\' || (c) == '/')
|
|
47 #define MAXPATHLEN MAX_PATH
|
|
48 #define MAXNAMELEN MAX_PATH
|
|
49
|
|
50 #ifdef JAVA_ARGS
|
|
51 /*
|
|
52 * ApplicationHome is prepended to each of these entries; the resulting
|
|
53 * strings are concatenated (separated by PATH_SEPARATOR) and used as the
|
|
54 * value of -cp option to the launcher.
|
|
55 */
|
|
56 #ifndef APP_CLASSPATH
|
|
57 #define APP_CLASSPATH { "\\lib\\tools.jar", "\\classes" }
|
|
58 #endif
|
|
59 #endif
|
|
60
|
|
61 /*
|
|
62 * Support for doing cheap, accurate interval timing.
|
|
63 */
|
|
64 extern jlong CounterGet(void);
|
|
65 extern jlong Counter2Micros(jlong counts);
|
|
66
|
|
67 #ifdef JAVAW
|
|
68 #define main _main
|
|
69 extern int _main(int argc, char **argv);
|
|
70 #endif
|
|
71
|
|
72 /*
|
|
73 * Function prototypes.
|
|
74 */
|
|
75 #ifndef GAMMA
|
|
76 char *LocateJRE(manifest_info *info);
|
|
77 void ExecJRE(char *jre, char **argv);
|
|
78 #endif
|
|
79 int UnsetEnv(char *name);
|
|
80
|
|
81 #endif
|