1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-31 22:04:40 +03:00

Assorted fixes to make pg_upgrade build on MSVC.

* There is no chmod() on Windows.
* Must always use the 3-parameter version of open()
* There is no dynloader.h - but it also appears unnecessary on all platforms
* Don't include shlobj.h because it causes compile errors, and from what I can
  see it's not actually used. This may need to be added back for mingw
  and/or cygwin in the worst case.
This commit is contained in:
Magnus Hagander
2010-05-13 15:58:15 +00:00
parent f1ac08daee
commit 2b61b3e507
4 changed files with 3 additions and 5 deletions

View File

@ -427,9 +427,11 @@ create_script_for_old_cluster_deletion(migratorContext *ctx,
fclose(script);
#ifndef WIN32
if (chmod(*deletion_script_file_name, S_IRWXU) != 0)
pg_log(ctx, PG_FATAL, "Could not add execute permission to file: %s\n",
*deletion_script_file_name);
#endif
check_ok(ctx);
}