mirror of
https://github.com/postgres/postgres.git
synced 2025-07-23 03:21:12 +03:00
Remove NT-specific file open defines by defining our own open macros for
"rb" and "wb".
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-lobj.c,v 1.29 2000/04/12 17:17:15 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-lobj.c,v 1.30 2000/06/02 15:57:42 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -391,11 +391,7 @@ lo_import(PGconn *conn, const 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
|
||||
fd = open(filename, O_RDONLY | PG_BINARY, 0666);
|
||||
if (fd < 0)
|
||||
{ /* error */
|
||||
printfPQExpBuffer(&conn->errorMessage,
|
||||
@ -474,11 +470,7 @@ lo_export(PGconn *conn, Oid lobjId, const 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
|
||||
fd = open(filename, O_CREAT | O_WRONLY | O_TRUNC | PG_BINARY, 0666);
|
||||
if (fd < 0)
|
||||
{ /* error */
|
||||
printfPQExpBuffer(&conn->errorMessage,
|
||||
@ -544,7 +536,7 @@ lo_initialize(PGconn *conn)
|
||||
* ----------------
|
||||
*/
|
||||
res = PQexec(conn, "select proname, oid from pg_proc \
|
||||
where proname = 'lo_open' \
|
||||
where proname = 'lo_open' \
|
||||
or proname = 'lo_close' \
|
||||
or proname = 'lo_creat' \
|
||||
or proname = 'lo_unlink' \
|
||||
|
Reference in New Issue
Block a user