* XLC: https://www.ibm.com/support/knowledgecenter/SSGH2K_13.1.2/com.ibm.xlc131.aix.doc/language_ref/type_attrib.html
*/
+/*
+ * For compilers which don't support __has_attribute, we just define
+ * __has_attribute(x) to 0 so that we can define macros for various
+ * __attribute__s more easily below.
+ */
+#ifndef __has_attribute
+#define __has_attribute(attribute) 0
+#endif
+
/* only GCC supports the unused attribute */
#ifdef __GNUC__
#define pg_attribute_unused() __attribute__((unused))
* Marking certain functions as "hot" or "cold" can be useful to assist the
* compiler in arranging the assembly code in a more efficient way.
*/
-#if defined(__has_attribute)
-
#if __has_attribute (cold)
#define pg_attribute_cold __attribute__((cold))
#else
#define pg_attribute_hot
#endif
-#else
-#define pg_attribute_hot
-#define pg_attribute_cold
-#endif
-
/*
* Mark a point as unreachable in a portable fashion. This should preferably
* be something that the compiler understands, to aid code generation.
extern bool message_level_is_interesting(int elevel);
extern bool errstart(int elevel, const char *domain);
-extern bool pg_attribute_cold errstart_cold(int elevel, const char *domain);
+extern pg_attribute_cold bool errstart_cold(int elevel, const char *domain);
extern void errfinish(const char *filename, int lineno, const char *funcname);
extern int errcode(int sqlerrcode);