Skip to content
Snippets Groups Projects
Commit 600fc1dc authored by Tom Lane's avatar Tom Lane
Browse files

Get rid of some more stuff that duplicates c.h or port.h.

parent 14bd1c3d
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
#include "pg_upgrade.h" #include "pg_upgrade.h"
#include <ctype.h> #include <ctype.h>
#include <stdlib.h>
/* /*
......
...@@ -6,13 +6,8 @@ ...@@ -6,13 +6,8 @@
#include "pg_upgrade.h" #include "pg_upgrade.h"
#include <sys/types.h>
#include <fcntl.h> #include <fcntl.h>
#ifdef WIN32
#include <windows.h>
#endif
static int copy_file(const char *fromfile, const char *tofile, bool force); static int copy_file(const char *fromfile, const char *tofile, bool force);
......
...@@ -5,13 +5,10 @@ ...@@ -5,13 +5,10 @@
#include "postgres.h" #include "postgres.h"
#include <unistd.h> #include <unistd.h>
#include <string.h>
#include <stdio.h>
#include <assert.h> #include <assert.h>
#include <dirent.h> #include <dirent.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/time.h> #include <sys/time.h>
#include <sys/types.h>
#include "libpq-fe.h" #include "libpq-fe.h"
...@@ -38,26 +35,16 @@ ...@@ -38,26 +35,16 @@
#define pg_copy_file copy_file #define pg_copy_file copy_file
#define pg_mv_file rename #define pg_mv_file rename
#define pg_link_file link #define pg_link_file link
#define DEVNULL "/dev/null"
#define DEVTTY "/dev/tty"
#define RMDIR_CMD "rm -rf" #define RMDIR_CMD "rm -rf"
#define EXEC_EXT "sh" #define EXEC_EXT "sh"
#else #else
#define pg_copy_file CopyFile #define pg_copy_file CopyFile
#define pg_mv_file pgrename #define pg_mv_file pgrename
#define pg_link_file win32_pghardlink #define pg_link_file win32_pghardlink
#define EXE_EXT ".exe"
#define sleep(x) Sleep(x * 1000) #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 RMDIR_CMD "RMDIR /s/q"
#define EXEC_EXT "bat" #define EXEC_EXT "bat"
#define EXE_EXT ".exe"
#endif #endif
#define CLUSTERNAME(cluster) ((cluster) == CLUSTER_OLD ? "old" : "new") #define CLUSTERNAME(cluster) ((cluster) == CLUSTER_OLD ? "old" : "new")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment