aboutsummaryrefslogtreecommitdiff
path: root/src/bin/initdb/initdb.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2018-09-18 17:28:27 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2018-09-18 17:28:27 -0400
commitdf8b5f3eb8a7c477156d0ad9d83e7297912cfe79 (patch)
treeeb3282a36b1febc75effa12587350d80c09b6711 /src/bin/initdb/initdb.c
parent5c07d6497d8e694e5de5a78c1e3f74e2b9790c48 (diff)
downloadpostgresql-REL_11_BETA4.tar.gz
postgresql-REL_11_BETA4.zip
Revert "Allow concurrent-safe open() and fopen() in frontend code for Windows"REL_11_BETA4
This reverts commit f02259fe93e75d5443a2fabe2f2f38b81924ab36, in the v11 branch only. The hack this required in initdb.c should probably have clued us that it wasn't really ready, but we didn't get the hint. Subsequent developments have made clear that it affected text-vs-binary behavior in a lot of places, and there's no reason to think that any of those behavioral changes are desirable. There's no time to fix this before 11beta4, so just revert for the moment. We can keep working on this in HEAD, and maybe reconsider a back-patch once we're satisfied things are stable. (I take the blame for this fiasco, having encouraged Michael to back-patch a change at the last possible moment before beta wrap.)
Diffstat (limited to 'src/bin/initdb/initdb.c')
-rw-r--r--src/bin/initdb/initdb.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c
index c94ef6305eb..ae22e7d9fb8 100644
--- a/src/bin/initdb/initdb.c
+++ b/src/bin/initdb/initdb.c
@@ -490,15 +490,7 @@ readfile(const char *path)
char *buffer;
int c;
-#ifdef WIN32
- /*
- * On Windows, we have to open the file in text mode so that carriage
- * returns are stripped.
- */
- if ((infile = fopen(path, "rt")) == NULL)
-#else
if ((infile = fopen(path, "r")) == NULL)
-#endif
{
fprintf(stderr, _("%s: could not open file \"%s\" for reading: %s\n"),
progname, path, strerror(errno));