Remove special handling for open() in initdb for Windows
authorMichael Paquier <michael@paquier.xyz>
Thu, 20 Sep 2018 21:41:44 +0000 (06:41 +0900)
committerMichael Paquier <michael@paquier.xyz>
Thu, 20 Sep 2018 21:41:44 +0000 (06:41 +0900)
40cfe86 enforces the translation mode to text for all frontends, so this
special handling in initdb is not needed anymore.

src/bin/initdb/initdb.c

index b53d6eb9ccbabc27294fdb46f2ba63b7b85b2656..cb8c7450d9bc1d4c53a9bae390de28b2f27ffb34 100644 (file)
@@ -491,15 +491,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));