--- a/hotspot/src/share/vm/utilities/globalDefinitions.hpp Fri May 09 08:34:22 2014 -0700
+++ b/hotspot/src/share/vm/utilities/globalDefinitions.hpp Fri May 09 16:50:54 2014 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -42,6 +42,32 @@
# include "utilities/globalDefinitions_xlc.hpp"
#endif
+#ifndef PRAGMA_DIAG_PUSH
+#define PRAGMA_DIAG_PUSH
+#endif
+#ifndef PRAGMA_DIAG_POP
+#define PRAGMA_DIAG_POP
+#endif
+#ifndef PRAGMA_FORMAT_NONLITERAL_IGNORED
+#define PRAGMA_FORMAT_NONLITERAL_IGNORED
+#endif
+#ifndef PRAGMA_FORMAT_IGNORED
+#define PRAGMA_FORMAT_IGNORED
+#endif
+#ifndef PRAGMA_FORMAT_NONLITERAL_IGNORED_INTERNAL
+#define PRAGMA_FORMAT_NONLITERAL_IGNORED_INTERNAL
+#endif
+#ifndef PRAGMA_FORMAT_NONLITERAL_IGNORED_EXTERNAL
+#define PRAGMA_FORMAT_NONLITERAL_IGNORED_EXTERNAL
+#endif
+#ifndef PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
+#define PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
+#endif
+#ifndef ATTRIBUTE_PRINTF
+#define ATTRIBUTE_PRINTF(fmt, vargs)
+#endif
+
+
#include "utilities/macros.hpp"
// This file holds all globally used constants & types, class (forward)
@@ -1284,6 +1310,11 @@
return ((int)((unsigned int)high << 16) | (unsigned int)low);
}
+// Convert pointer to intptr_t, for use in printing pointers.
+inline intptr_t p2i(const void * p) {
+ return (intptr_t) p;
+}
+
// Printf-style formatters for fixed- and variable-width types as pointers and
// integers. These are derived from the definitions in inttypes.h. If the platform
// doesn't provide appropriate definitions, they should be provided in
@@ -1302,6 +1333,7 @@
// Format 64-bit quantities.
#define INT64_FORMAT "%" PRId64
#define UINT64_FORMAT "%" PRIu64
+#define UINT64_FORMAT_X "%" PRIx64
#define INT64_FORMAT_W(width) "%" #width PRId64
#define UINT64_FORMAT_W(width) "%" #width PRIu64
@@ -1324,6 +1356,8 @@
#define PTR_FORMAT "0x%08" PRIxPTR
#endif // _LP64
+#define INTPTR_FORMAT_W(width) "%" #width PRIxPTR
+
#define SSIZE_FORMAT "%" PRIdPTR
#define SIZE_FORMAT "%" PRIuPTR
#define SIZE_FORMAT_HEX "0x%" PRIxPTR
@@ -1355,7 +1389,6 @@
return *(void**)addr;
}
-
#ifndef PRODUCT
// For unit testing only