diff options
| author | Bruce Momjian <bruce@momjian.us> | 1999-01-17 06:20:06 +0000 |
|---|---|---|
| committer | Bruce Momjian <bruce@momjian.us> | 1999-01-17 06:20:06 +0000 |
| commit | 7a6b562fdf60f1d1ebe9e2bc154d0ffd56dab2d1 (patch) | |
| tree | 1e24049a7bedd03a13776dc131e808ae97eca197 /src/bin/pg_passwd/pg_passwd.c | |
| parent | 298682d9e0b0ec55d5f72cec1f4d43c23f2a1ac6 (diff) | |
| download | postgresql-7a6b562fdf60f1d1ebe9e2bc154d0ffd56dab2d1.tar.gz | |
Apply Win32 patch from Horak Daniel.
Diffstat (limited to 'src/bin/pg_passwd/pg_passwd.c')
| -rw-r--r-- | src/bin/pg_passwd/pg_passwd.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/bin/pg_passwd/pg_passwd.c b/src/bin/pg_passwd/pg_passwd.c index de9ffd65a7..0718a3153b 100644 --- a/src/bin/pg_passwd/pg_passwd.c +++ b/src/bin/pg_passwd/pg_passwd.c @@ -63,7 +63,11 @@ read_pwd_file(char *filename) int i; try_again: +#ifndef __CYGWIN32__ fp = fopen(filename, "r"); +#else + fp = fopen(filename, "rb"); +#endif if (fp == NULL) { if (errno == ENOENT) @@ -75,7 +79,11 @@ try_again: { case 'y': case 'Y': +#ifndef __CYGWIN32__ fp = fopen(filename, "w"); +#else + fp = fopen(filename, "wb"); +#endif if (fp == NULL) { perror(filename); @@ -193,7 +201,11 @@ link_again: } /* open file */ +#ifndef __CYGWIN32__ if ((fp = fopen(filename, "w")) == NULL) +#else + if ((fp = fopen(filename, "wb")) == NULL) +#endif { perror(filename); exit(1); |
