1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-31 17:02:12 +03:00

pgindent run.

This commit is contained in:
Bruce Momjian
2003-08-04 00:43:34 +00:00
parent 63354a0228
commit 089003fb46
554 changed files with 24888 additions and 21245 deletions

View File

@@ -6,13 +6,14 @@
#include "postgres.h"
#undef mkdir /* no reason to use that macro because we ignore the 2nd arg */
#undef mkdir /* no reason to use that macro because we
* ignore the 2nd arg */
#include <dirent.h>
int
copydir(char *fromdir,char *todir)
copydir(char *fromdir, char *todir)
{
DIR *xldir;
struct dirent *xlde;
@@ -37,19 +38,19 @@ copydir(char *fromdir,char *todir)
while ((xlde = readdir(xldir)) != NULL)
{
snprintf(fromfl, MAXPGPATH, "%s/%s", fromdir, xlde->d_name);
snprintf(tofl, MAXPGPATH, "%s/%s", todir, xlde->d_name);
if (CopyFile(fromfl,tofl,TRUE) < 0)
{
int save_errno = errno;
snprintf(fromfl, MAXPGPATH, "%s/%s", fromdir, xlde->d_name);
snprintf(tofl, MAXPGPATH, "%s/%s", todir, xlde->d_name);
if (CopyFile(fromfl, tofl, TRUE) < 0)
{
int save_errno = errno;
closedir(xldir);
errno = save_errno;
ereport(ERROR,
(errcode_for_file_access(),
errmsg("could not copy file \"%s\": %m", fromfl)));
return 1;
}
closedir(xldir);
errno = save_errno;
ereport(ERROR,
(errcode_for_file_access(),
errmsg("could not copy file \"%s\": %m", fromfl)));
return 1;
}
}
closedir(xldir);