1879N/A * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 0N/A * published by the Free Software Foundation. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1472N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 0N/A// Typedefs for portable compiling 0N/A// Access to the C++ class virtual function pointer 0N/A// Put the class in the macro 0N/A// G++ puts it at the end of the base class 0N/Aextern "C" int stricmp(
const char *,
const char *);
0N/Ainline int bcmp(
const void *s,
const void *d,
int l) {
return memcmp(s,d,l); }
0N/Ainline int min(
int a,
int b) {
return a < b ? a : b; }
0N/Ainline int max(
int a,
int b) {
return a > b ? a : b; }
0N/A//inline int strcasecmp(const char *s1, const char *s2) { return stricmp(s1,s2); } 0N/Ainline long abs(
long x ) {
return x < 0 ? -x : x; }
0N/A// Access to the C++ class virtual function pointer 0N/A// Put the class in the macro 0N/A// BorlandC puts it up front 0N/Ainline long min(
long a,
long b) {
return a < b ? a : b; }
0N/Ainline long max(
long a,
long b) {
return a > b ? a : b; }
0N/Ainline int min(
int a,
int b) {
return a < b ? a : b; }
0N/Ainline int max(
int a,
int b) {
return a > b ? a : b; }
0N/Ainline long abs(
long x ) {
return x < 0 ? -x : x; }
0N/Ainline int min(
int a,
int b) {
return a < b ? a : b; }
0N/Ainline int max(
int a,
int b) {
return a > b ? a : b; }
0N/A// IBM's xlC compiler 0N/Ainline int min(
int a,
int b) {
return a < b ? a : b; }
0N/Ainline int max(
int a,
int b) {
return a > b ? a : b; }
0N/A// Microsoft Visual C++ 0N/A//inline int strcasecmp(const char *s1, const char *s2) { return stricmp(s1,s2); } 0N/A// This case is for the Tandem Business Unit of Compaq Computer Corporation. 0N/A// The Tandem case must precede the AT&T case, 0N/A// because the Tandem c89 compiler also defines __cplusplus. 0N/Ainline int min(
int a,
int b) {
return a < b ? a : b; }
0N/Ainline int max(
int a,
int b) {
return a > b ? a : b; }
0N/A#
else // All other machines 0N/Ainline int min(
int a,
int b) {
return a < b ? a : b; }
0N/Ainline int max(
int a,
int b) {
return a > b ? a : b; }
0N/A//----------------------------------------------------------------------------- 0N/A// Safer memory allocations 0N/A//----------------------------------------------------------------------------- 0N/A// And now, the bit-size-specified integer sizes 0N/A// All uses of *int16 changed to 32-bit to speed up compiler on Intel 0N/A//typedef signed short int16; // Exactly 16bits signed 0N/A//typedef unsigned short uint16; // Exactly 16bits unsigned 0N/A//const unsigned int min_uint16 = 0x0000; // smallest uint16 0N/A//const unsigned int max_uint16 = 0xFFFF; // largest uint16 0N/Atypedef unsigned int uint;
// When you need a fast >=16bit unsigned value 0N/A/*typedef int int; */ // When you need a fast >=16bit value 0N/A// Bit-sized floating point and long thingies 0N/A// Do not define these for Tandem, because they conflict with typedefs in softieee.h. 0N/A//----------------------------------------------------------------------------- 0N/A//----------------------------------------------------------------------------- 1879N/A#
endif // SHARE_VM_LIBADT_PORT_HPP