pg_upgrade copy_file not needed on Win32

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема pg_upgrade copy_file not needed on Win32
Дата
Msg-id 201104240030.p3O0UNr22292@momjian.us
обсуждение исходный текст
Список pgsql-hackers
I have applied the attached patch which prevents copy_file() from being
compiled on Win32, per report from Andrew Dunstan.  copy_file() is not
used on Win32 and generates a warning.

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +
diff --git a/contrib/pg_upgrade/file.c b/contrib/pg_upgrade/file.c
new file mode 100644
index f8f7233..0552541
*** a/contrib/pg_upgrade/file.c
--- b/contrib/pg_upgrade/file.c
***************
*** 12,20 ****
  #include <fcntl.h>


- static int    copy_file(const char *fromfile, const char *tofile, bool force);

! #ifdef WIN32
  static int    win32_pghardlink(const char *src, const char *dst);
  #endif

--- 12,21 ----
  #include <fcntl.h>



! #ifndef WIN32
! static int    copy_file(const char *fromfile, const char *tofile, bool force);
! #else
  static int    win32_pghardlink(const char *src, const char *dst);
  #endif

*************** linkAndUpdateFile(pageCnvCtx *pageConver
*** 126,131 ****
--- 127,133 ----
  }


+ #ifndef WIN32
  static int
  copy_file(const char *srcfile, const char *dstfile, bool force)
  {
*************** copy_file(const char *srcfile, const cha
*** 220,225 ****
--- 222,228 ----

      return 1;
  }
+ #endif


  /*

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: pgwin32_send
Следующее
От: Jaime Casanova
Дата:
Сообщение: Re: time-delayed standbys