1.1 --- a/src/share/vm/utilities/globalDefinitions.hpp Thu May 15 18:23:26 2014 -0400 1.2 +++ b/src/share/vm/utilities/globalDefinitions.hpp Thu May 22 15:52:41 2014 -0400 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -42,6 +42,32 @@ 1.11 # include "utilities/globalDefinitions_xlc.hpp" 1.12 #endif 1.13 1.14 +#ifndef PRAGMA_DIAG_PUSH 1.15 +#define PRAGMA_DIAG_PUSH 1.16 +#endif 1.17 +#ifndef PRAGMA_DIAG_POP 1.18 +#define PRAGMA_DIAG_POP 1.19 +#endif 1.20 +#ifndef PRAGMA_FORMAT_NONLITERAL_IGNORED 1.21 +#define PRAGMA_FORMAT_NONLITERAL_IGNORED 1.22 +#endif 1.23 +#ifndef PRAGMA_FORMAT_IGNORED 1.24 +#define PRAGMA_FORMAT_IGNORED 1.25 +#endif 1.26 +#ifndef PRAGMA_FORMAT_NONLITERAL_IGNORED_INTERNAL 1.27 +#define PRAGMA_FORMAT_NONLITERAL_IGNORED_INTERNAL 1.28 +#endif 1.29 +#ifndef PRAGMA_FORMAT_NONLITERAL_IGNORED_EXTERNAL 1.30 +#define PRAGMA_FORMAT_NONLITERAL_IGNORED_EXTERNAL 1.31 +#endif 1.32 +#ifndef PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 1.33 +#define PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 1.34 +#endif 1.35 +#ifndef ATTRIBUTE_PRINTF 1.36 +#define ATTRIBUTE_PRINTF(fmt, vargs) 1.37 +#endif 1.38 + 1.39 + 1.40 #include "utilities/macros.hpp" 1.41 1.42 // This file holds all globally used constants & types, class (forward) 1.43 @@ -1284,6 +1310,11 @@ 1.44 return ((int)((unsigned int)high << 16) | (unsigned int)low); 1.45 } 1.46 1.47 +// Convert pointer to intptr_t, for use in printing pointers. 1.48 +inline intptr_t p2i(const void * p) { 1.49 + return (intptr_t) p; 1.50 +} 1.51 + 1.52 // Printf-style formatters for fixed- and variable-width types as pointers and 1.53 // integers. These are derived from the definitions in inttypes.h. If the platform 1.54 // doesn't provide appropriate definitions, they should be provided in 1.55 @@ -1302,6 +1333,7 @@ 1.56 // Format 64-bit quantities. 1.57 #define INT64_FORMAT "%" PRId64 1.58 #define UINT64_FORMAT "%" PRIu64 1.59 +#define UINT64_FORMAT_X "%" PRIx64 1.60 #define INT64_FORMAT_W(width) "%" #width PRId64 1.61 #define UINT64_FORMAT_W(width) "%" #width PRIu64 1.62 1.63 @@ -1324,10 +1356,14 @@ 1.64 #define PTR_FORMAT "0x%08" PRIxPTR 1.65 #endif // _LP64 1.66 1.67 -#define SSIZE_FORMAT "%" PRIdPTR 1.68 -#define SIZE_FORMAT "%" PRIuPTR 1.69 -#define SSIZE_FORMAT_W(width) "%" #width PRIdPTR 1.70 -#define SIZE_FORMAT_W(width) "%" #width PRIuPTR 1.71 +#define INTPTR_FORMAT_W(width) "%" #width PRIxPTR 1.72 + 1.73 +#define SSIZE_FORMAT "%" PRIdPTR 1.74 +#define SIZE_FORMAT "%" PRIuPTR 1.75 +#define SIZE_FORMAT_HEX "0x%" PRIxPTR 1.76 +#define SSIZE_FORMAT_W(width) "%" #width PRIdPTR 1.77 +#define SIZE_FORMAT_W(width) "%" #width PRIuPTR 1.78 +#define SIZE_FORMAT_HEX_W(width) "0x%" #width PRIxPTR 1.79 1.80 #define INTX_FORMAT "%" PRIdPTR 1.81 #define UINTX_FORMAT "%" PRIuPTR 1.82 @@ -1353,7 +1389,6 @@ 1.83 return *(void**)addr; 1.84 } 1.85 1.86 - 1.87 #ifndef PRODUCT 1.88 1.89 // For unit testing only