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.
This commit is contained in:
parent
d7304244e2
commit
11e482c350
contrib/pg_upgrade
src
@ -259,7 +259,6 @@ copy_clog_xlog_xid(void)
|
|||||||
check_ok();
|
check_ok();
|
||||||
|
|
||||||
prep_status("Copying old commit clogs to new server");
|
prep_status("Copying old commit clogs to new server");
|
||||||
/* libpgport's copydir() doesn't work in FRONTEND code */
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
exec_prog(true, SYSTEMQUOTE "%s \"%s\" \"%s\"" SYSTEMQUOTE,
|
exec_prog(true, SYSTEMQUOTE "%s \"%s\" \"%s\"" SYSTEMQUOTE,
|
||||||
"cp -Rf",
|
"cp -Rf",
|
||||||
|
@ -44,6 +44,7 @@
|
|||||||
#include "pgstat.h"
|
#include "pgstat.h"
|
||||||
#include "postmaster/bgwriter.h"
|
#include "postmaster/bgwriter.h"
|
||||||
#include "storage/bufmgr.h"
|
#include "storage/bufmgr.h"
|
||||||
|
#include "storage/copydir.h"
|
||||||
#include "storage/fd.h"
|
#include "storage/fd.h"
|
||||||
#include "storage/lmgr.h"
|
#include "storage/lmgr.h"
|
||||||
#include "storage/ipc.h"
|
#include "storage/ipc.h"
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
|
#include "storage/copydir.h"
|
||||||
#include "storage/fd.h"
|
#include "storage/fd.h"
|
||||||
#include "miscadmin.h"
|
#include "miscadmin.h"
|
||||||
|
|
||||||
|
@ -288,8 +288,6 @@ extern int pgsymlink(const char *oldpath, const char *newpath);
|
|||||||
#define symlink(oldpath, newpath) pgsymlink(oldpath, newpath)
|
#define symlink(oldpath, newpath) pgsymlink(oldpath, newpath)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern void copydir(char *fromdir, char *todir, bool recurse);
|
|
||||||
|
|
||||||
extern bool rmtree(const char *path, bool rmtopdir);
|
extern bool rmtree(const char *path, bool rmtopdir);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
18
src/include/storage/copydir.h
Normal file
18
src/include/storage/copydir.h
Normal file
@ -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 */
|
Loading…
x
Reference in New Issue
Block a user