cpdup - Add -F<ssh-opt>, add code to remove need for FreeBSD ports patch
[dragonfly.git] / bin / cpdup / cpdup.h
CommitLineData
3a42736d
MD
1/*
2 * CPDUP.H
3 *
975200d7 4 * $DragonFly: src/bin/cpdup/cpdup.h,v 1.9 2008/04/14 05:40:51 dillon Exp $
3a42736d
MD
5 */
6
7#include <sys/param.h>
8#include <sys/time.h>
3a42736d 9#include <sys/stat.h>
58860d7d
MD
10#include <sys/file.h>
11
3a42736d
MD
12#include <fcntl.h>
13#include <stdio.h>
14#include <stdlib.h>
15#include <stdarg.h>
71de6efc 16#include <stddef.h>
8f0e7bc1 17#include <stdint.h>
3a42736d
MD
18#include <string.h>
19#include <errno.h>
58860d7d 20#include <unistd.h>
3a42736d
MD
21#include <utime.h>
22#include <dirent.h>
23#include <signal.h>
24#include <pwd.h>
25#include <assert.h>
4d858d58 26#ifndef NOMD5
3a42736d 27#include <md5.h>
4d858d58 28#endif
a2dc574c
MD
29#if USE_PTHREADS
30#include <pthread.h>
31#endif
3a42736d 32
577109ea
MD
33void logstd(const char *ctl, ...);
34void logerr(const char *ctl, ...);
35char *mprintf(const char *ctl, ...);
36void fatal(const char *ctl, ...);
37char *fextract(FILE *fi, int n, int *pc, int skip);
38
39int fsmid_check(int64_t fsmid, const char *dpath);
40void fsmid_flush(void);
4d858d58 41#ifndef NOMD5
577109ea
MD
42int md5_check(const char *spath, const char *dpath);
43void md5_flush(void);
4d858d58 44#endif
577109ea
MD
45
46extern const char *MD5CacheFile;
47extern const char *FSMIDCacheFile;
48
49extern int SummaryOpt;
44dd1628
MD
50extern int CompressOpt;
51extern int CurParallel;
17e9c4cc
MD
52extern int RunningAsUser;
53extern int RunningAsRoot;
577109ea 54
8f0e7bc1
MD
55extern int ssh_argc;
56extern const char *ssh_argv[];
57
577109ea
MD
58extern int64_t CountSourceBytes;
59extern int64_t CountSourceItems;
60extern int64_t CountCopiedItems;
d5fdcd00
MD
61extern int64_t CountSourceReadBytes;
62extern int64_t CountTargetReadBytes;
577109ea
MD
63extern int64_t CountWriteBytes;
64extern int64_t CountRemovedItems;
3a42736d 65
a2dc574c
MD
66#if USE_PTHREADS
67extern pthread_mutex_t MasterMutex;
68#endif
975200d7
MD
69
70#ifdef DEBUG_MALLOC
71void *debug_malloc(size_t bytes, const char *file, int line);
72void debug_free(void *ptr);
73
74#define malloc(bytes) debug_malloc(bytes, __FILE__, __LINE__)
75#define free(ptr) debug_free(ptr)
76#endif