aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/sort/psort.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/backend/utils/sort/psort.c
parent298682d9e0b0ec55d5f72cec1f4d43c23f2a1ac6 (diff)
downloadpostgresql-7a6b562fdf60f1d1ebe9e2bc154d0ffd56dab2d1.tar.gz
postgresql-7a6b562fdf60f1d1ebe9e2bc154d0ffd56dab2d1.zip
Apply Win32 patch from Horak Daniel.
Diffstat (limited to 'src/backend/utils/sort/psort.c')
-rw-r--r--src/backend/utils/sort/psort.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/backend/utils/sort/psort.c b/src/backend/utils/sort/psort.c
index 76daa0351ee..09bbd877ef1 100644
--- a/src/backend/utils/sort/psort.c
+++ b/src/backend/utils/sort/psort.c
@@ -4,7 +4,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: psort.c,v 1.46 1999/01/01 04:48:49 momjian Exp $
+ * $Id: psort.c,v 1.47 1999/01/17 06:19:02 momjian Exp $
*
* NOTES
* Sorts the first relation into the second relation.
@@ -1033,8 +1033,11 @@ gettape()
StrNCpy(tp->tl_name, uniqueName, MAXPGPATH);
-
+#ifndef __CYGWIN32__
file = AllocateFile(tp->tl_name, "w+");
+#else
+ file = AllocateFile(tp->tl_name, "w+b");
+#endif
if (file == NULL)
elog(ERROR, "Open: %s in %s line %d, %s", tp->tl_name,
__FILE__, __LINE__, strerror(errno));