1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-31 22:04:40 +03:00

Make the order of the header file includes consistent in contrib modules.

The basic rule we follow here is to always first include 'postgres.h' or
'postgres_fe.h' whichever is applicable, then system header includes and
then Postgres header includes.  In this, we also follow that all the
Postgres header includes are in order based on their ASCII value.  We
generally follow these rules, but the code has deviated in many places.
This commit makes it consistent just for contrib modules.  The later
commits will enforce similar rules in other parts of code.

Author: Vignesh C
Reviewed-by: Amit Kapila
Discussion: https://postgr.es/m/CALDaNm2Sznv8RR6Ex-iJO6xAdsxgWhCoETkaYX=+9DW3q0QCfA@mail.gmail.com
This commit is contained in:
Amit Kapila
2019-10-23 09:26:22 +05:30
parent 59c2617af3
commit 7e735035f2
85 changed files with 115 additions and 183 deletions

View File

@ -8,8 +8,8 @@
#include "postgres.h"
#include "px.h"
#include "px-crypt.h"
#include "px.h"
#define MD5_SIZE 16

View File

@ -33,11 +33,11 @@
#include <time.h>
#include "px.h"
#include "md5.h"
#include "sha1.h"
#include "blf.h"
#include "md5.h"
#include "px.h"
#include "rijndael.h"
#include "sha1.h"
#ifndef MD5_DIGEST_LENGTH
#define MD5_DIGEST_LENGTH 16

View File

@ -31,8 +31,8 @@
#include "postgres.h"
#include "px.h"
#include "mbuf.h"
#include "px.h"
#define STEP (16*1024)

View File

@ -31,12 +31,11 @@
#include "postgres.h"
#include "px.h"
#include <openssl/evp.h>
#include <openssl/err.h>
#include <openssl/rand.h>
#include "px.h"
#include "utils/memutils.h"
#include "utils/resowner.h"

View File

@ -34,13 +34,12 @@
#include <ctype.h>
#include "parser/scansup.h"
#include "pgcrypto.h"
#include "px-crypt.h"
#include "px.h"
#include "utils/builtins.h"
#include "utils/uuid.h"
#include "px.h"
#include "px-crypt.h"
#include "pgcrypto.h"
PG_MODULE_MAGIC;
/* private stuff */

View File

@ -31,8 +31,8 @@
#include "postgres.h"
#include "px.h"
#include "pgp.h"
#include "px.h"
/*
* BASE64 - duplicated :(

View File

@ -31,8 +31,8 @@
#include "postgres.h"
#include "px.h"
#include "pgp.h"
#include "px.h"
typedef int (*mix_data_t) (PGP_CFB *ctx, const uint8 *data, int len, uint8 *dst);

View File

@ -31,9 +31,8 @@
#include "postgres.h"
#include "px.h"
#include "pgp.h"
#include "px.h"
/*
* Compressed pkt writer

View File

@ -31,9 +31,9 @@
#include "postgres.h"
#include "px.h"
#include "mbuf.h"
#include "pgp.h"
#include "px.h"
#define NO_CTX_SIZE 0
#define ALLOW_CTX_SIZE 1

View File

@ -34,9 +34,8 @@
#include <time.h>
#include "mbuf.h"
#include "px.h"
#include "pgp.h"
#include "px.h"
#define MDC_DIGEST_LEN 20
#define STREAM_ID 0xE0

View File

@ -30,9 +30,9 @@
*/
#include "postgres.h"
#include "px.h"
#include "mbuf.h"
#include "pgp.h"
#include "px.h"
static int
read_pubkey_keyid(PullFilter *pkt, uint8 *keyid_buf)

View File

@ -31,9 +31,8 @@
#include "postgres.h"
#include "imath.h"
#include "px.h"
#include "pgp.h"
#include "px.h"
static mpz_t *
mp_new()

View File

@ -32,8 +32,8 @@
#include <openssl/bn.h>
#include "px.h"
#include "pgp.h"
#include "px.h"
static BIGNUM *
mpi_to_bn(PGP_MPI *n)

View File

@ -30,8 +30,8 @@
*/
#include "postgres.h"
#include "px.h"
#include "pgp.h"
#include "px.h"
int
pgp_mpi_alloc(int bits, PGP_MPI **mpi)

View File

@ -31,16 +31,15 @@
#include "postgres.h"
#include "lib/stringinfo.h"
#include "catalog/pg_type.h"
#include "mb/pg_wchar.h"
#include "utils/builtins.h"
#include "utils/array.h"
#include "funcapi.h"
#include "lib/stringinfo.h"
#include "mb/pg_wchar.h"
#include "mbuf.h"
#include "px.h"
#include "pgp.h"
#include "px.h"
#include "utils/array.h"
#include "utils/builtins.h"
/*
* public functions

View File

@ -30,8 +30,8 @@
*/
#include "postgres.h"
#include "px.h"
#include "pgp.h"
#include "px.h"
/*
* padded msg = 02 || PS || 00 || M

View File

@ -30,8 +30,8 @@
*/
#include "postgres.h"
#include "px.h"
#include "pgp.h"
#include "px.h"
/*
* padded msg: 02 || non-zero pad bytes || 00 || msg

View File

@ -30,9 +30,9 @@
*/
#include "postgres.h"
#include "px.h"
#include "mbuf.h"
#include "pgp.h"
#include "px.h"
int
pgp_key_alloc(PGP_PubKey **pk_p)

View File

@ -31,9 +31,8 @@
#include "postgres.h"
#include "px.h"
#include "pgp.h"
#include "px.h"
static int
calc_s2k_simple(PGP_S2K *s2k, PX_MD *md, const uint8 *key,

View File

@ -31,8 +31,8 @@
#include "postgres.h"
#include "px.h"
#include "pgp.h"
#include "px.h"
/*
* Defaults.

View File

@ -31,9 +31,8 @@
#include "postgres.h"
#include "px.h"
#include "px-crypt.h"
#include "px.h"
static char *
run_crypt_des(const char *psw, const char *salt,