1 /*
2 * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
3 * Copyright (c) 2012, 2017 SAP SE. All rights reserved.
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 *
6 * This code is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 only, as
8 * published by the Free Software Foundation.
9 *
10 * This code is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 * version 2 for more details (a copy is included in the LICENSE file that
14 * accompanied this code).
15 *
16 * You should have received a copy of the GNU General Public License version
17 * 2 along with this work; if not, write to the Free Software Foundation,
18 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
19 *
20 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
21 * or visit www.oracle.com if you need additional information or have any
22 * questions.
91 #define NULL 0L
92 #else
93 #ifndef NULL
94 #define NULL 0
95 #endif
96 #endif
97 #endif // AIX
98
99 // Compiler-specific primitive types
100 // All defs of int (uint16_6 etc) are defined in AIX' /usr/include/stdint.h
101
102 // Additional Java basic types
103
104 typedef uint8_t jubyte;
105 typedef uint16_t jushort;
106 typedef uint32_t juint;
107 typedef uint64_t julong;
108
109
110 //----------------------------------------------------------------------------------------------------
111 // Debugging
112
113 #define DEBUG_EXCEPTION ::abort();
114
115 extern "C" void breakpoint();
116 #define BREAKPOINT ::breakpoint()
117
118 // checking for nanness
119 #ifdef AIX
120 inline int g_isnan(float f) { return isnan(f); }
121 inline int g_isnan(double f) { return isnan(f); }
122 #else
123 #error "missing platform-specific definition here"
124 #endif
125
126 // Checking for finiteness
127
128 inline int g_isfinite(jfloat f) { return finite(f); }
129 inline int g_isfinite(jdouble f) { return finite(f); }
130
131
132 // Wide characters
133
134 inline int wcslen(const jchar* x) { return wcslen((const wchar_t*)x); }
135
136
|
1 /*
2 * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
3 * Copyright (c) 2012, 2017 SAP SE. All rights reserved.
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 *
6 * This code is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 only, as
8 * published by the Free Software Foundation.
9 *
10 * This code is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 * version 2 for more details (a copy is included in the LICENSE file that
14 * accompanied this code).
15 *
16 * You should have received a copy of the GNU General Public License version
17 * 2 along with this work; if not, write to the Free Software Foundation,
18 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
19 *
20 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
21 * or visit www.oracle.com if you need additional information or have any
22 * questions.
91 #define NULL 0L
92 #else
93 #ifndef NULL
94 #define NULL 0
95 #endif
96 #endif
97 #endif // AIX
98
99 // Compiler-specific primitive types
100 // All defs of int (uint16_6 etc) are defined in AIX' /usr/include/stdint.h
101
102 // Additional Java basic types
103
104 typedef uint8_t jubyte;
105 typedef uint16_t jushort;
106 typedef uint32_t juint;
107 typedef uint64_t julong;
108
109
110 //----------------------------------------------------------------------------------------------------
111
112 // checking for nanness
113 #ifdef AIX
114 inline int g_isnan(float f) { return isnan(f); }
115 inline int g_isnan(double f) { return isnan(f); }
116 #else
117 #error "missing platform-specific definition here"
118 #endif
119
120 // Checking for finiteness
121
122 inline int g_isfinite(jfloat f) { return finite(f); }
123 inline int g_isfinite(jdouble f) { return finite(f); }
124
125
126 // Wide characters
127
128 inline int wcslen(const jchar* x) { return wcslen((const wchar_t*)x); }
129
130
|