mirror of
https://github.com/postgres/postgres.git
synced 2025-06-14 18:42:34 +03:00
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:
@ -7,7 +7,7 @@
|
|||||||
#include "ecpgtype.h"
|
#include "ecpgtype.h"
|
||||||
#include "ecpglib.h"
|
#include "ecpglib.h"
|
||||||
#include "ecpgerrno.h"
|
#include "ecpgerrno.h"
|
||||||
#include "extern.h"
|
#include "ecpglib_extern.h"
|
||||||
#include "sqlca.h"
|
#include "sqlca.h"
|
||||||
|
|
||||||
#ifdef ENABLE_THREAD_SAFETY
|
#ifdef ENABLE_THREAD_SAFETY
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
#include "ecpgtype.h"
|
#include "ecpgtype.h"
|
||||||
#include "ecpglib.h"
|
#include "ecpglib.h"
|
||||||
#include "ecpgerrno.h"
|
#include "ecpgerrno.h"
|
||||||
#include "extern.h"
|
#include "ecpglib_extern.h"
|
||||||
#include "sqlca.h"
|
#include "sqlca.h"
|
||||||
#include "pgtypes_numeric.h"
|
#include "pgtypes_numeric.h"
|
||||||
#include "pgtypes_date.h"
|
#include "pgtypes_date.h"
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
#include "ecpgtype.h"
|
#include "ecpgtype.h"
|
||||||
#include "ecpglib.h"
|
#include "ecpglib.h"
|
||||||
#include "ecpgerrno.h"
|
#include "ecpgerrno.h"
|
||||||
#include "extern.h"
|
#include "ecpglib_extern.h"
|
||||||
#include "sqlca.h"
|
#include "sqlca.h"
|
||||||
#include "sqlda.h"
|
#include "sqlda.h"
|
||||||
#include "sql3types.h"
|
#include "sql3types.h"
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/* src/interfaces/ecpg/ecpglib/extern.h */
|
/* src/interfaces/ecpg/ecpglib/ecpglib_extern.h */
|
||||||
|
|
||||||
#ifndef _ECPG_LIB_EXTERN_H
|
#ifndef _ECPG_ECPGLIB_EXTERN_H
|
||||||
#define _ECPG_LIB_EXTERN_H
|
#define _ECPG_ECPGLIB_EXTERN_H
|
||||||
|
|
||||||
#include "libpq-fe.h"
|
#include "libpq-fe.h"
|
||||||
#include "sqlca.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_INTERNAL_ERROR "YE000"
|
||||||
#define ECPG_SQLSTATE_ECPG_OUT_OF_MEMORY "YE001"
|
#define ECPG_SQLSTATE_ECPG_OUT_OF_MEMORY "YE001"
|
||||||
|
|
||||||
#endif /* _ECPG_LIB_EXTERN_H */
|
#endif /* _ECPG_ECPGLIB_EXTERN_H */
|
@ -6,7 +6,7 @@
|
|||||||
#include "ecpgerrno.h"
|
#include "ecpgerrno.h"
|
||||||
#include "ecpgtype.h"
|
#include "ecpgtype.h"
|
||||||
#include "ecpglib.h"
|
#include "ecpglib.h"
|
||||||
#include "extern.h"
|
#include "ecpglib_extern.h"
|
||||||
#include "sqlca.h"
|
#include "sqlca.h"
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
#include "ecpgtype.h"
|
#include "ecpgtype.h"
|
||||||
#include "ecpglib.h"
|
#include "ecpglib.h"
|
||||||
#include "ecpgerrno.h"
|
#include "ecpgerrno.h"
|
||||||
#include "extern.h"
|
#include "ecpglib_extern.h"
|
||||||
#include "sqlca.h"
|
#include "sqlca.h"
|
||||||
#include "sqlda-native.h"
|
#include "sqlda-native.h"
|
||||||
#include "sqlda-compat.h"
|
#include "sqlda-compat.h"
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
#include "ecpgtype.h"
|
#include "ecpgtype.h"
|
||||||
#include "ecpglib.h"
|
#include "ecpglib.h"
|
||||||
#include "ecpgerrno.h"
|
#include "ecpgerrno.h"
|
||||||
#include "extern.h"
|
#include "ecpglib_extern.h"
|
||||||
|
|
||||||
void
|
void
|
||||||
ecpg_free(void *ptr)
|
ecpg_free(void *ptr)
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
#include "ecpgtype.h"
|
#include "ecpgtype.h"
|
||||||
#include "ecpglib.h"
|
#include "ecpglib.h"
|
||||||
#include "ecpgerrno.h"
|
#include "ecpgerrno.h"
|
||||||
#include "extern.h"
|
#include "ecpglib_extern.h"
|
||||||
#include "sqlca.h"
|
#include "sqlca.h"
|
||||||
#include "pgtypes_numeric.h"
|
#include "pgtypes_numeric.h"
|
||||||
#include "pgtypes_date.h"
|
#include "pgtypes_date.h"
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
#include "ecpgtype.h"
|
#include "ecpgtype.h"
|
||||||
#include "ecpglib.h"
|
#include "ecpglib.h"
|
||||||
#include "ecpgerrno.h"
|
#include "ecpgerrno.h"
|
||||||
#include "extern.h"
|
#include "ecpglib_extern.h"
|
||||||
#include "sqlca.h"
|
#include "sqlca.h"
|
||||||
|
|
||||||
#define STMTID_SIZE 32
|
#define STMTID_SIZE 32
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
#include "ecpgtype.h"
|
#include "ecpgtype.h"
|
||||||
#include "ecpglib.h"
|
#include "ecpglib.h"
|
||||||
#include "ecpgerrno.h"
|
#include "ecpgerrno.h"
|
||||||
#include "extern.h"
|
#include "ecpglib_extern.h"
|
||||||
#include "sqlca.h"
|
#include "sqlca.h"
|
||||||
#include "sqlda-native.h"
|
#include "sqlda-native.h"
|
||||||
#include "sqlda-compat.h"
|
#include "sqlda-compat.h"
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
#include "ecpgtype.h"
|
#include "ecpgtype.h"
|
||||||
#include "ecpglib.h"
|
#include "ecpglib.h"
|
||||||
#include "extern.h"
|
#include "ecpglib_extern.h"
|
||||||
#include "sqltypes.h"
|
#include "sqltypes.h"
|
||||||
#include "sql3types.h"
|
#include "sql3types.h"
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "postgres_fe.h"
|
#include "postgres_fe.h"
|
||||||
|
|
||||||
#include "extern.h"
|
#include "pgtypeslib_extern.h"
|
||||||
#include "pgtypes.h"
|
#include "pgtypes.h"
|
||||||
|
|
||||||
/* Return value is zero-filled. */
|
/* Return value is zero-filled. */
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
||||||
#include "extern.h"
|
#include "pgtypeslib_extern.h"
|
||||||
#include "dt.h"
|
#include "dt.h"
|
||||||
#include "pgtypes_error.h"
|
#include "pgtypes_error.h"
|
||||||
#include "pgtypes_date.h"
|
#include "pgtypes_date.h"
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include "extern.h"
|
#include "pgtypeslib_extern.h"
|
||||||
#include "dt.h"
|
#include "dt.h"
|
||||||
#include "pgtypes_timestamp.h"
|
#include "pgtypes_timestamp.h"
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "common/string.h"
|
#include "common/string.h"
|
||||||
|
|
||||||
#include "extern.h"
|
#include "pgtypeslib_extern.h"
|
||||||
#include "dt.h"
|
#include "dt.h"
|
||||||
#include "pgtypes_error.h"
|
#include "pgtypes_error.h"
|
||||||
#include "pgtypes_interval.h"
|
#include "pgtypes_interval.h"
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#include <float.h>
|
#include <float.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
||||||
#include "extern.h"
|
#include "pgtypeslib_extern.h"
|
||||||
#include "pgtypes_error.h"
|
#include "pgtypes_error.h"
|
||||||
|
|
||||||
#define Max(x, y) ((x) > (y) ? (x) : (y))
|
#define Max(x, y) ((x) > (y) ? (x) : (y))
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/* src/interfaces/ecpg/pgtypeslib/extern.h */
|
/* src/interfaces/ecpg/pgtypeslib/pgtypeslib_extern.h */
|
||||||
|
|
||||||
#ifndef __PGTYPES_COMMON_H__
|
#ifndef _ECPG_PGTYPESLIB_EXTERN_H
|
||||||
#define __PGTYPES_COMMON_H__
|
#define _ECPG_PGTYPESLIB_EXTERN_H
|
||||||
|
|
||||||
#include "pgtypes_error.h"
|
#include "pgtypes_error.h"
|
||||||
|
|
||||||
@ -50,4 +50,4 @@ char *pgtypes_strdup(const char *);
|
|||||||
#define TRUE 1
|
#define TRUE 1
|
||||||
#endif /* TRUE */
|
#endif /* TRUE */
|
||||||
|
|
||||||
#endif /* __PGTYPES_COMMON_H__ */
|
#endif /* _ECPG_PGTYPESLIB_EXTERN_H */
|
@ -11,7 +11,7 @@
|
|||||||
#error -ffast-math is known to break this code
|
#error -ffast-math is known to break this code
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "extern.h"
|
#include "pgtypeslib_extern.h"
|
||||||
#include "dt.h"
|
#include "dt.h"
|
||||||
#include "pgtypes_timestamp.h"
|
#include "pgtypes_timestamp.h"
|
||||||
#include "pgtypes_date.h"
|
#include "pgtypes_date.h"
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
#include "extern.h"
|
#include "preproc_extern.h"
|
||||||
#include "preproc.h"
|
#include "preproc.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
#include "postgres_fe.h"
|
#include "postgres_fe.h"
|
||||||
|
|
||||||
#include "extern.h"
|
#include "preproc_extern.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* assignment handling function (descriptor)
|
* assignment handling function (descriptor)
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
#include "getopt_long.h"
|
#include "getopt_long.h"
|
||||||
|
|
||||||
#include "extern.h"
|
#include "preproc_extern.h"
|
||||||
|
|
||||||
int ret_value = 0;
|
int ret_value = 0;
|
||||||
bool autocommit = false,
|
bool autocommit = false,
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
%{
|
%{
|
||||||
#include "postgres_fe.h"
|
#include "postgres_fe.h"
|
||||||
|
|
||||||
#include "extern.h"
|
#include "preproc_extern.h"
|
||||||
#include "ecpg_config.h"
|
#include "ecpg_config.h"
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
#include "extern.h"
|
#include "preproc_extern.h"
|
||||||
#include "preproc.h"
|
#include "preproc.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
#include "common/keywords.h"
|
#include "common/keywords.h"
|
||||||
|
|
||||||
#include "extern.h"
|
#include "preproc_extern.h"
|
||||||
#include "preproc.h"
|
#include "preproc.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "postgres_fe.h"
|
#include "postgres_fe.h"
|
||||||
|
|
||||||
#include "extern.h"
|
#include "preproc_extern.h"
|
||||||
|
|
||||||
static void output_escaped_str(char *cmd, bool quoted);
|
static void output_escaped_str(char *cmd, bool quoted);
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
#include "postgres_fe.h"
|
#include "postgres_fe.h"
|
||||||
|
|
||||||
#include "extern.h"
|
#include "preproc_extern.h"
|
||||||
#include "preproc.h"
|
#include "preproc.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
#include "common/string.h"
|
#include "common/string.h"
|
||||||
|
|
||||||
#include "extern.h"
|
#include "preproc_extern.h"
|
||||||
#include "preproc.h"
|
#include "preproc.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* src/interfaces/ecpg/preproc/extern.h */
|
/* src/interfaces/ecpg/preproc/preproc_extern.h */
|
||||||
|
|
||||||
#ifndef _ECPG_PREPROC_EXTERN_H
|
#ifndef _ECPG_PREPROC_EXTERN_H
|
||||||
#define _ECPG_PREPROC_EXTERN_H
|
#define _ECPG_PREPROC_EXTERN_H
|
||||||
@ -7,7 +7,6 @@
|
|||||||
|
|
||||||
#include "common/keywords.h"
|
#include "common/keywords.h"
|
||||||
|
|
||||||
#include <errno.h>
|
|
||||||
#ifndef CHAR_BIT
|
#ifndef CHAR_BIT
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#endif
|
#endif
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "postgres_fe.h"
|
#include "postgres_fe.h"
|
||||||
|
|
||||||
#include "extern.h"
|
#include "preproc_extern.h"
|
||||||
|
|
||||||
#define indicator_set ind_type != NULL && ind_type->type != ECPGt_NO_INDICATOR
|
#define indicator_set ind_type != NULL && ind_type->type != ECPGt_NO_INDICATOR
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "postgres_fe.h"
|
#include "postgres_fe.h"
|
||||||
|
|
||||||
#include "extern.h"
|
#include "preproc_extern.h"
|
||||||
|
|
||||||
static struct variable *allvariables = NULL;
|
static struct variable *allvariables = NULL;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user