1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-02 09:02:37 +03:00

Make getpid() use %d consistently for printing.

This commit is contained in:
Bruce Momjian
2004-10-09 02:46:42 +00:00
parent b3723aeb1f
commit 67608a393b
4 changed files with 13 additions and 17 deletions

View File

@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2004, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.126 2004/10/07 15:21:56 momjian Exp $
* $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.127 2004/10/09 02:46:41 momjian Exp $
*/
#include "postgres_fe.h"
#include "command.h"
@ -1132,9 +1132,8 @@ do_edit(const char *filename_arg, PQExpBuffer query_buf)
#ifndef WIN32
const char *tmpdirenv = getenv("TMPDIR");
snprintf(fnametmp, sizeof(fnametmp), "%s/psql.edit.%ld.%ld",
tmpdirenv ? tmpdirenv : "/tmp",
(long) geteuid(), (long) getpid());
snprintf(fnametmp, sizeof(fnametmp), "%s/psql.edit.%d.%d",
tmpdirenv ? tmpdirenv : "/tmp", geteuid(), getpid());
#else
GetTempFileName(".", "psql", 0, fnametmp);
#endif