aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/odbc
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces/odbc')
-rw-r--r--src/interfaces/odbc/GNUmakefile.in6
-rw-r--r--src/interfaces/odbc/gpps.c8
-rw-r--r--src/interfaces/odbc/misc.c8
3 files changed, 21 insertions, 1 deletions
diff --git a/src/interfaces/odbc/GNUmakefile.in b/src/interfaces/odbc/GNUmakefile.in
index 64ffee8825f..0835bd53b5a 100644
--- a/src/interfaces/odbc/GNUmakefile.in
+++ b/src/interfaces/odbc/GNUmakefile.in
@@ -7,7 +7,7 @@
#
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/interfaces/odbc/Attic/GNUmakefile.in,v 1.9 1998/10/28 06:49:10 thomas Exp $
+# $Header: /cvsroot/pgsql/src/interfaces/odbc/Attic/GNUmakefile.in,v 1.10 1999/01/17 06:19:43 momjian Exp $
#
#-------------------------------------------------------------------------
@SET_MAKE@
@@ -73,7 +73,11 @@ clean:
distclean: clean
-rm -f config.h GNUmakefile Makefile.global
-rm -f config.cache config.log config.status
+ifeq ($(PORTNAME), win)
+ @if [ $SRCDIR != $ODBCSRCDIR ]; then rm -f template makefiles port; fi
+else
@if [ $SRCDIR ne $ODBCSRCDIR ]; then rm -f template makefiles port
+endif
.PHONY: standalone
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
}
diff --git a/src/interfaces/odbc/misc.c b/src/interfaces/odbc/misc.c
index 60baaa63f2d..cc31c3bdf83 100644
--- a/src/interfaces/odbc/misc.c
+++ b/src/interfaces/odbc/misc.c
@@ -71,7 +71,11 @@ char filebuf[80];
if (! LOGFP) {
generate_filename(MYLOGDIR,MYLOGFILE,filebuf);
+#ifndef __CYGWIN32__
LOGFP = fopen(filebuf, "w");
+#else
+ LOGFP = fopen(filebuf, "wb");
+#endif
globals.mylogFP = LOGFP;
setbuf(LOGFP, NULL);
}
@@ -102,7 +106,11 @@ FILE* LOGFP = globals.qlogFP;
if (! LOGFP) {
generate_filename(QLOGDIR,QLOGFILE,filebuf);
+#ifndef __CYGWIN32__
LOGFP = fopen(filebuf, "w");
+#else
+ LOGFP = fopen(filebuf, "wb");
+#endif
globals.qlogFP = LOGFP;
setbuf(LOGFP, NULL);
}