summaryrefslogtreecommitdiff
path: root/src/backend/tcop
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/tcop')
-rw-r--r--src/backend/tcop/postgres.c11
-rw-r--r--src/backend/tcop/utility.c6
2 files changed, 14 insertions, 3 deletions
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c
index 7e5f2d66d6..eeec7b0225 100644
--- a/src/backend/tcop/postgres.c
+++ b/src/backend/tcop/postgres.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.95 1998/12/16 11:53:52 vadim Exp $
+ * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.96 1999/01/17 06:18:42 momjian Exp $
*
* NOTES
* this is the "main" module of the postgres backend and
@@ -39,6 +39,9 @@
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
+#ifdef __CYGWIN32__
+#include <getopt.h>
+#endif
#include "postgres.h"
#include "miscadmin.h"
@@ -1451,7 +1454,11 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
{
fprintf(stderr,
"Postmaster flag set: no port number specified, use /dev/null\n");
+#ifndef __CYGWIN32__
Portfd = open(NULL_DEV, O_RDWR, 0666);
+#else
+ Portfd = open(NULL_DEV, O_RDWR | O_BINARY, 0666);
+#endif
}
pq_init(Portfd);
whereToSendOutput = Remote;
@@ -1520,7 +1527,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
if (!IsUnderPostmaster)
{
puts("\nPOSTGRES backend interactive interface ");
- puts("$Revision: 1.95 $ $Date: 1998/12/16 11:53:52 $\n");
+ puts("$Revision: 1.96 $ $Date: 1999/01/17 06:18:42 $\n");
}
/* ----------------
diff --git a/src/backend/tcop/utility.c b/src/backend/tcop/utility.c
index 598fe952c4..7d9e11ba5b 100644
--- a/src/backend/tcop/utility.c
+++ b/src/backend/tcop/utility.c
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.51 1998/12/18 09:10:36 vadim Exp $
+ * $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.52 1999/01/17 06:18:44 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -620,7 +620,11 @@ ProcessUtility(Node *parsetree,
filename = stmt->filename;
closeAllVfds();
+#ifndef __CYGWIN32__
if ((fp = AllocateFile(filename, "r")) == NULL)
+#else
+ if ((fp = AllocateFile(filename, "rb")) == NULL)
+#endif
elog(ERROR, "LOAD: could not open file '%s'", filename);
FreeFile(fp);
load_file(filename);