diff options
author | Andres Freund <andres@anarazel.de> | 2015-08-05 18:19:52 +0200 |
---|---|---|
committer | Andres Freund <andres@anarazel.de> | 2015-08-05 18:19:52 +0200 |
commit | de6fd1c898f6eca82c2130a9dbb42d00da68d79e (patch) | |
tree | 2387db94ee7d19f19ec45dbfc31c3a6c3494a62c /src/backend | |
parent | a855118be3f0682a2061448db5a87dec50717af4 (diff) |
Rely on inline functions even if that causes warnings in older compilers.
So far we have worked around the fact that some very old compilers do
not support 'inline' functions by only using inline functions
conditionally (or not at all). Since such compilers are very rare by
now, we have decided to rely on inline functions from 9.6 onwards.
To avoid breaking these old compilers inline is defined away when not
supported. That'll cause "function x defined but not used" type of
warnings, but since nobody develops on such compilers anymore that's
ok.
This change in policy will allow us to more easily employ inline
functions.
I chose to remove code previously conditional on PG_USE_INLINE as it
seemed confusing to have code dependent on a define that's always
defined.
Blacklisting of compilers, like in c53f73879f, now has to be done
differently. A platform template can define PG_FORCE_DISABLE_INLINE to
force inline to be defined empty.
Discussion: 20150701161447.GB30708@awork2.anarazel.de
Diffstat (limited to 'src/backend')
-rw-r--r-- | src/backend/lib/ilist.c | 3 | ||||
-rw-r--r-- | src/backend/nodes/list.c | 3 | ||||
-rw-r--r-- | src/backend/port/atomics.c | 7 | ||||
-rw-r--r-- | src/backend/utils/adt/arrayfuncs.c | 3 | ||||
-rw-r--r-- | src/backend/utils/mmgr/mcxt.c | 3 | ||||
-rw-r--r-- | src/backend/utils/sort/sortsupport.c | 3 |
6 files changed, 0 insertions, 22 deletions
diff --git a/src/backend/lib/ilist.c b/src/backend/lib/ilist.c index 58550f77442..c26baf35f07 100644 --- a/src/backend/lib/ilist.c +++ b/src/backend/lib/ilist.c @@ -18,9 +18,6 @@ */ #include "postgres.h" -/* See ilist.h */ -#define ILIST_INCLUDE_DEFINITIONS - #include "lib/ilist.h" /* diff --git a/src/backend/nodes/list.c b/src/backend/nodes/list.c index a6737514ef1..1dce42f7b42 100644 --- a/src/backend/nodes/list.c +++ b/src/backend/nodes/list.c @@ -15,9 +15,6 @@ */ #include "postgres.h" -/* see pg_list.h */ -#define PG_LIST_INCLUDE_DEFINITIONS - #include "nodes/pg_list.h" diff --git a/src/backend/port/atomics.c b/src/backend/port/atomics.c index 439b3c18c7b..cd953f964e2 100644 --- a/src/backend/port/atomics.c +++ b/src/backend/port/atomics.c @@ -13,13 +13,6 @@ */ #include "postgres.h" -/* - * We want the functions below to be inline; but if the compiler doesn't - * support that, fall back on providing them as regular functions. See - * STATIC_IF_INLINE in c.h. - */ -#define ATOMICS_INCLUDE_DEFINITIONS - #include "miscadmin.h" #include "port/atomics.h" #include "storage/spin.h" diff --git a/src/backend/utils/adt/arrayfuncs.c b/src/backend/utils/adt/arrayfuncs.c index 42cdbc7d6e0..67c9b357c85 100644 --- a/src/backend/utils/adt/arrayfuncs.c +++ b/src/backend/utils/adt/arrayfuncs.c @@ -20,9 +20,6 @@ #endif #include <math.h> -/* See arrayaccess.h */ -#define ARRAYACCESS_INCLUDE_DEFINITIONS - #include "access/htup_details.h" #include "catalog/pg_type.h" #include "funcapi.h" diff --git a/src/backend/utils/mmgr/mcxt.c b/src/backend/utils/mmgr/mcxt.c index 34f4e7202f2..12d29f7440a 100644 --- a/src/backend/utils/mmgr/mcxt.c +++ b/src/backend/utils/mmgr/mcxt.c @@ -19,9 +19,6 @@ *------------------------------------------------------------------------- */ -/* see palloc.h. Must be before postgres.h */ -#define MCXT_INCLUDE_DEFINITIONS - #include "postgres.h" #include "miscadmin.h" diff --git a/src/backend/utils/sort/sortsupport.c b/src/backend/utils/sort/sortsupport.c index ffef9658e45..daf38c74ff5 100644 --- a/src/backend/utils/sort/sortsupport.c +++ b/src/backend/utils/sort/sortsupport.c @@ -15,9 +15,6 @@ #include "postgres.h" -/* See sortsupport.h */ -#define SORTSUPPORT_INCLUDE_DEFINITIONS - #include "access/nbtree.h" #include "fmgr.h" #include "utils/lsyscache.h" |