diff options
| author | Magnus Hagander <magnus@hagander.net> | 2010-05-13 15:58:15 +0000 |
|---|---|---|
| committer | Magnus Hagander <magnus@hagander.net> | 2010-05-13 15:58:15 +0000 |
| commit | 2b61b3e5074d7f55df82c199b87671334741b4e1 (patch) | |
| tree | 5afb639ce05cadba2fe2fe3aa13cd65fe8d237cd /contrib/pg_upgrade/check.c | |
| parent | f1ac08daeef0b9417b2dff801c10fcc027697453 (diff) | |
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.
Diffstat (limited to 'contrib/pg_upgrade/check.c')
| -rw-r--r-- | contrib/pg_upgrade/check.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/contrib/pg_upgrade/check.c b/contrib/pg_upgrade/check.c index 9b2a3980825..b3094534c96 100644 --- a/contrib/pg_upgrade/check.c +++ b/contrib/pg_upgrade/check.c @@ -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); } |
