pg_win32_is_junction() was a typo for pgwin32_is_junction().  open()
was used not only in a two-argument form, which breaks on Windows,
but also where BasicOpenFile() should have been used.
Per reports from Andrew Dunstan and David Rowley.
 {
    int         fd;
 
-   fd = open(fname, O_RDONLY | PG_BINARY);
+   fd = BasicOpenFile(fname, O_RDONLY | PG_BINARY, 0);
 
    /*
     * Some OSs don't allow us to open directories at all (Windows returns
 #ifndef WIN32
        else if (S_ISLNK(fst.st_mode))
 #else
-       else if (pg_win32_is_junction(subpath))
+       else if (pgwin32_is_junction(subpath))
 #endif
        {
 #if defined(HAVE_READLINK) || defined(WIN32)