Thu, 17 Jan 2013 10:25:16 -0500
7102489: RFE: cleanup jlong typedef on __APPLE__and _LLP64 systems.
Summary: Define jlong as long on all LP64 platforms and add JLONG_FORMAT macro.
Reviewed-by: dholmes, coleenp, mikael, kvn
sla@2327 | 1 | /* |
hseigel@4465 | 2 | * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. |
sla@2327 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
sla@2327 | 4 | * |
sla@2327 | 5 | * This code is free software; you can redistribute it and/or modify it |
sla@2327 | 6 | * under the terms of the GNU General Public License version 2 only, as |
sla@2327 | 7 | * published by the Free Software Foundation. |
sla@2327 | 8 | * |
sla@2327 | 9 | * This code is distributed in the hope that it will be useful, but WITHOUT |
sla@2327 | 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
sla@2327 | 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
sla@2327 | 12 | * version 2 for more details (a copy is included in the LICENSE file that |
sla@2327 | 13 | * accompanied this code). |
sla@2327 | 14 | * |
sla@2327 | 15 | * You should have received a copy of the GNU General Public License version |
sla@2327 | 16 | * 2 along with this work; if not, write to the Free Software Foundation, |
sla@2327 | 17 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
sla@2327 | 18 | * |
sla@2327 | 19 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
sla@2327 | 20 | * or visit www.oracle.com if you need additional information or have any |
sla@2327 | 21 | * questions. |
sla@2327 | 22 | * |
sla@2327 | 23 | */ |
sla@2327 | 24 | |
sla@2327 | 25 | #ifndef JAVA_MD_H |
sla@2327 | 26 | #define JAVA_MD_H |
sla@2327 | 27 | |
sla@2327 | 28 | #include <jni.h> |
sla@2327 | 29 | #include <windows.h> |
sla@2327 | 30 | #include <io.h> |
sla@2327 | 31 | #ifndef GAMMA |
sla@2327 | 32 | #include "manifest_info.h" |
sla@2327 | 33 | #endif |
sla@2327 | 34 | #include "jli_util.h" |
sla@2327 | 35 | |
sla@2327 | 36 | #ifdef GAMMA |
sla@2327 | 37 | #define stricmp _stricmp |
sla@2327 | 38 | #define strnicmp _strnicmp |
sla@2327 | 39 | #define snprintf _snprintf |
sla@2327 | 40 | #define strdup _strdup |
sla@2327 | 41 | #endif |
sla@2327 | 42 | |
sla@2327 | 43 | #define PATH_SEPARATOR ';' |
sla@2327 | 44 | #define FILESEP "\\" |
sla@2327 | 45 | #define FILE_SEPARATOR '\\' |
sla@2327 | 46 | #define IS_FILE_SEPARATOR(c) ((c) == '\\' || (c) == '/') |
sla@2327 | 47 | #define MAXPATHLEN MAX_PATH |
sla@2327 | 48 | #define MAXNAMELEN MAX_PATH |
sla@2327 | 49 | |
sla@2327 | 50 | #ifdef JAVA_ARGS |
sla@2327 | 51 | /* |
sla@2327 | 52 | * ApplicationHome is prepended to each of these entries; the resulting |
sla@2327 | 53 | * strings are concatenated (separated by PATH_SEPARATOR) and used as the |
sla@2327 | 54 | * value of -cp option to the launcher. |
sla@2327 | 55 | */ |
sla@2327 | 56 | #ifndef APP_CLASSPATH |
sla@2327 | 57 | #define APP_CLASSPATH { "\\lib\\tools.jar", "\\classes" } |
sla@2327 | 58 | #endif |
sla@2327 | 59 | #endif |
sla@2327 | 60 | |
sla@2327 | 61 | /* |
sla@2327 | 62 | * Support for doing cheap, accurate interval timing. |
sla@2327 | 63 | */ |
sla@2327 | 64 | extern jlong CounterGet(void); |
sla@2327 | 65 | extern jlong Counter2Micros(jlong counts); |
sla@2327 | 66 | |
sla@2327 | 67 | #ifdef JAVAW |
sla@2327 | 68 | #define main _main |
sla@2327 | 69 | extern int _main(int argc, char **argv); |
sla@2327 | 70 | #endif |
sla@2327 | 71 | |
hseigel@4465 | 72 | #define JLONG_FORMAT "%I64d" |
hseigel@4465 | 73 | |
sla@2327 | 74 | /* |
sla@2327 | 75 | * Function prototypes. |
sla@2327 | 76 | */ |
sla@2327 | 77 | #ifndef GAMMA |
sla@2327 | 78 | char *LocateJRE(manifest_info *info); |
sla@2327 | 79 | void ExecJRE(char *jre, char **argv); |
sla@2327 | 80 | #endif |
sla@2327 | 81 | int UnsetEnv(char *name); |
sla@2327 | 82 | |
sla@2327 | 83 | #endif |