diff options
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/nodes/nodes.h | 8 | ||||
| -rw-r--r-- | src/include/optimizer/tlist.h | 4 | ||||
| -rw-r--r-- | src/include/pg_config.h.in | 6 | ||||
| -rw-r--r-- | src/include/pg_config.h.win32 | 6 |
4 files changed, 21 insertions, 3 deletions
diff --git a/src/include/nodes/nodes.h b/src/include/nodes/nodes.h index b9369ac2754..963ce45ae33 100644 --- a/src/include/nodes/nodes.h +++ b/src/include/nodes/nodes.h @@ -610,7 +610,13 @@ extern int16 *readAttrNumberCols(int numCols); /* * nodes/copyfuncs.c */ -extern void *copyObject(const void *obj); +extern void *copyObjectImpl(const void *obj); +/* cast result back to argument type, if supported by compiler */ +#ifdef HAVE_TYPEOF +#define copyObject(obj) ((typeof(obj)) copyObjectImpl(obj)) +#else +#define copyObject(obj) copyObjectImpl(obj) +#endif /* * nodes/equalfuncs.c diff --git a/src/include/optimizer/tlist.h b/src/include/optimizer/tlist.h index 976024a1647..ccb93d8c802 100644 --- a/src/include/optimizer/tlist.h +++ b/src/include/optimizer/tlist.h @@ -17,8 +17,8 @@ #include "nodes/relation.h" -extern TargetEntry *tlist_member(Node *node, List *targetlist); -extern TargetEntry *tlist_member_ignore_relabel(Node *node, List *targetlist); +extern TargetEntry *tlist_member(Expr *node, List *targetlist); +extern TargetEntry *tlist_member_ignore_relabel(Expr *node, List *targetlist); extern List *add_to_flat_tlist(List *tlist, List *exprs); diff --git a/src/include/pg_config.h.in b/src/include/pg_config.h.in index e1c1c9e9b47..03e980328bd 100644 --- a/src/include/pg_config.h.in +++ b/src/include/pg_config.h.in @@ -603,6 +603,9 @@ /* Define to 1 if you have the `towlower' function. */ #undef HAVE_TOWLOWER +/* Define to 1 if your compiler understands `typeof' or something similar. */ +#undef HAVE_TYPEOF + /* Define to 1 if you have the external array `tzname'. */ #undef HAVE_TZNAME @@ -931,6 +934,9 @@ /* Define to empty if the C compiler does not understand signed types. */ #undef signed +/* Define to how the compiler spells `typeof'. */ +#undef typeof + /* Define to the type of an unsigned integer type wide enough to hold a pointer, if such a type exists, and if the system does not define it. */ #undef uintptr_t diff --git a/src/include/pg_config.h.win32 b/src/include/pg_config.h.win32 index 5af8369202c..9293ddd3a50 100644 --- a/src/include/pg_config.h.win32 +++ b/src/include/pg_config.h.win32 @@ -454,6 +454,9 @@ /* Define to 1 if you have the `towlower' function. */ #define HAVE_TOWLOWER 1 +/* Define to 1 if your compiler understands `typeof' or something similar. */ +#define HAVE_TYPEOF 1 + /* Define to 1 if you have the external array `tzname'. */ /* #undef HAVE_TZNAME */ @@ -682,3 +685,6 @@ /* Define to empty if the C compiler does not understand signed types. */ /* #undef signed */ + +/* Define to how the compiler spells `typeof'. */ +#define typeof decltype |
