From 7a6b562fdf60f1d1ebe9e2bc154d0ffd56dab2d1 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Sun, 17 Jan 1999 06:20:06 +0000 Subject: Apply Win32 patch from Horak Daniel. --- src/interfaces/odbc/gpps.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/interfaces/odbc/gpps.c') diff --git a/src/interfaces/odbc/gpps.c b/src/interfaces/odbc/gpps.c index 5cb4502c18..38a2e49928 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 } -- cgit v1.2.1