*/
#include "rsync.h"
+#include "ifuncs.h"
extern int verbose;
extern int quiet;
*/
#include "rsync.h"
+#include "ifuncs.h"
#include "rounding.h"
#include "io.h"
* io_start_multiplex_out() and io_start_multiplex_in(). */
#include "rsync.h"
+#include "ifuncs.h"
/** If no timeout is specified then use a 60 second select timeout */
#define SELECT_TIMEOUT 60
/* TODO: Parameter to set debug level on server. */
#include "rsync.h"
+#include "ifuncs.h"
#define PTR_DIFF(p1,p2) ((ptrdiff_t)(((char *)(p1)) - (char *)(p2)))
#define strequal(a,b) (strcasecmp(a,b)==0)
#define BOOLSTR(b) ((b) ? "Yes" : "No")
*/
#include "rsync.h"
+#include "ifuncs.h"
extern int verbose;
extern int dry_run;
*/
#include "rsync.h"
+#include "ifuncs.h"
#include "io.h"
#if defined CONFIG_LOCALE && defined HAVE_LOCALE_H
#include <locale.h>
printf("#define EXTRA_ROUNDING %d\n", cnt);
return 0;
}
-
- void *_new_array(UNUSED(unsigned long num), UNUSED(unsigned int size), UNUSED(int use_calloc))
-{
- out_of_memory("");
-}
-
- void *_realloc_array(UNUSED(void *ptr), UNUSED(unsigned int size), UNUSED(unsigned long num))
-{
- out_of_memory("");
-}
-
- NORETURN void out_of_memory(UNUSED(const char *str))
-{
- fprintf(stderr, "ERROR: this function should not be called!\n");
- exit(1);
-}
*/
#include "rsync.h"
+#include "ifuncs.h"
#include <popt.h>
#include "zlib/zlib.h"
*/
#include "rsync.h"
+#include "ifuncs.h"
/* -------------------------------------------------------------------------- **
* Constants...
*/
#include "rsync.h"
+#include "ifuncs.h"
#if defined HAVE_LIBCHARSET_H && defined HAVE_LOCALE_CHARSET
#include <libcharset.h>
#elif defined HAVE_LANGINFO_H && defined HAVE_NL_LANGINFO
#ifdef MAINTAINER_MODE
const char *get_panic_action(void);
#endif
-
-static inline void
-alloc_xbuf(xbuf *xb, size_t sz)
-{
- if (!(xb->buf = new_array(char, sz)))
- out_of_memory("alloc_xbuf");
- xb->size = sz;
- xb->len = xb->pos = 0;
-}
-
-static inline void
-realloc_xbuf(xbuf *xb, size_t sz)
-{
- char *bf = realloc_array(xb->buf, char, sz);
- if (!bf)
- out_of_memory("realloc_xbuf");
- xb->buf = bf;
- xb->size = sz;
-}
-
-static inline int
-to_wire_mode(mode_t mode)
-{
-#ifdef SUPPORT_LINKS
-#if _S_IFLNK != 0120000
- if (S_ISLNK(mode))
- return (mode & ~(_S_IFMT)) | 0120000;
-#endif
-#endif
- return mode;
-}
-
-static inline mode_t
-from_wire_mode(int mode)
-{
-#if _S_IFLNK != 0120000
- if ((mode & (_S_IFMT)) == 0120000)
- return (mode & ~(_S_IFMT)) | _S_IFLNK;
-#endif
- return mode;
-}
-
-static inline int
-isDigit(const char *ptr)
-{
- return isdigit(*(unsigned char *)ptr);
-}
-
-static inline int
-isPrint(const char *ptr)
-{
- return isprint(*(unsigned char *)ptr);
-}
-
-static inline int
-isSpace(const char *ptr)
-{
- return isspace(*(unsigned char *)ptr);
-}
-
-static inline int
-isLower(const char *ptr)
-{
- return islower(*(unsigned char *)ptr);
-}
-
-static inline int
-isUpper(const char *ptr)
-{
- return isupper(*(unsigned char *)ptr);
-}
-
-static inline int
-toLower(const char *ptr)
-{
- return tolower(*(unsigned char *)ptr);
-}
-
-static inline int
-toUpper(const char *ptr)
-{
- return toupper(*(unsigned char *)ptr);
-}
* emulate it using the KAME implementation. */
#include "rsync.h"
+#include "ifuncs.h"
#include <netinet/in_systm.h>
#include <netinet/ip.h>
#include <netinet/tcp.h>
exit(1);
}
- fst->st_mode = from_wire_mode(mode);
+#if _S_IFLNK != 0120000
+ if ((mode & (_S_IFMT)) == 0120000)
+ mode = (mode & ~(_S_IFMT)) | _S_IFLNK;
+#endif
+ fst->st_mode = mode;
+
fst->st_rdev = MAKEDEV(rdev_major, rdev_minor);
fst->st_uid = uid;
fst->st_gid = gid;
return 0;
}
-
- void *_new_array(UNUSED(unsigned long num), UNUSED(unsigned int size), UNUSED(int use_calloc))
-{
- out_of_memory("");
-}
-
- void *_realloc_array(UNUSED(void *ptr), UNUSED(unsigned int size), UNUSED(unsigned long num))
-{
- out_of_memory("");
-}
-
- NORETURN void out_of_memory(UNUSED(const char *str))
-{
- fprintf(stderr, "ERROR: this function should not be called!\n");
- exit(1);
-}
*/
#include "rsync.h"
+#include "ifuncs.h"
#include "zlib/zlib.h"
extern int do_compression;
*/
#include "rsync.h"
+#include "ifuncs.h"
extern int verbose;
extern int dry_run;
*/
#include "rsync.h"
+#include "ifuncs.h"
#include "lib/sysxattrs.h"
#ifdef SUPPORT_XATTRS