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/31364.1543511708@sss.pgh.pa.us
This commit is contained in:
Tom Lane 2018-12-01 16:34:00 -05:00
parent 2d34ad8430
commit 3295f82022
30 changed files with 36 additions and 37 deletions

View File

@ -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

View File

@ -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"

View File

@ -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"

View File

@ -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 */

View File

@ -6,7 +6,7 @@
#include "ecpgerrno.h"
#include "ecpgtype.h"
#include "ecpglib.h"
#include "extern.h"
#include "ecpglib_extern.h"
#include "sqlca.h"
void

View File

@ -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"

View File

@ -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)

View File

@ -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"

View File

@ -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

View File

@ -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"

View File

@ -7,7 +7,7 @@
#include "ecpgtype.h"
#include "ecpglib.h"
#include "extern.h"
#include "ecpglib_extern.h"
#include "sqltypes.h"
#include "sql3types.h"

View File

@ -2,7 +2,7 @@
#include "postgres_fe.h"
#include "extern.h"
#include "pgtypeslib_extern.h"
#include "pgtypes.h"
/* Return value is zero-filled. */

View File

@ -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"

View File

@ -6,7 +6,7 @@
#include <ctype.h>
#include <math.h>
#include "extern.h"
#include "pgtypeslib_extern.h"
#include "dt.h"
#include "pgtypes_timestamp.h"

View File

@ -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"

View File

@ -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))

View File

@ -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 */

View File

@ -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"

View File

@ -11,7 +11,7 @@
#include <ctype.h>
#include "extern.h"
#include "preproc_extern.h"
#include "preproc.h"
/*

View File

@ -9,7 +9,7 @@
#include "postgres_fe.h"
#include "extern.h"
#include "preproc_extern.h"
/*
* assignment handling function (descriptor)

View File

@ -9,7 +9,7 @@
#include "getopt_long.h"
#include "extern.h"
#include "preproc_extern.h"
int ret_value = 0;
bool autocommit = false,

View File

@ -4,7 +4,7 @@
%{
#include "postgres_fe.h"
#include "extern.h"
#include "preproc_extern.h"
#include "ecpg_config.h"
#include <unistd.h>

View File

@ -13,7 +13,7 @@
#include <ctype.h>
#include "extern.h"
#include "preproc_extern.h"
#include "preproc.h"
/*

View File

@ -27,7 +27,7 @@
#include "common/keywords.h"
#include "extern.h"
#include "preproc_extern.h"
#include "preproc.h"

View File

@ -2,7 +2,7 @@
#include "postgres_fe.h"
#include "extern.h"
#include "preproc_extern.h"
static void output_escaped_str(char *cmd, bool quoted);

View File

@ -18,7 +18,7 @@
#include "postgres_fe.h"
#include "extern.h"
#include "preproc_extern.h"
#include "preproc.h"

View File

@ -22,7 +22,7 @@
#include "common/string.h"
#include "extern.h"
#include "preproc_extern.h"
#include "preproc.h"
}

View File

@ -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

View File

@ -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

View File

@ -2,7 +2,7 @@
#include "postgres_fe.h"
#include "extern.h"
#include "preproc_extern.h"
static struct variable *allvariables = NULL;