diff options
Diffstat (limited to 'src/interfaces/libpq')
| -rw-r--r-- | src/interfaces/libpq/Makefile.in | 9 | ||||
| -rw-r--r-- | src/interfaces/libpq/fe-connect.c | 4 | ||||
| -rw-r--r-- | src/interfaces/libpq/fe-lobj.c | 10 |
3 files changed, 19 insertions, 4 deletions
diff --git a/src/interfaces/libpq/Makefile.in b/src/interfaces/libpq/Makefile.in index 6d60876dd6..471fda1773 100644 --- a/src/interfaces/libpq/Makefile.in +++ b/src/interfaces/libpq/Makefile.in @@ -6,7 +6,7 @@ # Copyright (c) 1994, Regents of the University of California # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/interfaces/libpq/Attic/Makefile.in,v 1.41 1998/11/12 05:27:01 tgl Exp $ +# $Header: /cvsroot/pgsql/src/interfaces/libpq/Attic/Makefile.in,v 1.42 1999/01/17 06:19:34 momjian Exp $ # #------------------------------------------------------------------------- @@ -36,7 +36,11 @@ endif # If crypt is a separate library, rather than part of libc, # make sure it gets included in shared libpq. +ifeq ($(PORTNAME), win) +SHLIB_LINK+= $(findstring -lcrypt,$(LIBS)) +else SHLIB_LINK= $(findstring -lcrypt,$(LIBS)) +endif # Shared library stuff, also default 'all' target include $(SRCDIR)/Makefile.shlib @@ -139,6 +143,9 @@ beforeinstall-headers: clean: rm -f libpq.a $(shlib) $(OBJS) rm -f dllist.c common.c wchar.c conv.c +ifeq ($(PORTNAME), win) + rm -f pq.def +endif depend dep: $(CC) -MM $(CFLAGS) *.c >depend diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c index cb515be8f3..4c5f70035a 100644 --- a/src/interfaces/libpq/fe-connect.c +++ b/src/interfaces/libpq/fe-connect.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.87 1999/01/17 03:37:19 tgl Exp $ + * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.88 1999/01/17 06:19:35 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -567,7 +567,7 @@ connectDB(PGconn *conn) conn->raddr.in.sin_port = htons((unsigned short) (portno)); conn->raddr_len = sizeof(struct sockaddr_in); } -#ifndef WIN32 +#if !defined(WIN32) && !defined(__CYGWIN32__) else conn->raddr_len = UNIXSOCK_PATH(conn->raddr.un, portno); #endif diff --git a/src/interfaces/libpq/fe-lobj.c b/src/interfaces/libpq/fe-lobj.c index 19c7770f3f..7fd52737bf 100644 --- a/src/interfaces/libpq/fe-lobj.c +++ b/src/interfaces/libpq/fe-lobj.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-lobj.c,v 1.17 1998/10/01 01:40:22 tgl Exp $ + * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-lobj.c,v 1.18 1999/01/17 06:19:36 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -392,7 +392,11 @@ lo_import(PGconn *conn, char *filename) /* * open the file to be read in */ +#ifndef __CYGWIN32__ fd = open(filename, O_RDONLY, 0666); +#else + fd = open(filename, O_RDONLY | O_BINARY, 0666); +#endif if (fd < 0) { /* error */ sprintf(conn->errorMessage, @@ -467,7 +471,11 @@ lo_export(PGconn *conn, Oid lobjId, char *filename) /* * open the file to be written to */ +#ifndef __CYGWIN32__ fd = open(filename, O_CREAT | O_WRONLY | O_TRUNC, 0666); +#else + fd = open(filename, O_CREAT | O_WRONLY | O_TRUNC | O_BINARY, 0666); +#endif if (fd < 0) { /* error */ sprintf(conn->errorMessage, |
