pgpool2.git / summary / log / commit / refs
commit bce1eaa6419dbf8737e68c65c16fce3eadfc3e97
Author: Tatsuo Ishii <ishii@sraoss.co.jp>
Date: Thu Sep 21 01:51:03 2023 +0000
Remove duplicating definition of pg_attribute_format_arg etc.
They were defined in both src/include/parser/pg_config_manual.h and
src/include/parser/pool_parser.h". Remove the definitions from
pg_config_manual.h because pool_parser.h is including such that
definitions originated in PostgreSQL's c.h.
src/include/parser/pg_config_manual.h | 9 ---------
src/include/utils/fe_ports.h | 1 +
src/include/utils/palloc.h | 3 +++
src/include/utils/psqlscan.h | 1 +
4 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/src/include/parser/pg_config_manual.h b/src/include/parser/pg_config_manual.h
index 02ba7fae0..a1b35fcb6 100644
--- a/src/include/parser/pg_config_manual.h
+++ b/src/include/parser/pg_config_manual.h
@@ -31,15 +31,6 @@
#define PG_PRINTF_ATTRIBUTE printf
#endif
-/* from postgresql/src/include/c.h */
-/* GCC and XLC support format attributes */
-#if defined(__GNUC__) || defined(__IBMC__)
-#define pg_attribute_format_arg(a) __attribute__((format_arg(a)))
-#define pg_attribute_printf(f,a) __attribute__((format(PG_PRINTF_ATTRIBUTE, f, a)))
-#else
-#define pg_attribute_format_arg(a)
-#define pg_attribute_printf(f,a)
-#endif
/*
* This is the default value for wal_segment_size to be used when initdb is run
* without the --wal-segsize option. It must be a valid segment size.
diff --git a/src/include/utils/fe_ports.h b/src/include/utils/fe_ports.h
index 8a2ad201e..ddbd462d5 100644
--- a/src/include/utils/fe_ports.h
+++ b/src/include/utils/fe_ports.h
@@ -31,6 +31,7 @@
#include <stdlib.h>
#ifndef FE_PORTS
#define FE_PORTS
+#include "parser/pool_parser.h"
#include "parser/pg_config_manual.h"
#include "pool_type.h"
diff --git a/src/include/utils/palloc.h b/src/include/utils/palloc.h
index 4b6359ca8..2ed586ed0 100644
--- a/src/include/utils/palloc.h
+++ b/src/include/utils/palloc.h
@@ -29,7 +29,10 @@
#define PALLOC_H
#include <stdarg.h>
+
#include "parser/pg_config_manual.h"
+#include "parser/pool_parser.h"
+
/*
* Type MemoryContextData is declared in nodes/memnodes.h. Most users
* of memory allocation should just treat it as an abstract type, so we
diff --git a/src/include/utils/psqlscan.h b/src/include/utils/psqlscan.h
index 6a90fcab9..e3c117749 100644
--- a/src/include/utils/psqlscan.h
+++ b/src/include/utils/psqlscan.h
@@ -20,6 +20,7 @@
#ifndef PSQLSCAN_H
#define PSQLSCAN_H
+#include "parser/pool_parser.h"
#include "pqexpbuffer.h"
[parent: 3bd6941f1930]