diff options
author | Bruce Momjian <bruce@momjian.us> | 2000-06-02 15:57:44 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2000-06-02 15:57:44 +0000 |
commit | cc2b5e5815aa596dbbdd288d0d178019f2d521aa (patch) | |
tree | b82baecdde9295a977c530b10f8f15a91e012cda /src/backend/commands/copy.c | |
parent | bf1c8f2b3b067c29f1abdf6fe866fb485ade96e9 (diff) | |
download | postgresql-cc2b5e5815aa596dbbdd288d0d178019f2d521aa.tar.gz postgresql-cc2b5e5815aa596dbbdd288d0d178019f2d521aa.zip |
Remove NT-specific file open defines by defining our own open macros for
"rb" and "wb".
Diffstat (limited to 'src/backend/commands/copy.c')
-rw-r--r-- | src/backend/commands/copy.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c index fe8a3223c1d..adba62242ab 100644 --- a/src/backend/commands/copy.c +++ b/src/backend/commands/copy.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.109 2000/05/30 04:25:00 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.110 2000/06/02 15:57:18 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -320,11 +320,7 @@ DoCopy(char *relname, bool binary, bool oids, bool from, bool pipe, } else { -#ifndef __CYGWIN32__ - fp = AllocateFile(filename, "r"); -#else - fp = AllocateFile(filename, "rb"); -#endif + fp = AllocateFile(filename, PG_BINARY_R); if (fp == NULL) elog(ERROR, "COPY command, running in backend with " "effective uid %d, could not open file '%s' for " @@ -355,12 +351,7 @@ DoCopy(char *relname, bool binary, bool oids, bool from, bool pipe, " COPY command."); oumask = umask((mode_t) 022); - -#ifndef __CYGWIN32__ - fp = AllocateFile(filename, "w"); -#else - fp = AllocateFile(filename, "wb"); -#endif + fp = AllocateFile(filename, PG_BINARY_W); umask(oumask); if (fp == NULL) |