mirror of
https://github.com/postgres/postgres.git
synced 2025-07-23 03:21:12 +03:00
Apply Win32 patch from Horak Daniel.
This commit is contained in:
@ -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,
|
||||
|
Reference in New Issue
Block a user