mirror of
https://github.com/postgres/postgres.git
synced 2025-11-10 17:42:29 +03:00
Apply Win32 patch from Horak Daniel.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/misc/Attic/database.c,v 1.21 1998/11/27 19:52:29 vadim Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/misc/Attic/database.c,v 1.22 1999/01/17 06:18:58 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -198,7 +198,11 @@ GetRawDatabaseInfo(char *name, int4 *owner, Oid *db_id, char *path, int *encodin
|
||||
sprintf(dbfname, "%s%cpg_database", DataDir, SEP_CHAR);
|
||||
fileflags = O_RDONLY;
|
||||
|
||||
#ifndef __CYGWIN32__
|
||||
if ((dbfd = open(dbfname, O_RDONLY, 0)) < 0)
|
||||
#else
|
||||
if ((dbfd = open(dbfname, O_RDONLY | O_BINARY, 0)) < 0)
|
||||
#endif
|
||||
elog(FATAL, "Cannot open %s", dbfname);
|
||||
|
||||
pfree(dbfname);
|
||||
|
||||
@@ -345,7 +345,11 @@ read_pg_options(SIGNAL_ARGS)
|
||||
}
|
||||
|
||||
snprintf(buffer, BUF_SIZE - 1, "%s/%s", DataDir, "pg_options");
|
||||
#ifndef __CYGWIN32__
|
||||
if ((fd = open(buffer, O_RDONLY)) < 0)
|
||||
#else
|
||||
if ((fd = open(buffer, O_RDONLY | O_BINARY)) < 0)
|
||||
#endif
|
||||
return;
|
||||
|
||||
if ((n = read(fd, buffer, BUF_SIZE - 1)) > 0)
|
||||
|
||||
Reference in New Issue
Block a user