Skip to content

Commit 600fc1d

Browse files
committed
Get rid of some more stuff that duplicates c.h or port.h.
1 parent 14bd1c3 commit 600fc1d

File tree

3 files changed

+1
-20
lines changed

3 files changed

+1
-20
lines changed

contrib/pg_upgrade/controldata.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
#include "pg_upgrade.h"
88

99
#include <ctype.h>
10-
#include <stdlib.h>
1110

1211

1312
/*

contrib/pg_upgrade/file.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,8 @@
66

77
#include "pg_upgrade.h"
88

9-
#include <sys/types.h>
109
#include <fcntl.h>
1110

12-
#ifdef WIN32
13-
#include <windows.h>
14-
#endif
15-
1611

1712
static int copy_file(const char *fromfile, const char *tofile, bool force);
1813

contrib/pg_upgrade/pg_upgrade.h

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,10 @@
55
#include "postgres.h"
66

77
#include <unistd.h>
8-
#include <string.h>
9-
#include <stdio.h>
108
#include <assert.h>
119
#include <dirent.h>
1210
#include <sys/stat.h>
1311
#include <sys/time.h>
14-
#include <sys/types.h>
1512

1613
#include "libpq-fe.h"
1714

@@ -38,26 +35,16 @@
3835
#define pg_copy_file copy_file
3936
#define pg_mv_file rename
4037
#define pg_link_file link
41-
#define DEVNULL "/dev/null"
42-
#define DEVTTY "/dev/tty"
4338
#define RMDIR_CMD "rm -rf"
4439
#define EXEC_EXT "sh"
4540
#else
4641
#define pg_copy_file CopyFile
4742
#define pg_mv_file pgrename
4843
#define pg_link_file win32_pghardlink
49-
#define EXE_EXT ".exe"
5044
#define sleep(x) Sleep(x * 1000)
51-
#define DEVNULL "nul"
52-
/* "con" does not work from the Msys 1.0.10 console (part of MinGW). */
53-
#define DEVTTY "con"
54-
/* from pgport */
55-
extern int pgrename(const char *from, const char *to);
56-
extern int pgunlink(const char *path);
57-
#define rename(from, to) pgrename(from, to)
58-
#define unlink(path) pgunlink(path)
5945
#define RMDIR_CMD "RMDIR /s/q"
6046
#define EXEC_EXT "bat"
47+
#define EXE_EXT ".exe"
6148
#endif
6249

6350
#define CLUSTERNAME(cluster) ((cluster) == CLUSTER_OLD ? "old" : "new")

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy