1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-12 05:01:15 +03:00

Add 'int' cast for getpid() because some Solaris releases return long

for getpid().
This commit is contained in:
Bruce Momjian
2004-10-14 20:23:46 +00:00
parent 130972b4e2
commit 5c267325ec
5 changed files with 12 additions and 12 deletions

View File

@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.173 2004/10/12 21:54:35 petere Exp $
* $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.174 2004/10/14 20:23:43 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1513,7 +1513,7 @@ XLogFileInit(uint32 log, uint32 seg,
* up pre-creating an extra log segment. That seems OK, and better
* than holding the lock throughout this lengthy process.
*/
snprintf(tmppath, MAXPGPATH, "%s/xlogtemp.%d", XLogDir, getpid());
snprintf(tmppath, MAXPGPATH, "%s/xlogtemp.%d", XLogDir, (int)getpid());
unlink(tmppath);
@@ -1633,7 +1633,7 @@ XLogFileCopy(uint32 log, uint32 seg,
/*
* Copy into a temp file name.
*/
snprintf(tmppath, MAXPGPATH, "%s/xlogtemp.%d", XLogDir, getpid());
snprintf(tmppath, MAXPGPATH, "%s/xlogtemp.%d", XLogDir, (int)getpid());
unlink(tmppath);
@@ -2898,7 +2898,7 @@ writeTimeLineHistory(TimeLineID newTLI, TimeLineID parentTLI,
/*
* Write into a temp file name.
*/
snprintf(tmppath, MAXPGPATH, "%s/xlogtemp.%d", XLogDir, getpid());
snprintf(tmppath, MAXPGPATH, "%s/xlogtemp.%d", XLogDir, (int)getpid());
unlink(tmppath);

View File

@@ -13,7 +13,7 @@
*
* Copyright (c) 2001-2004, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/backend/postmaster/pgstat.c,v 1.80 2004/08/29 05:06:46 momjian Exp $
* $PostgreSQL: pgsql/src/backend/postmaster/pgstat.c,v 1.81 2004/10/14 20:23:44 momjian Exp $
* ----------
*/
#include "postgres.h"
@@ -1505,7 +1505,7 @@ PgstatCollectorMain(int argc, char *argv[])
snprintf(pgStat_fname, MAXPGPATH, PGSTAT_STAT_FILENAME, DataDir);
/* tmpfname need only be set correctly in this process */
snprintf(pgStat_tmpfname, MAXPGPATH, PGSTAT_STAT_TMPFILE,
DataDir, getpid());
DataDir, (int)getpid());
/*
* Arrange to write the initial status file right away

View File

@@ -37,7 +37,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.432 2004/10/12 21:54:40 petere Exp $
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.433 2004/10/14 20:23:45 momjian Exp $
*
* NOTES
*
@@ -2760,7 +2760,7 @@ BackendRun(Port *port)
*/
ereport(DEBUG3,
(errmsg_internal("%s child[%d]: starting with (",
progname, getpid())));
progname, (int)getpid())));
for (i = 0; i < ac; ++i)
ereport(DEBUG3,
(errmsg_internal("\t%s", av[i])));