1
0
mirror of https://github.com/postgres/postgres.git synced 2025-12-12 02:37:31 +03:00

Use standard macro for psql binary file open. Add comment explaining

control-z requirement.
This commit is contained in:
Bruce Momjian
2004-07-11 13:29:16 +00:00
parent c8c40bbc9e
commit 98e9775a3a
5 changed files with 16 additions and 21 deletions

View File

@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2003, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/bin/psql/common.h,v 1.36 2004/07/11 00:54:55 momjian Exp $
* $PostgreSQL: pgsql/src/bin/psql/common.h,v 1.37 2004/07/11 13:29:15 momjian Exp $
*/
#ifndef COMMON_H
#define COMMON_H
@@ -62,16 +62,4 @@ extern char parse_char(char **buf);
extern char *expand_tilde(char **filename);
/*
* WIN32 treats Control-Z as EOF in files opened in text mode.
* Therefore, we open files in binary mode on Win32 so we can read
* literal control-Z. The other affect is that we see CRLF, but
* that is OK because we can already handle those cleanly.
*/
#ifndef WIN32
#define R_TEXTFILE "r"
#else
#define R_TEXTFILE "rb"
#endif
#endif /* COMMON_H */