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 // This file holds compiler-dependent includes,
26 // globally used constants & types, class (forward)
27 // declarations and a few frequently used utility functions.
28
29
30 # include <ctype.h>
31 # include <dirent.h>
32 # include <string.h>
33 # include <strings.h> // for bsd'isms
34 # include <stdarg.h>
35 # include <stddef.h> // for offsetof
36 # include <stdio.h>
37 # include <stdlib.h>
38 # include <wchar.h>
39 # include <stdarg.h>
40 #ifdef SOLARIS
41 # include <ieeefp.h>
42 #endif
43 # include <math.h>
44 #ifdef LINUX
246 // NOTE: This one leads to an infinite recursion on Linux
247 #ifndef LINUX
248 int local_vsnprintf(char* buf, size_t count, const char* fmt, va_list argptr);
249 #define vsnprintf local_vsnprintf
250 #endif
251
252 // Portability macros
253 #define PRAGMA_INTERFACE
254 #define PRAGMA_IMPLEMENTATION
255 #define PRAGMA_IMPLEMENTATION_(arg)
256 #define VALUE_OBJ_CLASS_SPEC : public _ValueObj
257
258 // Formatting.
259 #ifdef _LP64
260 #define FORMAT64_MODIFIER "l"
261 #else // !_LP64
262 #define FORMAT64_MODIFIER "ll"
263 #endif // _LP64
264
265 #define offset_of(klass,field) offsetof(klass,field)
|
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_UTILITIES_GLOBALDEFINITIONS_SPARCWORKS_HPP
26 #define SHARE_VM_UTILITIES_GLOBALDEFINITIONS_SPARCWORKS_HPP
27
28 #include "prims/jni.h"
29
30 // This file holds compiler-dependent includes,
31 // globally used constants & types, class (forward)
32 // declarations and a few frequently used utility functions.
33
34
35 # include <ctype.h>
36 # include <dirent.h>
37 # include <string.h>
38 # include <strings.h> // for bsd'isms
39 # include <stdarg.h>
40 # include <stddef.h> // for offsetof
41 # include <stdio.h>
42 # include <stdlib.h>
43 # include <wchar.h>
44 # include <stdarg.h>
45 #ifdef SOLARIS
46 # include <ieeefp.h>
47 #endif
48 # include <math.h>
49 #ifdef LINUX
251 // NOTE: This one leads to an infinite recursion on Linux
252 #ifndef LINUX
253 int local_vsnprintf(char* buf, size_t count, const char* fmt, va_list argptr);
254 #define vsnprintf local_vsnprintf
255 #endif
256
257 // Portability macros
258 #define PRAGMA_INTERFACE
259 #define PRAGMA_IMPLEMENTATION
260 #define PRAGMA_IMPLEMENTATION_(arg)
261 #define VALUE_OBJ_CLASS_SPEC : public _ValueObj
262
263 // Formatting.
264 #ifdef _LP64
265 #define FORMAT64_MODIFIER "l"
266 #else // !_LP64
267 #define FORMAT64_MODIFIER "ll"
268 #endif // _LP64
269
270 #define offset_of(klass,field) offsetof(klass,field)
271
272 #endif // SHARE_VM_UTILITIES_GLOBALDEFINITIONS_SPARCWORKS_HPP
|