29 /* Solaris needs <strings.h> for bzero(), bcopy() and bcmp(). */
33 #include "compat_sun.h"
37 #define __printflike(a,b)
38 #define __printf0like(a,b)
43 void logstd(const char *ctl
, ...) __printflike(1, 2);
44 void logerr(const char *ctl
, ...) __printflike(1, 2);
45 char *mprintf(const char *ctl
, ...) __printflike(1, 2);
46 void fatal(const char *ctl
, ...) __dead2
__printf0like(1, 2);
47 char *fextract(FILE *fi
, int n
, int *pc
, int skip
);
49 int16_t hc_bswap16(int16_t var
);
50 int32_t hc_bswap32(int32_t var
);
51 int64_t hc_bswap64(int64_t var
);
53 int fsmid_check(int64_t fsmid
, const char *dpath
);
54 void fsmid_flush(void);
56 int md5_check(const char *spath
, const char *dpath
);
60 extern const char *UseCpFile
;
61 extern const char *MD5CacheFile
;
62 extern const char *FSMIDCacheFile
;
63 extern const char *UseHLPath
;
65 extern int AskConfirmation
;
69 extern int VerboseOpt
;
70 extern int DirShowOpt
;
72 extern int NotForRealOpt
;
73 extern int NoRemoveOpt
;
75 extern int UseFSMIDOpt
;
77 extern int SummaryOpt
;
78 extern int CompressOpt
;
79 extern int ReadOnlyOpt
;
80 extern int DstRootPrivs
;
81 extern int ValidateOpt
;
84 extern const char *ssh_argv
[];
86 extern int64_t CountSourceBytes
;
87 extern int64_t CountSourceItems
;
88 extern int64_t CountCopiedItems
;
89 extern int64_t CountSourceReadBytes
;
90 extern int64_t CountTargetReadBytes
;
91 extern int64_t CountWriteBytes
;
92 extern int64_t CountRemovedItems
;
93 extern int64_t CountLinkedItems
;
96 void *debug_malloc(size_t bytes
, const char *file
, int line
);
97 void debug_free(void *ptr
);
99 #define malloc(bytes) debug_malloc(bytes, __FILE__, __LINE__)
100 #define free(ptr) debug_free(ptr)