Remove duplicating definition of pg_attribute_format_arg etc.
authorTatsuo Ishii <ishii@sraoss.co.jp>
Thu, 21 Sep 2023 01:51:03 +0000 (10:51 +0900)
committerTatsuo Ishii <ishii@sraoss.co.jp>
Thu, 21 Sep 2023 01:51:03 +0000 (10:51 +0900)
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
src/include/utils/fe_ports.h
src/include/utils/palloc.h
src/include/utils/psqlscan.h

index 02ba7fae03025b5070a700d0afd5d767f778c937..a1b35fcb62076eb3ff0e14e3f52c69710d382d91 100644 (file)
 #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.
index 8a2ad201e7b196ae603dcf32f56f7ef6513af3d6..ddbd462d58f54fe7e4616fe8c97fc3d1b6f6f548 100644 (file)
@@ -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"
 
index 4b6359ca865d7a7b683d90f946cb6709d1cfd354..2ed586ed0f714708069e60142bb4354966b201eb 100644 (file)
 #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
index 6a90fcab9ebe5e1fec71f3778a34175bf1abc9fd..e3c117749281f5b1a7c5dae8ab48f5032ab50f5e 100644 (file)
@@ -20,6 +20,7 @@
 #ifndef PSQLSCAN_H
 #define PSQLSCAN_H
 
+#include "parser/pool_parser.h"
 #include "pqexpbuffer.h"