diff --git a/contrib/pg_upgrade/controldata.c b/contrib/pg_upgrade/controldata.c index 0011c20bf1febfdffc5ab9cc59f824751a88d99f..e74c5628ad78b9c82a8f74a377261e17cb02c13f 100644 --- a/contrib/pg_upgrade/controldata.c +++ b/contrib/pg_upgrade/controldata.c @@ -7,7 +7,6 @@ #include "pg_upgrade.h" #include <ctype.h> -#include <stdlib.h> /* diff --git a/contrib/pg_upgrade/file.c b/contrib/pg_upgrade/file.c index 2361e6ec742f7e442835676ca068a645b63c5449..ebe892bf5430600ff71ee1e8fc7402b60b21132d 100644 --- a/contrib/pg_upgrade/file.c +++ b/contrib/pg_upgrade/file.c @@ -6,13 +6,8 @@ #include "pg_upgrade.h" -#include <sys/types.h> #include <fcntl.h> -#ifdef WIN32 -#include <windows.h> -#endif - static int copy_file(const char *fromfile, const char *tofile, bool force); diff --git a/contrib/pg_upgrade/pg_upgrade.h b/contrib/pg_upgrade/pg_upgrade.h index 931c8b3b5e0e5b7f8c7db310c3f3804beb9dcb3e..148aa5e61bb391ad9a3d50aba006ae17d3e8064d 100644 --- a/contrib/pg_upgrade/pg_upgrade.h +++ b/contrib/pg_upgrade/pg_upgrade.h @@ -5,13 +5,10 @@ #include "postgres.h" #include <unistd.h> -#include <string.h> -#include <stdio.h> #include <assert.h> #include <dirent.h> #include <sys/stat.h> #include <sys/time.h> -#include <sys/types.h> #include "libpq-fe.h" @@ -38,26 +35,16 @@ #define pg_copy_file copy_file #define pg_mv_file rename #define pg_link_file link -#define DEVNULL "/dev/null" -#define DEVTTY "/dev/tty" #define RMDIR_CMD "rm -rf" #define EXEC_EXT "sh" #else #define pg_copy_file CopyFile #define pg_mv_file pgrename #define pg_link_file win32_pghardlink -#define EXE_EXT ".exe" #define sleep(x) Sleep(x * 1000) -#define DEVNULL "nul" -/* "con" does not work from the Msys 1.0.10 console (part of MinGW). */ -#define DEVTTY "con" -/* from pgport */ -extern int pgrename(const char *from, const char *to); -extern int pgunlink(const char *path); -#define rename(from, to) pgrename(from, to) -#define unlink(path) pgunlink(path) #define RMDIR_CMD "RMDIR /s/q" #define EXEC_EXT "bat" +#define EXE_EXT ".exe" #endif #define CLUSTERNAME(cluster) ((cluster) == CLUSTER_OLD ? "old" : "new")