4 * $DragonFly: src/bin/cpdup/cpdup.h,v 1.9 2008/04/14 05:40:51 dillon Exp $
31 /* Solaris needs <strings.h> for bzero(), bcopy() and bcmp(). */
35 #include "compat_sun.h"
38 void logstd(const char *ctl, ...) __printflike(1, 2);
39 void logerr(const char *ctl, ...) __printflike(1, 2);
40 char *mprintf(const char *ctl, ...) __printflike(1, 2);
41 void fatal(const char *ctl, ...) __printf0like(1, 2);
42 char *fextract(FILE *fi, int n, int *pc, int skip);
44 int16_t hc_bswap16(int16_t var);
45 int32_t hc_bswap32(int32_t var);
46 int64_t hc_bswap64(int64_t var);
48 int fsmid_check(int64_t fsmid, const char *dpath);
49 void fsmid_flush(void);
51 int md5_check(const char *spath, const char *dpath);
55 extern const char *UseCpFile;
56 extern const char *MD5CacheFile;
57 extern const char *FSMIDCacheFile;
60 extern int SummaryOpt;
61 extern int CompressOpt;
62 extern int ReadOnlyOpt;
63 extern int DstRootPrivs;
66 extern const char *ssh_argv[];
68 extern int64_t CountSourceBytes;
69 extern int64_t CountSourceItems;
70 extern int64_t CountCopiedItems;
71 extern int64_t CountSourceReadBytes;
72 extern int64_t CountTargetReadBytes;
73 extern int64_t CountWriteBytes;
74 extern int64_t CountRemovedItems;
77 void *debug_malloc(size_t bytes, const char *file, int line);
78 void debug_free(void *ptr);
80 #define malloc(bytes) debug_malloc(bytes, __FILE__, __LINE__)
81 #define free(ptr) debug_free(ptr)