Обсуждение: pgsql: Move fsync routines of initdb into src/common/

Поиск
Список
Период
Сортировка

pgsql: Move fsync routines of initdb into src/common/

От
Peter Eisentraut
Дата:
Move fsync routines of initdb into src/common/

The intention is to used those in other utilities such as pg_basebackup
and pg_receivexlog.

From: Michael Paquier <michael.paquier@gmail.com>

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/bf5bb2e85b6492c7245b9446efaf43d52a98db13

Modified Files
--------------
src/bin/initdb/initdb.c         | 270 ++-------------------------------------
src/bin/initdb/nls.mk           |   2 +-
src/bin/pg_basebackup/nls.mk    |   2 +-
src/common/Makefile             |   2 +-
src/common/file_utils.c         | 276 ++++++++++++++++++++++++++++++++++++++++
src/include/common/file_utils.h |  22 ++++
src/tools/msvc/Mkvcbuild.pm     |   2 +-
7 files changed, 313 insertions(+), 263 deletions(-)


Re: pgsql: Move fsync routines of initdb into src/common/

От
Tom Lane
Дата:
Peter Eisentraut <peter_e@gmx.net> writes:
> Move fsync routines of initdb into src/common/

This patch is giving me compiler warnings.

file_utils.c: In function 'fsync_pgdata':
file_utils.c:86: warning: passing argument 2 of 'walkdir' from incompatible pointer type
file_utils.c:36: note: expected 'int (*)(const char *, bool,  const char *)' but argument is of type 'void (*)(const
char*, bool,  const char *)' 
file_utils.c:88: warning: passing argument 2 of 'walkdir' from incompatible pointer type
file_utils.c:36: note: expected 'int (*)(const char *, bool,  const char *)' but argument is of type 'void (*)(const
char*, bool,  const char *)' 
file_utils.c:89: warning: passing argument 2 of 'walkdir' from incompatible pointer type
file_utils.c:36: note: expected 'int (*)(const char *, bool,  const char *)' but argument is of type 'void (*)(const
char*, bool,  const char *)' 

gcc version 4.4.7 20120313 (Red Hat 4.4.7-17) (GCC)

            regards, tom lane