aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/preproc/ecpg.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>1999-01-17 06:20:06 +0000
committerBruce Momjian <bruce@momjian.us>1999-01-17 06:20:06 +0000
commit7a6b562fdf60f1d1ebe9e2bc154d0ffd56dab2d1 (patch)
tree1e24049a7bedd03a13776dc131e808ae97eca197 /src/interfaces/ecpg/preproc/ecpg.c
parent298682d9e0b0ec55d5f72cec1f4d43c23f2a1ac6 (diff)
downloadpostgresql-7a6b562fdf60f1d1ebe9e2bc154d0ffd56dab2d1.tar.gz
postgresql-7a6b562fdf60f1d1ebe9e2bc154d0ffd56dab2d1.zip
Apply Win32 patch from Horak Daniel.
Diffstat (limited to 'src/interfaces/ecpg/preproc/ecpg.c')
-rw-r--r--src/interfaces/ecpg/preproc/ecpg.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/interfaces/ecpg/preproc/ecpg.c b/src/interfaces/ecpg/preproc/ecpg.c
index 16cddc77b76..11ed36ef65c 100644
--- a/src/interfaces/ecpg/preproc/ecpg.c
+++ b/src/interfaces/ecpg/preproc/ecpg.c
@@ -61,7 +61,11 @@ main(int argc, char *const argv[])
switch (c)
{
case 'o':
+#ifndef __CYGWIN32__
yyout = fopen(optarg, "w");
+#else
+ yyout = fopen(optarg, "wb");
+#endif
if (yyout == NULL)
perror(optarg);
else
@@ -126,7 +130,11 @@ main(int argc, char *const argv[])
ptr2ext[1] = 'c';
ptr2ext[2] = '\0';
+#ifndef __CYGWIN32__
yyout = fopen(output_filename, "w");
+#else
+ yyout = fopen(output_filename, "wb");
+#endif
if (yyout == NULL)
{
perror(output_filename);
@@ -136,7 +144,11 @@ main(int argc, char *const argv[])
}
}
+#ifndef __CYGWIN32__
yyin = fopen(input_filename, "r");
+#else
+ yyin = fopen(input_filename, "rb");
+#endif
if (yyin == NULL)
perror(argv[fnr]);
else