1 /*
2 * Copyright (c) 1997, 2009, 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 _PORT_
26 #define _PORT_
27 // Typedefs for portable compiling
28
29 #if defined(__GNUC__)
30
31 #define INTERFACE #pragma interface
32 #define IMPLEMENTATION #pragma implementation
33 //INTERFACE
34 #include <stddef.h>
35 #include <stdlib.h>
36 #include <string.h>
37
38 // Access to the C++ class virtual function pointer
39 // Put the class in the macro
40 typedef void *VPTR;
41 // G++ puts it at the end of the base class
42 #define ACCESS_VPTR(class) VPTR&vptr(){return*(VPTR*)((char*)this+sizeof(class)-sizeof(void*));}
43
44 #elif defined(__TURBOC__)
188 typedef float float32; // 32-bit float
189 typedef double float64; // 64-bit float
190 #endif // __TANDEM
191
192 typedef jlong int64; // Java long for my 64-bit type
193 typedef julong uint64; // Java long for my 64-bit type
194
195 //-----------------------------------------------------------------------------
196 // Nice constants
197 uint32 gcd( uint32 x, uint32 y );
198 int ff1( uint32 mask );
199 int fh1( uint32 mask );
200 uint32 rotate32( uint32 x, int32 cnt );
201
202
203 //-----------------------------------------------------------------------------
204 extern uint32 heap_totalmem; // Current total memory allocation
205 extern uint32 heap_highwater; // Highwater mark to date for memory usage
206
207 #endif // _PORT_
|
1 /*
2 * Copyright (c) 1997, 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 SHARE_VM_LIBADT_PORT_HPP
26 #define SHARE_VM_LIBADT_PORT_HPP
27
28 #include "utilities/top.hpp"
29
30 #ifndef _PORT_
31 #define _PORT_
32 // Typedefs for portable compiling
33
34 #if defined(__GNUC__)
35
36 #define INTERFACE #pragma interface
37 #define IMPLEMENTATION #pragma implementation
38 //INTERFACE
39 #include <stddef.h>
40 #include <stdlib.h>
41 #include <string.h>
42
43 // Access to the C++ class virtual function pointer
44 // Put the class in the macro
45 typedef void *VPTR;
46 // G++ puts it at the end of the base class
47 #define ACCESS_VPTR(class) VPTR&vptr(){return*(VPTR*)((char*)this+sizeof(class)-sizeof(void*));}
48
49 #elif defined(__TURBOC__)
193 typedef float float32; // 32-bit float
194 typedef double float64; // 64-bit float
195 #endif // __TANDEM
196
197 typedef jlong int64; // Java long for my 64-bit type
198 typedef julong uint64; // Java long for my 64-bit type
199
200 //-----------------------------------------------------------------------------
201 // Nice constants
202 uint32 gcd( uint32 x, uint32 y );
203 int ff1( uint32 mask );
204 int fh1( uint32 mask );
205 uint32 rotate32( uint32 x, int32 cnt );
206
207
208 //-----------------------------------------------------------------------------
209 extern uint32 heap_totalmem; // Current total memory allocation
210 extern uint32 heap_highwater; // Highwater mark to date for memory usage
211
212 #endif // _PORT_
213
214 #endif // SHARE_VM_LIBADT_PORT_HPP
|