aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2010-11-12 16:39:53 -0500
committerRobert Haas <rhaas@postgresql.org>2010-11-12 16:39:53 -0500
commit11e482c350c431fb2f51c6ceb847e5e31ea38911 (patch)
treea0ef983083f4b67a2061b9e5eb86ff7968ba10bc /src
parentd7304244e26b92d533f7e44f0afbcf1ff2f46286 (diff)
downloadpostgresql-11e482c350c431fb2f51c6ceb847e5e31ea38911.tar.gz
postgresql-11e482c350c431fb2f51c6ceb847e5e31ea38911.zip
Move copydir() prototype into its own header file.
Having this in src/include/port.h makes no sense, now that copydir.c lives in src/backend/strorage rather than src/port. Along the way, remove an obsolete comment from contrib/pg_upgrade that makes reference to the old location.
Diffstat (limited to 'src')
-rw-r--r--src/backend/commands/dbcommands.c1
-rw-r--r--src/backend/storage/file/copydir.c1
-rw-r--r--src/include/port.h2
-rw-r--r--src/include/storage/copydir.h18
4 files changed, 20 insertions, 2 deletions
diff --git a/src/backend/commands/dbcommands.c b/src/backend/commands/dbcommands.c
index 6193aa28844..8cbd7548f97 100644
--- a/src/backend/commands/dbcommands.c
+++ b/src/backend/commands/dbcommands.c
@@ -44,6 +44,7 @@
#include "pgstat.h"
#include "postmaster/bgwriter.h"
#include "storage/bufmgr.h"
+#include "storage/copydir.h"
#include "storage/fd.h"
#include "storage/lmgr.h"
#include "storage/ipc.h"
diff --git a/src/backend/storage/file/copydir.c b/src/backend/storage/file/copydir.c
index a9715f3c7de..4a10563ef83 100644
--- a/src/backend/storage/file/copydir.c
+++ b/src/backend/storage/file/copydir.c
@@ -22,6 +22,7 @@
#include <unistd.h>
#include <sys/stat.h>
+#include "storage/copydir.h"
#include "storage/fd.h"
#include "miscadmin.h"
diff --git a/src/include/port.h b/src/include/port.h
index f4aa69c8f6c..204876888ac 100644
--- a/src/include/port.h
+++ b/src/include/port.h
@@ -288,8 +288,6 @@ extern int pgsymlink(const char *oldpath, const char *newpath);
#define symlink(oldpath, newpath) pgsymlink(oldpath, newpath)
#endif
-extern void copydir(char *fromdir, char *todir, bool recurse);
-
extern bool rmtree(const char *path, bool rmtopdir);
/*
diff --git a/src/include/storage/copydir.h b/src/include/storage/copydir.h
new file mode 100644
index 00000000000..194d98ee076
--- /dev/null
+++ b/src/include/storage/copydir.h
@@ -0,0 +1,18 @@
+/*-------------------------------------------------------------------------
+ *
+ * port.h
+ * Header for src/port/ compatibility functions.
+ *
+ * Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ * src/include/port.h
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifndef COPYDIR_H
+#define COPYDIR_H
+
+extern void copydir(char *fromdir, char *todir, bool recurse);
+
+#endif /* COPYDIR_H */