Move src/bin/pg_verifybackup/parse_manifest.c into src/common.

This makes it possible for the code to be easily reused by other
client-side tools, and/or by the server.

Patch by me. Review of this patch in particular by at least Peter
Eisentraut; reviewers for the patch series in general include Dilip
Kumar, Andres Fruend, David Steele, Álvaro Herrera, and Jakub Wartak.

Discussion: http://postgr.es/m/CA+TgmoZ6UGZVnSy5iak6s6+AXu_DewXovDjhLs3-su6nmU_x_g@mail.gmail.com
This commit is contained in:
Robert Haas 2023-12-19 15:21:34 -05:00
parent 47f01d727e
commit aafc07c7a1
8 changed files with 8 additions and 8 deletions

View File

@ -21,7 +21,6 @@ LDFLAGS_INTERNAL += -L$(top_builddir)/src/fe_utils -lpgfeutils $(libpq_pgport)
OBJS = \
$(WIN32RES) \
parse_manifest.o \
pg_verifybackup.o
all: pg_verifybackup

View File

@ -1,7 +1,6 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
pg_verifybackup_sources = files(
'parse_manifest.c',
'pg_verifybackup.c'
)

View File

@ -1,10 +1,10 @@
# src/bin/pg_verifybackup/nls.mk
CATALOG_NAME = pg_verifybackup
GETTEXT_FILES = $(FRONTEND_COMMON_GETTEXT_FILES) \
parse_manifest.c \
pg_verifybackup.c \
../../common/fe_memutils.c \
../../common/jsonapi.c
../../common/jsonapi.c \
../../common/parse_manifest.c
GETTEXT_TRIGGERS = $(FRONTEND_COMMON_GETTEXT_TRIGGERS) \
json_manifest_parse_failure:2 \
error_cb:2 \

View File

@ -20,9 +20,9 @@
#include "common/hashfn.h"
#include "common/logging.h"
#include "common/parse_manifest.h"
#include "fe_utils/simple_list.h"
#include "getopt_long.h"
#include "parse_manifest.h"
#include "pgtime.h"
/*

View File

@ -66,6 +66,7 @@ OBJS_COMMON = \
kwlookup.o \
link-canary.o \
md5_common.o \
parse_manifest.o \
percentrepl.o \
pg_get_line.o \
pg_lzcompress.o \

View File

@ -18,6 +18,7 @@ common_sources = files(
'kwlookup.c',
'link-canary.c',
'md5_common.c',
'parse_manifest.c',
'percentrepl.c',
'pg_get_line.c',
'pg_lzcompress.c',

View File

@ -6,15 +6,15 @@
* Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* src/bin/pg_verifybackup/parse_manifest.c
* src/common/parse_manifest.c
*
*-------------------------------------------------------------------------
*/
#include "postgres_fe.h"
#include "parse_manifest.h"
#include "common/jsonapi.h"
#include "common/parse_manifest.h"
/*
* Semantic states for JSON manifest parsing.

View File

@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* src/bin/pg_verifybackup/parse_manifest.h
* src/include/common/parse_manifest.h
*
*-------------------------------------------------------------------------
*/