summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane2018-12-01 21:34:00 +0000
committerTom Lane2018-12-01 21:34:00 +0000
commit3295f82022ff0da95c96d8ca763e1d8902345466 (patch)
treebc3ce9d11b1fd3d90e278d6c0ed91ff3add530e6
parent2d34ad84303181111c6f0747186857ff50106267 (diff)
Rename ecpg's various "extern.h" files to have distinct names.
This should reduce confusion, and in particular make it safe to copy typename.c into preproc/ and compile it there. This doesn't affect anything outside ecpg, and particularly not end users, because these files don't get installed; they just exist to share declarations among the .c files of each subdirectory. Discussion: https://postgr.es/m/[email protected]
-rw-r--r--src/interfaces/ecpg/ecpglib/connect.c2
-rw-r--r--src/interfaces/ecpg/ecpglib/data.c2
-rw-r--r--src/interfaces/ecpg/ecpglib/descriptor.c2
-rw-r--r--src/interfaces/ecpg/ecpglib/ecpglib_extern.h (renamed from src/interfaces/ecpg/ecpglib/extern.h)8
-rw-r--r--src/interfaces/ecpg/ecpglib/error.c2
-rw-r--r--src/interfaces/ecpg/ecpglib/execute.c2
-rw-r--r--src/interfaces/ecpg/ecpglib/memory.c2
-rw-r--r--src/interfaces/ecpg/ecpglib/misc.c2
-rw-r--r--src/interfaces/ecpg/ecpglib/prepare.c2
-rw-r--r--src/interfaces/ecpg/ecpglib/sqlda.c2
-rw-r--r--src/interfaces/ecpg/ecpglib/typename.c2
-rw-r--r--src/interfaces/ecpg/pgtypeslib/common.c2
-rw-r--r--src/interfaces/ecpg/pgtypeslib/datetime.c2
-rw-r--r--src/interfaces/ecpg/pgtypeslib/dt_common.c2
-rw-r--r--src/interfaces/ecpg/pgtypeslib/interval.c2
-rw-r--r--src/interfaces/ecpg/pgtypeslib/numeric.c2
-rw-r--r--src/interfaces/ecpg/pgtypeslib/pgtypeslib_extern.h (renamed from src/interfaces/ecpg/pgtypeslib/extern.h)8
-rw-r--r--src/interfaces/ecpg/pgtypeslib/timestamp.c2
-rw-r--r--src/interfaces/ecpg/preproc/c_keywords.c2
-rw-r--r--src/interfaces/ecpg/preproc/descriptor.c2
-rw-r--r--src/interfaces/ecpg/preproc/ecpg.c2
-rw-r--r--src/interfaces/ecpg/preproc/ecpg.header2
-rw-r--r--src/interfaces/ecpg/preproc/ecpg_keywords.c2
-rw-r--r--src/interfaces/ecpg/preproc/keywords.c2
-rw-r--r--src/interfaces/ecpg/preproc/output.c2
-rw-r--r--src/interfaces/ecpg/preproc/parser.c2
-rw-r--r--src/interfaces/ecpg/preproc/pgc.l2
-rw-r--r--src/interfaces/ecpg/preproc/preproc_extern.h (renamed from src/interfaces/ecpg/preproc/extern.h)3
-rw-r--r--src/interfaces/ecpg/preproc/type.c2
-rw-r--r--src/interfaces/ecpg/preproc/variable.c2
30 files changed, 36 insertions, 37 deletions
diff --git a/src/interfaces/ecpg/ecpglib/connect.c b/src/interfaces/ecpg/ecpglib/connect.c
index 71fa275363..5f8455020e 100644
--- a/src/interfaces/ecpg/ecpglib/connect.c
+++ b/src/interfaces/ecpg/ecpglib/connect.c
@@ -7,7 +7,7 @@
#include "ecpgtype.h"
#include "ecpglib.h"
#include "ecpgerrno.h"
-#include "extern.h"
+#include "ecpglib_extern.h"
#include "sqlca.h"
#ifdef ENABLE_THREAD_SAFETY
diff --git a/src/interfaces/ecpg/ecpglib/data.c b/src/interfaces/ecpg/ecpglib/data.c
index f3d326a50b..424b5ae5d5 100644
--- a/src/interfaces/ecpg/ecpglib/data.c
+++ b/src/interfaces/ecpg/ecpglib/data.c
@@ -8,7 +8,7 @@
#include "ecpgtype.h"
#include "ecpglib.h"
#include "ecpgerrno.h"
-#include "extern.h"
+#include "ecpglib_extern.h"
#include "sqlca.h"
#include "pgtypes_numeric.h"
#include "pgtypes_date.h"
diff --git a/src/interfaces/ecpg/ecpglib/descriptor.c b/src/interfaces/ecpg/ecpglib/descriptor.c
index 8fdf5606c0..186f92cc3e 100644
--- a/src/interfaces/ecpg/ecpglib/descriptor.c
+++ b/src/interfaces/ecpg/ecpglib/descriptor.c
@@ -12,7 +12,7 @@
#include "ecpgtype.h"
#include "ecpglib.h"
#include "ecpgerrno.h"
-#include "extern.h"
+#include "ecpglib_extern.h"
#include "sqlca.h"
#include "sqlda.h"
#include "sql3types.h"
diff --git a/src/interfaces/ecpg/ecpglib/extern.h b/src/interfaces/ecpg/ecpglib/ecpglib_extern.h
index a88f34106c..1c9bce1456 100644
--- a/src/interfaces/ecpg/ecpglib/extern.h
+++ b/src/interfaces/ecpg/ecpglib/ecpglib_extern.h
@@ -1,7 +1,7 @@
-/* src/interfaces/ecpg/ecpglib/extern.h */
+/* src/interfaces/ecpg/ecpglib/ecpglib_extern.h */
-#ifndef _ECPG_LIB_EXTERN_H
-#define _ECPG_LIB_EXTERN_H
+#ifndef _ECPG_ECPGLIB_EXTERN_H
+#define _ECPG_ECPGLIB_EXTERN_H
#include "libpq-fe.h"
#include "sqlca.h"
@@ -221,4 +221,4 @@ void ecpg_set_native_sqlda(int, struct sqlda_struct **, const PGresult *, int,
#define ECPG_SQLSTATE_ECPG_INTERNAL_ERROR "YE000"
#define ECPG_SQLSTATE_ECPG_OUT_OF_MEMORY "YE001"
-#endif /* _ECPG_LIB_EXTERN_H */
+#endif /* _ECPG_ECPGLIB_EXTERN_H */
diff --git a/src/interfaces/ecpg/ecpglib/error.c b/src/interfaces/ecpg/ecpglib/error.c
index f34ae4afb8..9c56991a1e 100644
--- a/src/interfaces/ecpg/ecpglib/error.c
+++ b/src/interfaces/ecpg/ecpglib/error.c
@@ -6,7 +6,7 @@
#include "ecpgerrno.h"
#include "ecpgtype.h"
#include "ecpglib.h"
-#include "extern.h"
+#include "ecpglib_extern.h"
#include "sqlca.h"
void
diff --git a/src/interfaces/ecpg/ecpglib/execute.c b/src/interfaces/ecpg/ecpglib/execute.c
index 42640ba9be..3f5034e792 100644
--- a/src/interfaces/ecpg/ecpglib/execute.c
+++ b/src/interfaces/ecpg/ecpglib/execute.c
@@ -23,7 +23,7 @@
#include "ecpgtype.h"
#include "ecpglib.h"
#include "ecpgerrno.h"
-#include "extern.h"
+#include "ecpglib_extern.h"
#include "sqlca.h"
#include "sqlda-native.h"
#include "sqlda-compat.h"
diff --git a/src/interfaces/ecpg/ecpglib/memory.c b/src/interfaces/ecpg/ecpglib/memory.c
index dc548a4cda..52ca1c5c68 100644
--- a/src/interfaces/ecpg/ecpglib/memory.c
+++ b/src/interfaces/ecpg/ecpglib/memory.c
@@ -7,7 +7,7 @@
#include "ecpgtype.h"
#include "ecpglib.h"
#include "ecpgerrno.h"
-#include "extern.h"
+#include "ecpglib_extern.h"
void
ecpg_free(void *ptr)
diff --git a/src/interfaces/ecpg/ecpglib/misc.c b/src/interfaces/ecpg/ecpglib/misc.c
index be9cac6e7b..a26dfdb361 100644
--- a/src/interfaces/ecpg/ecpglib/misc.c
+++ b/src/interfaces/ecpg/ecpglib/misc.c
@@ -9,7 +9,7 @@
#include "ecpgtype.h"
#include "ecpglib.h"
#include "ecpgerrno.h"
-#include "extern.h"
+#include "ecpglib_extern.h"
#include "sqlca.h"
#include "pgtypes_numeric.h"
#include "pgtypes_date.h"
diff --git a/src/interfaces/ecpg/ecpglib/prepare.c b/src/interfaces/ecpg/ecpglib/prepare.c
index 5368886f67..2dd56b02df 100644
--- a/src/interfaces/ecpg/ecpglib/prepare.c
+++ b/src/interfaces/ecpg/ecpglib/prepare.c
@@ -8,7 +8,7 @@
#include "ecpgtype.h"
#include "ecpglib.h"
#include "ecpgerrno.h"
-#include "extern.h"
+#include "ecpglib_extern.h"
#include "sqlca.h"
#define STMTID_SIZE 32
diff --git a/src/interfaces/ecpg/ecpglib/sqlda.c b/src/interfaces/ecpg/ecpglib/sqlda.c
index 80ddc6b6b1..3fb0d829d3 100644
--- a/src/interfaces/ecpg/ecpglib/sqlda.c
+++ b/src/interfaces/ecpg/ecpglib/sqlda.c
@@ -16,7 +16,7 @@
#include "ecpgtype.h"
#include "ecpglib.h"
#include "ecpgerrno.h"
-#include "extern.h"
+#include "ecpglib_extern.h"
#include "sqlca.h"
#include "sqlda-native.h"
#include "sqlda-compat.h"
diff --git a/src/interfaces/ecpg/ecpglib/typename.c b/src/interfaces/ecpg/ecpglib/typename.c
index 9da1cdf4c2..a3f281752b 100644
--- a/src/interfaces/ecpg/ecpglib/typename.c
+++ b/src/interfaces/ecpg/ecpglib/typename.c
@@ -7,7 +7,7 @@
#include "ecpgtype.h"
#include "ecpglib.h"
-#include "extern.h"
+#include "ecpglib_extern.h"
#include "sqltypes.h"
#include "sql3types.h"
diff --git a/src/interfaces/ecpg/pgtypeslib/common.c b/src/interfaces/ecpg/pgtypeslib/common.c
index a8a7e02be0..abcf7f5dbe 100644
--- a/src/interfaces/ecpg/pgtypeslib/common.c
+++ b/src/interfaces/ecpg/pgtypeslib/common.c
@@ -2,7 +2,7 @@
#include "postgres_fe.h"
-#include "extern.h"
+#include "pgtypeslib_extern.h"
#include "pgtypes.h"
/* Return value is zero-filled. */
diff --git a/src/interfaces/ecpg/pgtypeslib/datetime.c b/src/interfaces/ecpg/pgtypeslib/datetime.c
index ed321febf2..53fcd2157f 100644
--- a/src/interfaces/ecpg/pgtypeslib/datetime.c
+++ b/src/interfaces/ecpg/pgtypeslib/datetime.c
@@ -6,7 +6,7 @@
#include <ctype.h>
#include <limits.h>
-#include "extern.h"
+#include "pgtypeslib_extern.h"
#include "dt.h"
#include "pgtypes_error.h"
#include "pgtypes_date.h"
diff --git a/src/interfaces/ecpg/pgtypeslib/dt_common.c b/src/interfaces/ecpg/pgtypeslib/dt_common.c
index ba4dd3a924..f5aed794fd 100644
--- a/src/interfaces/ecpg/pgtypeslib/dt_common.c
+++ b/src/interfaces/ecpg/pgtypeslib/dt_common.c
@@ -6,7 +6,7 @@
#include <ctype.h>
#include <math.h>
-#include "extern.h"
+#include "pgtypeslib_extern.h"
#include "dt.h"
#include "pgtypes_timestamp.h"
diff --git a/src/interfaces/ecpg/pgtypeslib/interval.c b/src/interfaces/ecpg/pgtypeslib/interval.c
index 4fdbcd01cc..3ff8a1025a 100644
--- a/src/interfaces/ecpg/pgtypeslib/interval.c
+++ b/src/interfaces/ecpg/pgtypeslib/interval.c
@@ -11,7 +11,7 @@
#include "common/string.h"
-#include "extern.h"
+#include "pgtypeslib_extern.h"
#include "dt.h"
#include "pgtypes_error.h"
#include "pgtypes_interval.h"
diff --git a/src/interfaces/ecpg/pgtypeslib/numeric.c b/src/interfaces/ecpg/pgtypeslib/numeric.c
index 6643242ab1..22088bae8e 100644
--- a/src/interfaces/ecpg/pgtypeslib/numeric.c
+++ b/src/interfaces/ecpg/pgtypeslib/numeric.c
@@ -5,7 +5,7 @@
#include <float.h>
#include <limits.h>
-#include "extern.h"
+#include "pgtypeslib_extern.h"
#include "pgtypes_error.h"
#define Max(x, y) ((x) > (y) ? (x) : (y))
diff --git a/src/interfaces/ecpg/pgtypeslib/extern.h b/src/interfaces/ecpg/pgtypeslib/pgtypeslib_extern.h
index 9df800ea1d..7e7626a3cc 100644
--- a/src/interfaces/ecpg/pgtypeslib/extern.h
+++ b/src/interfaces/ecpg/pgtypeslib/pgtypeslib_extern.h
@@ -1,7 +1,7 @@
-/* src/interfaces/ecpg/pgtypeslib/extern.h */
+/* src/interfaces/ecpg/pgtypeslib/pgtypeslib_extern.h */
-#ifndef __PGTYPES_COMMON_H__
-#define __PGTYPES_COMMON_H__
+#ifndef _ECPG_PGTYPESLIB_EXTERN_H
+#define _ECPG_PGTYPESLIB_EXTERN_H
#include "pgtypes_error.h"
@@ -50,4 +50,4 @@ char *pgtypes_strdup(const char *);
#define TRUE 1
#endif /* TRUE */
-#endif /* __PGTYPES_COMMON_H__ */
+#endif /* _ECPG_PGTYPESLIB_EXTERN_H */
diff --git a/src/interfaces/ecpg/pgtypeslib/timestamp.c b/src/interfaces/ecpg/pgtypeslib/timestamp.c
index 4cd4fe2da2..a7e0fe66f0 100644
--- a/src/interfaces/ecpg/pgtypeslib/timestamp.c
+++ b/src/interfaces/ecpg/pgtypeslib/timestamp.c
@@ -11,7 +11,7 @@
#error -ffast-math is known to break this code
#endif
-#include "extern.h"
+#include "pgtypeslib_extern.h"
#include "dt.h"
#include "pgtypes_timestamp.h"
#include "pgtypes_date.h"
diff --git a/src/interfaces/ecpg/preproc/c_keywords.c b/src/interfaces/ecpg/preproc/c_keywords.c
index 06bf039099..c367dbfc20 100644
--- a/src/interfaces/ecpg/preproc/c_keywords.c
+++ b/src/interfaces/ecpg/preproc/c_keywords.c
@@ -11,7 +11,7 @@
#include <ctype.h>
-#include "extern.h"
+#include "preproc_extern.h"
#include "preproc.h"
/*
diff --git a/src/interfaces/ecpg/preproc/descriptor.c b/src/interfaces/ecpg/preproc/descriptor.c
index 729f063f62..a29f530327 100644
--- a/src/interfaces/ecpg/preproc/descriptor.c
+++ b/src/interfaces/ecpg/preproc/descriptor.c
@@ -9,7 +9,7 @@
#include "postgres_fe.h"
-#include "extern.h"
+#include "preproc_extern.h"
/*
* assignment handling function (descriptor)
diff --git a/src/interfaces/ecpg/preproc/ecpg.c b/src/interfaces/ecpg/preproc/ecpg.c
index f39bf697d6..86b3e30191 100644
--- a/src/interfaces/ecpg/preproc/ecpg.c
+++ b/src/interfaces/ecpg/preproc/ecpg.c
@@ -9,7 +9,7 @@
#include "getopt_long.h"
-#include "extern.h"
+#include "preproc_extern.h"
int ret_value = 0;
bool autocommit = false,
diff --git a/src/interfaces/ecpg/preproc/ecpg.header b/src/interfaces/ecpg/preproc/ecpg.header
index 8921bcbeae..00143a7934 100644
--- a/src/interfaces/ecpg/preproc/ecpg.header
+++ b/src/interfaces/ecpg/preproc/ecpg.header
@@ -4,7 +4,7 @@
%{
#include "postgres_fe.h"
-#include "extern.h"
+#include "preproc_extern.h"
#include "ecpg_config.h"
#include <unistd.h>
diff --git a/src/interfaces/ecpg/preproc/ecpg_keywords.c b/src/interfaces/ecpg/preproc/ecpg_keywords.c
index 848b2d4849..37c97e162d 100644
--- a/src/interfaces/ecpg/preproc/ecpg_keywords.c
+++ b/src/interfaces/ecpg/preproc/ecpg_keywords.c
@@ -13,7 +13,7 @@
#include <ctype.h>
-#include "extern.h"
+#include "preproc_extern.h"
#include "preproc.h"
/*
diff --git a/src/interfaces/ecpg/preproc/keywords.c b/src/interfaces/ecpg/preproc/keywords.c
index 21e1f928fd..c0ed492d41 100644
--- a/src/interfaces/ecpg/preproc/keywords.c
+++ b/src/interfaces/ecpg/preproc/keywords.c
@@ -27,7 +27,7 @@
#include "common/keywords.h"
-#include "extern.h"
+#include "preproc_extern.h"
#include "preproc.h"
diff --git a/src/interfaces/ecpg/preproc/output.c b/src/interfaces/ecpg/preproc/output.c
index 0465857eb6..cdfa52608c 100644
--- a/src/interfaces/ecpg/preproc/output.c
+++ b/src/interfaces/ecpg/preproc/output.c
@@ -2,7 +2,7 @@
#include "postgres_fe.h"
-#include "extern.h"
+#include "preproc_extern.h"
static void output_escaped_str(char *cmd, bool quoted);
diff --git a/src/interfaces/ecpg/preproc/parser.c b/src/interfaces/ecpg/preproc/parser.c
index e5a8f9d170..0e60407564 100644
--- a/src/interfaces/ecpg/preproc/parser.c
+++ b/src/interfaces/ecpg/preproc/parser.c
@@ -18,7 +18,7 @@
#include "postgres_fe.h"
-#include "extern.h"
+#include "preproc_extern.h"
#include "preproc.h"
diff --git a/src/interfaces/ecpg/preproc/pgc.l b/src/interfaces/ecpg/preproc/pgc.l
index 5e90e35bd2..468ccbe2b4 100644
--- a/src/interfaces/ecpg/preproc/pgc.l
+++ b/src/interfaces/ecpg/preproc/pgc.l
@@ -22,7 +22,7 @@
#include "common/string.h"
-#include "extern.h"
+#include "preproc_extern.h"
#include "preproc.h"
}
diff --git a/src/interfaces/ecpg/preproc/extern.h b/src/interfaces/ecpg/preproc/preproc_extern.h
index aef65657da..13eda670ff 100644
--- a/src/interfaces/ecpg/preproc/extern.h
+++ b/src/interfaces/ecpg/preproc/preproc_extern.h
@@ -1,4 +1,4 @@
-/* src/interfaces/ecpg/preproc/extern.h */
+/* src/interfaces/ecpg/preproc/preproc_extern.h */
#ifndef _ECPG_PREPROC_EXTERN_H
#define _ECPG_PREPROC_EXTERN_H
@@ -7,7 +7,6 @@
#include "common/keywords.h"
-#include <errno.h>
#ifndef CHAR_BIT
#include <limits.h>
#endif
diff --git a/src/interfaces/ecpg/preproc/type.c b/src/interfaces/ecpg/preproc/type.c
index 253873dd4e..40ce3fb522 100644
--- a/src/interfaces/ecpg/preproc/type.c
+++ b/src/interfaces/ecpg/preproc/type.c
@@ -2,7 +2,7 @@
#include "postgres_fe.h"
-#include "extern.h"
+#include "preproc_extern.h"
#define indicator_set ind_type != NULL && ind_type->type != ECPGt_NO_INDICATOR
diff --git a/src/interfaces/ecpg/preproc/variable.c b/src/interfaces/ecpg/preproc/variable.c
index 39bf3b2474..a953498c1c 100644
--- a/src/interfaces/ecpg/preproc/variable.c
+++ b/src/interfaces/ecpg/preproc/variable.c
@@ -2,7 +2,7 @@
#include "postgres_fe.h"
-#include "extern.h"
+#include "preproc_extern.h"
static struct variable *allvariables = NULL;