diff options
Diffstat (limited to 'src/bin/psql/psql.c')
-rw-r--r-- | src/bin/psql/psql.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/bin/psql/psql.c b/src/bin/psql/psql.c index 5cf3762f411..95a111f1930 100644 --- a/src/bin/psql/psql.c +++ b/src/bin/psql/psql.c @@ -7,17 +7,19 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.24 1996/11/04 09:17:55 bryanh Exp $ + * $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.25 1996/11/08 06:01:33 momjian Exp $ * *------------------------------------------------------------------------- */ #include <stdio.h> #include <string.h> #include <signal.h> +#include <errno.h> #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> #include <fcntl.h> +#include "postgres.h" #include "libpq-fe.h" #include "stringutils.h" @@ -800,7 +802,7 @@ do_edit(const char *filename_arg, char *query, int *retcode_p) { fname=(char *)filename_arg; error=false; } else { - sprintf(tmp, "/tmp/psql.%d.%d", geteuid(), getpid()); + sprintf(tmp, "/tmp/psql.%ld.%ld", (long)geteuid(), (long)getpid()); fname=tmp; unlink(tmp); if (ql > 0) { |