mirror of
https://git.osgeo.org/gitea/postgis/postgis
synced 2024-10-25 01:22:47 +00:00
Move some PostgreSQL compatibility macros from lwgeom_pg.h into pgsql_compat.h which is their proper home
git-svn-id: http://svn.osgeo.org/postgis/trunk@2816 b70326c6-7e19-0410-871a-916f4a2858ee
This commit is contained in:
parent
ffde636dc0
commit
2a63450b84
|
@ -8,14 +8,6 @@
|
|||
#include "liblwgeom.h"
|
||||
#include "pgsql_compat.h"
|
||||
|
||||
#ifndef PG_NARGS
|
||||
#define PG_NARGS() (fcinfo->nargs)
|
||||
#endif
|
||||
|
||||
#if POSTGIS_PGSQL_VERSION < 82
|
||||
#define ARR_OVERHEAD_NONULLS(x) ARR_OVERHEAD((x))
|
||||
#endif
|
||||
|
||||
void *pg_alloc(size_t size);
|
||||
void *pg_realloc(void *ptr, size_t size);
|
||||
void pg_free(void *ptr);
|
||||
|
|
|
@ -1,5 +1,15 @@
|
|||
#ifndef _PGSQL_COMPAT_H
|
||||
|
||||
/* Make sure PG_NARGS is defined for older PostgreSQL versions */
|
||||
#ifndef PG_NARGS
|
||||
#define PG_NARGS() (fcinfo->nargs)
|
||||
#endif
|
||||
|
||||
/* Define ARR_OVERHEAD_NONULLS for PostgreSQL < 8.2 */
|
||||
#if POSTGIS_PGSQL_VERSION < 82
|
||||
#define ARR_OVERHEAD_NONULLS(x) ARR_OVERHEAD((x))
|
||||
#endif
|
||||
|
||||
/* PostgreSQL < 8.3 uses VARATT_SIZEP rather than SET_VARSIZE for varlena types */
|
||||
#if POSTGIS_PGSQL_VERSION < 83
|
||||
#define SET_VARSIZE(var, size) VARATT_SIZEP(var) = size
|
||||
|
|
Loading…
Reference in a new issue