Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit e7988a7

Browse files
committed
Remove SEP_CHAR from /contrib.
1 parent 33f2614 commit e7988a7

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

contrib/pg_resetxlog/pg_resetxlog.c

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
2424
* Portions Copyright (c) 1994, Regents of the University of California
2525
*
26-
* $Header: /cvsroot/pgsql/contrib/pg_resetxlog/Attic/pg_resetxlog.c,v 1.3 2001/03/22 03:59:10 momjian Exp $
26+
* $Header: /cvsroot/pgsql/contrib/pg_resetxlog/Attic/pg_resetxlog.c,v 1.4 2001/05/30 14:18:18 momjian Exp $
2727
*
2828
*-------------------------------------------------------------------------
2929
*/
@@ -92,8 +92,8 @@
9292

9393

9494
#define XLogFileName(path, log, seg) \
95-
snprintf(path, MAXPGPATH, "%s%c%08X%08X", \
96-
XLogDir, SEP_CHAR, log, seg)
95+
snprintf(path, MAXPGPATH, "%s/%08X%08X", \
96+
XLogDir, log, seg)
9797

9898
/*
9999
* _INTL_MAXLOGRECSZ: max space needed for a record including header and
@@ -811,7 +811,7 @@ KillExistingXLOG(void)
811811
if (strlen(xlde->d_name) == 16 &&
812812
strspn(xlde->d_name, "0123456789ABCDEF") == 16)
813813
{
814-
sprintf(path, "%s%c%s", XLogDir, SEP_CHAR, xlde->d_name);
814+
sprintf(path, "%s/%s", XLogDir, xlde->d_name);
815815
if (unlink(path) < 0)
816816
{
817817
perror(path);
@@ -947,17 +947,16 @@ main(int argc, char **argv)
947947

948948
DataDir = argv[argn++];
949949

950-
snprintf(XLogDir, MAXPGPATH, "%s%cpg_xlog", DataDir, SEP_CHAR);
950+
snprintf(XLogDir, MAXPGPATH, "%s/pg_xlog", DataDir);
951951

952-
snprintf(ControlFilePath, MAXPGPATH, "%s%cglobal%cpg_control",
953-
DataDir, SEP_CHAR, SEP_CHAR);
952+
snprintf(ControlFilePath, MAXPGPATH, "%s/global/pg_control", DataDir);
954953

955954
/*
956955
* Check for a postmaster lock file --- if there is one, refuse to
957956
* proceed, on grounds we might be interfering with a live
958957
* installation.
959958
*/
960-
snprintf(path, MAXPGPATH, "%s%cpostmaster.pid", DataDir, SEP_CHAR);
959+
snprintf(path, MAXPGPATH, "%s/postmaster.pid", DataDir);
961960

962961
if ((fd = open(path, O_RDONLY)) < 0)
963962
{

0 commit comments

Comments
 (0)