diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/access/amapi.h | 2 | ||||
-rw-r--r-- | src/include/access/genam.h | 4 | ||||
-rw-r--r-- | src/include/access/nbtree.h | 1 | ||||
-rw-r--r-- | src/include/c.h | 13 | ||||
-rw-r--r-- | src/include/nodes/tidbitmap.h | 1 | ||||
-rw-r--r-- | src/include/replication/reorderbuffer.h | 2 | ||||
-rw-r--r-- | src/include/utils/elog.h | 16 | ||||
-rw-r--r-- | src/include/utils/pg_locale.h | 2 |
8 files changed, 22 insertions, 19 deletions
diff --git a/src/include/access/amapi.h b/src/include/access/amapi.h index 2b4482dc1e6..63dd41c1f21 100644 --- a/src/include/access/amapi.h +++ b/src/include/access/amapi.h @@ -15,6 +15,8 @@ #include "access/cmptype.h" #include "access/genam.h" #include "access/stratnum.h" +#include "nodes/nodes.h" +#include "nodes/pg_list.h" /* * We don't wish to include planner header files here, since most of an index diff --git a/src/include/access/genam.h b/src/include/access/genam.h index ac62f6a6abd..9200a22bd9f 100644 --- a/src/include/access/genam.h +++ b/src/include/access/genam.h @@ -20,13 +20,15 @@ #include "nodes/tidbitmap.h" #include "storage/buf.h" #include "storage/lockdefs.h" -#include "utils/relcache.h" #include "utils/snapshot.h" /* We don't want this file to depend on execnodes.h. */ typedef struct IndexInfo IndexInfo; typedef struct TupleTableSlot TupleTableSlot; +/* or relcache.h */ +typedef struct RelationData *Relation; + /* * Struct for statistics maintained by amgettuple and amgetbitmap diff --git a/src/include/access/nbtree.h b/src/include/access/nbtree.h index 9ab467cb8fd..db1345f54c8 100644 --- a/src/include/access/nbtree.h +++ b/src/include/access/nbtree.h @@ -22,6 +22,7 @@ #include "catalog/pg_index.h" #include "lib/stringinfo.h" #include "storage/bufmgr.h" +#include "storage/dsm.h" #include "storage/shm_toc.h" #include "utils/skipsupport.h" diff --git a/src/include/c.h b/src/include/c.h index 7fe083c3afb..9ab5e617995 100644 --- a/src/include/c.h +++ b/src/include/c.h @@ -336,14 +336,13 @@ * compile-time integer const. We don't define this macro to return 0 when * unsupported due to the risk of users of the macro misbehaving if we return * 0 when the expression *is* an integer constant. Callers may check if this - * macro is defined by checking if HAVE_PG_BUILTIN_INTEGER_CONSTANT_P is - * defined. + * macro is defined by checking if HAVE_PG_INTEGER_CONSTANT_P is defined. */ #if defined(HAVE__BUILTIN_CONSTANT_P) -/* When __builtin_const_p() is available, use it. */ -#define pg_builtin_integer_constant_p(x) __builtin_constant_p(x) -#define HAVE_PG_BUILTIN_INTEGER_CONSTANT_P +/* When __builtin_constant_p() is available, use it. */ +#define pg_integer_constant_p(x) __builtin_constant_p(x) +#define HAVE_PG_INTEGER_CONSTANT_P #elif defined(_MSC_VER) && defined(__STDC_VERSION__) /* @@ -353,9 +352,9 @@ * and only works with integer constants. Compilation will fail if given a * constant or variable of any type other than an integer. */ -#define pg_builtin_integer_constant_p(x) \ +#define pg_integer_constant_p(x) \ _Generic((1 ? ((void *) ((x) * (uintptr_t) 0)) : &(int) {1}), int *: 1, void *: 0) -#define HAVE_PG_BUILTIN_INTEGER_CONSTANT_P +#define HAVE_PG_INTEGER_CONSTANT_P #endif /* diff --git a/src/include/nodes/tidbitmap.h b/src/include/nodes/tidbitmap.h index 99f795ceab5..f54e61c7190 100644 --- a/src/include/nodes/tidbitmap.h +++ b/src/include/nodes/tidbitmap.h @@ -22,7 +22,6 @@ #ifndef TIDBITMAP_H #define TIDBITMAP_H -#include "access/htup_details.h" #include "storage/itemptr.h" #include "utils/dsa.h" diff --git a/src/include/replication/reorderbuffer.h b/src/include/replication/reorderbuffer.h index fa0745552f8..91dc7e5e448 100644 --- a/src/include/replication/reorderbuffer.h +++ b/src/include/replication/reorderbuffer.h @@ -359,7 +359,7 @@ typedef struct ReorderBufferTXN TimestampTz commit_time; TimestampTz prepare_time; TimestampTz abort_time; - } xact_time; + }; /* * The base snapshot is used to decode all changes until either this diff --git a/src/include/utils/elog.h b/src/include/utils/elog.h index b4945eb7ee0..348dafbf906 100644 --- a/src/include/utils/elog.h +++ b/src/include/utils/elog.h @@ -119,11 +119,11 @@ struct Node; * ereport_domain() directly, or preferably they can override the TEXTDOMAIN * macro. * - * When pg_builtin_integer_constant_p is available and elevel >= ERROR we make + * When pg_integer_constant_p is available and elevel >= ERROR we make * a call to errstart_cold() instead of errstart(). This version of the * function is marked with pg_attribute_cold which will coax supporting * compilers into generating code which is more optimized towards non-ERROR - * cases. Because we use pg_builtin_integer_constant_p() in the condition, + * cases. Because we use pg_integer_constant_p() in the condition, * when elevel is not a compile-time constant, or if it is, but it's < ERROR, * the compiler has no need to generate any code for this branch. It can * simply call errstart() unconditionally. @@ -131,25 +131,25 @@ struct Node; * If elevel >= ERROR, the call will not return; we try to inform the compiler * of that via pg_unreachable(). However, no useful optimization effect is * obtained unless the compiler sees elevel as a compile-time constant, else - * we're just adding code bloat. So, if pg_builtin_integer_constant_p is + * we're just adding code bloat. So, if pg_integer_constant_p is * available, use that to cause the second if() to vanish completely for * non-constant cases. We avoid using a local variable because it's not * necessary and prevents gcc from making the unreachability deduction at * optlevel -O0. *---------- */ -#ifdef HAVE_PG_BUILTIN_INTEGER_CONSTANT_P +#ifdef HAVE_PG_INTEGER_CONSTANT_P #define ereport_domain(elevel, domain, ...) \ do { \ pg_prevent_errno_in_scope(); \ - if (pg_builtin_integer_constant_p(elevel) && (elevel) >= ERROR ? \ + if (pg_integer_constant_p(elevel) && (elevel) >= ERROR ? \ errstart_cold(elevel, domain) : \ errstart(elevel, domain)) \ __VA_ARGS__, errfinish(__FILE__, __LINE__, __func__); \ - if (pg_builtin_integer_constant_p(elevel) && (elevel) >= ERROR) \ + if (pg_integer_constant_p(elevel) && (elevel) >= ERROR) \ pg_unreachable(); \ } while(0) -#else /* !HAVE_PG_BUILTIN_INTEGER_CONSTANT_P */ +#else /* !HAVE_PG_INTEGER_CONSTANT_P */ #define ereport_domain(elevel, domain, ...) \ do { \ const int elevel_ = (elevel); \ @@ -159,7 +159,7 @@ struct Node; if (elevel_ >= ERROR) \ pg_unreachable(); \ } while(0) -#endif /* HAVE_PG_BUILTIN_INTEGER_CONSTANT_P */ +#endif /* HAVE_PG_INTEGER_CONSTANT_P */ #define ereport(elevel, ...) \ ereport_domain(elevel, TEXTDOMAIN, __VA_ARGS__) diff --git a/src/include/utils/pg_locale.h b/src/include/utils/pg_locale.h index 2b072cafb4d..7e83594fbaf 100644 --- a/src/include/utils/pg_locale.h +++ b/src/include/utils/pg_locale.h @@ -171,7 +171,7 @@ struct pg_locale_struct UCollator *ucol; } icu; #endif - } info; + }; }; extern void init_database_collation(void); |