1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-15 19:21:59 +03:00

Remove useless duplicate inclusions of system header files.

c.h #includes a number of core libc header files, such as <stdio.h>.
There's no point in re-including these after having read postgres.h,
postgres_fe.h, or c.h; so remove code that did so.

While at it, also fix some places that were ignoring our standard pattern
of "include postgres[_fe].h, then system header files, then other Postgres
header files".  While there's not any great magic in doing it that way
rather than system headers last, it's silly to have just a few files
deviating from the general pattern.  (But I didn't attempt to enforce this
globally, only in files I was touching anyway.)

I'd be the first to say that this is mostly compulsive neatnik-ism,
but over time it might save enough compile cycles to be useful.
This commit is contained in:
Tom Lane
2017-02-25 16:12:24 -05:00
parent 5639ceddcb
commit 9e3755ecb2
77 changed files with 43 additions and 157 deletions

View File

@ -3,8 +3,6 @@
#define POSTGRES_ECPG_INTERNAL
#include "postgres_fe.h"
#include <stdlib.h>
#include <string.h>
#include <float.h>
#include <math.h>

View File

@ -16,7 +16,6 @@
#define POSTGRES_ECPG_INTERNAL
#include "postgres_fe.h"
#include <locale.h>
#include <float.h>
#include <math.h>

View File

@ -3,7 +3,6 @@
#define POSTGRES_ECPG_INTERNAL
#include "postgres_fe.h"
#include <stdlib.h>
#include "ecpgtype.h"
#include "ecpglib.h"
#include "extern.h"

View File

@ -6,7 +6,7 @@
#include "postgres_fe.h"
#include <unistd.h>
#include <string.h>
#include "getopt_long.h"
#include "extern.h"

View File

@ -19,7 +19,6 @@
#include "postgres_fe.h"
#include <ctype.h>
#include <sys/types.h>
#include <limits.h>
#include "extern.h"

View File

@ -15,7 +15,6 @@
#include "postgres_fe.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <ctype.h>

View File

@ -25,7 +25,6 @@
#include "libpq-events.h"
#include <time.h>
#include <sys/types.h>
#ifndef WIN32
#include <sys/time.h>
#endif

View File

@ -12,7 +12,6 @@
#include "postgres_fe.h"
#include <windows.h>
#include "pthread-win32.h"
DWORD