1/*-------------------------------------------------------------------------
2 *
3 * pgtar.h
4 * Functions for manipulating tarfile datastructures (src/port/tar.c)
5 *
6 *
7 * Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group
8 * Portions Copyright (c) 1994, Regents of the University of California
9 *
10 * src/include/pgtar.h
11 *
12 *-------------------------------------------------------------------------
13 */
14
15enum tarError
16{
17 TAR_OK = 0,
18 TAR_NAME_TOO_LONG,
19 TAR_SYMLINK_TOO_LONG
20};
21
22extern enum tarError tarCreateHeader(char *h, const char *filename, const char *linktarget,
23 pgoff_t size, mode_t mode, uid_t uid, gid_t gid, time_t mtime);
24extern uint64 read_tar_number(const char *s, int len);
25extern void print_tar_number(char *s, int len, uint64 val);
26extern int tarChecksum(char *header);
27