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

Commit5c26732

Browse files
committed
Add 'int' cast for getpid() because some Solaris releases return long
for getpid().
1 parent130972b commit5c26732

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

‎src/backend/access/transam/xlog.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.173 2004/10/12 21:54:35 petere Exp $
10+
* $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.174 2004/10/14 20:23:43 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -1513,7 +1513,7 @@ XLogFileInit(uint32 log, uint32 seg,
15131513
* up pre-creating an extra log segment. That seems OK, and better
15141514
* than holding the lock throughout this lengthy process.
15151515
*/
1516-
snprintf(tmppath,MAXPGPATH,"%s/xlogtemp.%d",XLogDir,getpid());
1516+
snprintf(tmppath,MAXPGPATH,"%s/xlogtemp.%d",XLogDir,(int)getpid());
15171517

15181518
unlink(tmppath);
15191519

@@ -1633,7 +1633,7 @@ XLogFileCopy(uint32 log, uint32 seg,
16331633
/*
16341634
* Copy into a temp file name.
16351635
*/
1636-
snprintf(tmppath,MAXPGPATH,"%s/xlogtemp.%d",XLogDir,getpid());
1636+
snprintf(tmppath,MAXPGPATH,"%s/xlogtemp.%d",XLogDir,(int)getpid());
16371637

16381638
unlink(tmppath);
16391639

@@ -2898,7 +2898,7 @@ writeTimeLineHistory(TimeLineID newTLI, TimeLineID parentTLI,
28982898
/*
28992899
* Write into a temp file name.
29002900
*/
2901-
snprintf(tmppath,MAXPGPATH,"%s/xlogtemp.%d",XLogDir,getpid());
2901+
snprintf(tmppath,MAXPGPATH,"%s/xlogtemp.%d",XLogDir,(int)getpid());
29022902

29032903
unlink(tmppath);
29042904

‎src/backend/postmaster/pgstat.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*
1414
*Copyright (c) 2001-2004, PostgreSQL Global Development Group
1515
*
16-
*$PostgreSQL: pgsql/src/backend/postmaster/pgstat.c,v 1.80 2004/08/29 05:06:46 momjian Exp $
16+
*$PostgreSQL: pgsql/src/backend/postmaster/pgstat.c,v 1.81 2004/10/14 20:23:44 momjian Exp $
1717
* ----------
1818
*/
1919
#include"postgres.h"
@@ -1505,7 +1505,7 @@ PgstatCollectorMain(int argc, char *argv[])
15051505
snprintf(pgStat_fname,MAXPGPATH,PGSTAT_STAT_FILENAME,DataDir);
15061506
/* tmpfname need only be set correctly in this process */
15071507
snprintf(pgStat_tmpfname,MAXPGPATH,PGSTAT_STAT_TMPFILE,
1508-
DataDir,getpid());
1508+
DataDir,(int)getpid());
15091509

15101510
/*
15111511
* Arrange to write the initial status file right away

‎src/backend/postmaster/postmaster.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
*
3838
*
3939
* IDENTIFICATION
40-
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.432 2004/10/12 21:54:40 petere Exp $
40+
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.433 2004/10/14 20:23:45 momjian Exp $
4141
*
4242
* NOTES
4343
*
@@ -2760,7 +2760,7 @@ BackendRun(Port *port)
27602760
*/
27612761
ereport(DEBUG3,
27622762
(errmsg_internal("%s child[%d]: starting with (",
2763-
progname,getpid())));
2763+
progname,(int)getpid())));
27642764
for (i=0;i<ac;++i)
27652765
ereport(DEBUG3,
27662766
(errmsg_internal("\t%s",av[i])));

‎src/bin/psql/command.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright (c) 2000-2004, PostgreSQL Global Development Group
55
*
6-
* $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.127 2004/10/09 02:46:41 momjian Exp $
6+
* $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.128 2004/10/14 20:23:46 momjian Exp $
77
*/
88
#include"postgres_fe.h"
99
#include"command.h"
@@ -1133,7 +1133,7 @@ do_edit(const char *filename_arg, PQExpBuffer query_buf)
11331133
constchar*tmpdirenv=getenv("TMPDIR");
11341134

11351135
snprintf(fnametmp,sizeof(fnametmp),"%s/psql.edit.%d.%d",
1136-
tmpdirenv ?tmpdirenv :"/tmp",geteuid(),getpid());
1136+
tmpdirenv ?tmpdirenv :"/tmp",geteuid(),(int)getpid());
11371137
#else
11381138
GetTempFileName(".","psql",0,fnametmp);
11391139
#endif

‎src/interfaces/ecpg/ecpglib/misc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/misc.c,v 1.23 2004/10/09 02:46:42 momjian Exp $ */
1+
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/misc.c,v 1.24 2004/10/14 20:23:46 momjian Exp $ */
22

33
#definePOSTGRES_ECPG_INTERNAL
44
#include"postgres_fe.h"
@@ -253,7 +253,7 @@ ECPGlog(const char *format,...)
253253
return;
254254
}
255255

256-
sprintf(f,"[%d]: %s",getpid(),format);
256+
sprintf(f,"[%d]: %s",(int)getpid(),format);
257257

258258
va_start(ap,format);
259259
vfprintf(debugstream,f,ap);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp