Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit11e482c

Browse files
committed
Move copydir() prototype into its own header file.
Having this in src/include/port.h makes no sense, now that copydir.c livesin src/backend/strorage rather than src/port. Along the way, remove anobsolete comment from contrib/pg_upgrade that makes reference to the oldlocation.
1 parentd730424 commit11e482c

File tree

5 files changed

+20
-3
lines changed

5 files changed

+20
-3
lines changed

‎contrib/pg_upgrade/pg_upgrade.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,6 @@ copy_clog_xlog_xid(void)
259259
check_ok();
260260

261261
prep_status("Copying old commit clogs to new server");
262-
/* libpgport's copydir() doesn't work in FRONTEND code */
263262
#ifndefWIN32
264263
exec_prog(true,SYSTEMQUOTE"%s \"%s\" \"%s\""SYSTEMQUOTE,
265264
"cp -Rf",

‎src/backend/commands/dbcommands.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
#include"pgstat.h"
4545
#include"postmaster/bgwriter.h"
4646
#include"storage/bufmgr.h"
47+
#include"storage/copydir.h"
4748
#include"storage/fd.h"
4849
#include"storage/lmgr.h"
4950
#include"storage/ipc.h"

‎src/backend/storage/file/copydir.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include<unistd.h>
2323
#include<sys/stat.h>
2424

25+
#include"storage/copydir.h"
2526
#include"storage/fd.h"
2627
#include"miscadmin.h"
2728

‎src/include/port.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,6 @@ extern intpgsymlink(const char *oldpath, const char *newpath);
288288
#definesymlink(oldpath,newpath)pgsymlink(oldpath, newpath)
289289
#endif
290290

291-
externvoidcopydir(char*fromdir,char*todir,boolrecurse);
292-
293291
externboolrmtree(constchar*path,boolrmtopdir);
294292

295293
/*

‎src/include/storage/copydir.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/*-------------------------------------------------------------------------
2+
*
3+
* port.h
4+
* Header for src/port/ compatibility functions.
5+
*
6+
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
7+
* Portions Copyright (c) 1994, Regents of the University of California
8+
*
9+
* src/include/port.h
10+
*
11+
*-------------------------------------------------------------------------
12+
*/
13+
#ifndefCOPYDIR_H
14+
#defineCOPYDIR_H
15+
16+
externvoidcopydir(char*fromdir,char*todir,boolrecurse);
17+
18+
#endif/* COPYDIR_H */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp