diff options
Diffstat (limited to 'src/bin')
| -rw-r--r-- | src/bin/pg_dump/pg_dump.c | 8 | ||||
| -rw-r--r-- | src/bin/pg_passwd/pg_passwd.c | 18 |
2 files changed, 5 insertions, 21 deletions
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index 12eed924525..407413160aa 100644 --- a/src/bin/pg_dump/pg_dump.c +++ b/src/bin/pg_dump/pg_dump.c @@ -22,7 +22,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.148 2000/05/28 20:34:52 tgl Exp $ + * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.149 2000/06/02 15:57:38 momjian Exp $ * * Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb * @@ -760,11 +760,7 @@ main(int argc, char **argv) g_fout = stdout; else { -#ifndef __CYGWIN32__ - g_fout = fopen(filename, "w"); -#else - g_fout = fopen(filename, "wb"); -#endif + g_fout = fopen(filename, PG_BINARY_W); if (g_fout == NULL) { fprintf(stderr, diff --git a/src/bin/pg_passwd/pg_passwd.c b/src/bin/pg_passwd/pg_passwd.c index f5edf552ebf..b8d1aae97ac 100644 --- a/src/bin/pg_passwd/pg_passwd.c +++ b/src/bin/pg_passwd/pg_passwd.c @@ -54,11 +54,7 @@ read_pwd_file(char *filename) int i; try_again: -#ifndef __CYGWIN32__ - fp = fopen(filename, "r"); -#else - fp = fopen(filename, "rb"); -#endif + fp = fopen(filename, PG_BINARY_R); if (fp == NULL) { if (errno == ENOENT) @@ -70,11 +66,7 @@ try_again: { case 'y': case 'Y': -#ifndef __CYGWIN32__ - fp = fopen(filename, "w"); -#else - fp = fopen(filename, "wb"); -#endif + fp = fopen(filename, PG_BINARY_W); if (fp == NULL) { perror(filename); @@ -192,11 +184,7 @@ link_again: } /* open file */ -#ifndef __CYGWIN32__ - if ((fp = fopen(filename, "w")) == NULL) -#else - if ((fp = fopen(filename, "wb")) == NULL) -#endif + if ((fp = fopen(filename, PG_BINARY_W)) == NULL) { perror(filename); exit(1); |
