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 71fa2753638..5f8455020e5 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 f3d326a50b1..424b5ae5d54 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 8fdf5606c09..186f92cc3ed 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 a88f34106cc..1c9bce1456d 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 f34ae4afb83..9c56991a1e8 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 42640ba9be1..3f5034e7924 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 dc548a4cdab..52ca1c5c687 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 be9cac6e7b4..a26dfdb361f 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 5368886f67b..2dd56b02df5 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 80ddc6b6b13..3fb0d829d37 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 9da1cdf4c23..a3f281752b2 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 a8a7e02be03..abcf7f5dbef 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 ed321febf2b..53fcd2157fa 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 ba4dd3a9240..f5aed794fda 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 4fdbcd01cc7..3ff8a1025a3 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 6643242ab19..22088bae8e4 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 9df800ea1d5..7e7626a3cc1 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 4cd4fe2da28..a7e0fe66f08 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 06bf0390994..c367dbfc207 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 729f063f62e..a29f5303273 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 f39bf697d64..86b3e301913 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 8921bcbeaec..00143a7934a 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 848b2d48493..37c97e162d7 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 21e1f928fd6..c0ed492d414 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 0465857eb6e..cdfa52608c4 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 e5a8f9d170e..0e60407564e 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 5e90e35bd2b..468ccbe2b43 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 aef65657da2..13eda670ffe 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 253873dd4ef..40ce3fb5228 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 39bf3b2474e..a953498c1c9 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;