1 /*
2 * Copyright (c) 1997, 2016, 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 *
107 #define UINTPTR_MAX _UI32_MAX
108 #endif
109 #endif
110
111 //----------------------------------------------------------------------------------------------------
112 // Additional Java basic types
113
114 typedef unsigned char jubyte;
115 typedef unsigned short jushort;
116 typedef unsigned int juint;
117 typedef unsigned __int64 julong;
118
119
120 //----------------------------------------------------------------------------------------------------
121 // Non-standard stdlib-like stuff:
122 inline int strcasecmp(const char *s1, const char *s2) { return _stricmp(s1,s2); }
123 inline int strncasecmp(const char *s1, const char *s2, size_t n) {
124 return _strnicmp(s1,s2,n);
125 }
126
127
128 //----------------------------------------------------------------------------------------------------
129 // Debugging
130
131 #if _WIN64
132 extern "C" void breakpoint();
133 #define BREAKPOINT ::breakpoint()
134 #else
135 #define BREAKPOINT __asm { int 3 }
136 #endif
137
138 //----------------------------------------------------------------------------------------------------
139 // Checking for nanness
140
141 inline int g_isnan(jfloat f) { return _isnan(f); }
142 inline int g_isnan(jdouble f) { return _isnan(f); }
143
144 //----------------------------------------------------------------------------------------------------
145 // Checking for finiteness
146
147 inline int g_isfinite(jfloat f) { return _finite(f); }
148 inline int g_isfinite(jdouble f) { return _finite(f); }
149
150 //----------------------------------------------------------------------------------------------------
151 // Miscellaneous
152
153 // Visual Studio 2005 deprecates POSIX names - use ISO C++ names instead
154 #if _MSC_VER >= 1400
155 #define open _open
156 #define close _close
|
1 /*
2 * Copyright (c) 1997, 2017, 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 *
107 #define UINTPTR_MAX _UI32_MAX
108 #endif
109 #endif
110
111 //----------------------------------------------------------------------------------------------------
112 // Additional Java basic types
113
114 typedef unsigned char jubyte;
115 typedef unsigned short jushort;
116 typedef unsigned int juint;
117 typedef unsigned __int64 julong;
118
119
120 //----------------------------------------------------------------------------------------------------
121 // Non-standard stdlib-like stuff:
122 inline int strcasecmp(const char *s1, const char *s2) { return _stricmp(s1,s2); }
123 inline int strncasecmp(const char *s1, const char *s2, size_t n) {
124 return _strnicmp(s1,s2,n);
125 }
126
127
128 //----------------------------------------------------------------------------------------------------
129 // Checking for nanness
130
131 inline int g_isnan(jfloat f) { return _isnan(f); }
132 inline int g_isnan(jdouble f) { return _isnan(f); }
133
134 //----------------------------------------------------------------------------------------------------
135 // Checking for finiteness
136
137 inline int g_isfinite(jfloat f) { return _finite(f); }
138 inline int g_isfinite(jdouble f) { return _finite(f); }
139
140 //----------------------------------------------------------------------------------------------------
141 // Miscellaneous
142
143 // Visual Studio 2005 deprecates POSIX names - use ISO C++ names instead
144 #if _MSC_VER >= 1400
145 #define open _open
146 #define close _close
|