pgtar.h 752 B

12345678910111213141516171819202122232425
  1. /*-------------------------------------------------------------------------
  2. *
  3. * pgtar.h
  4. * Functions for manipulating tarfile datastructures (src/port/tar.c)
  5. *
  6. *
  7. * Portions Copyright (c) 1996-2016, 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. enum tarError
  15. {
  16. TAR_OK = 0,
  17. TAR_NAME_TOO_LONG,
  18. TAR_SYMLINK_TOO_LONG
  19. };
  20. extern enum tarError tarCreateHeader(char *h, const char *filename, const char *linktarget,
  21. pgoff_t size, mode_t mode, uid_t uid, gid_t gid, time_t mtime);
  22. extern uint64 read_tar_number(const char *s, int len);
  23. extern int tarChecksum(char *header);