aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/odbc/gpps.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/odbc/gpps.c
parent298682d9e0b0ec55d5f72cec1f4d43c23f2a1ac6 (diff)
downloadpostgresql-7a6b562fdf60f1d1ebe9e2bc154d0ffd56dab2d1.tar.gz
postgresql-7a6b562fdf60f1d1ebe9e2bc154d0ffd56dab2d1.zip
Apply Win32 patch from Horak Daniel.
Diffstat (limited to 'src/interfaces/odbc/gpps.c')
-rw-r--r--src/interfaces/odbc/gpps.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/interfaces/odbc/gpps.c b/src/interfaces/odbc/gpps.c
index 5cb4502c186..38a2e49928b 100644
--- a/src/interfaces/odbc/gpps.c
+++ b/src/interfaces/odbc/gpps.c
@@ -97,10 +97,18 @@ GetPrivateProfileString(char *theSection, // section name
/* This code makes it so that a file in the users home dir
* overrides a the "default" file as passed in
*/
+#ifndef __CYGWIN32__
aFile = (FILE*)(buf ? fopen(buf, "r") : NULL);
+#else
+ aFile = (FILE*)(buf ? fopen(buf, "rb") : NULL);
+#endif
if(!aFile) {
sprintf(buf,"%s",theIniFileName);
+#ifndef __CYGWIN32__
aFile = (FILE*)(buf ? fopen(buf, "r") : NULL);
+#else
+ aFile = (FILE*)(buf ? fopen(buf, "rb") : NULL);
+#endif
}