X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/eecd22ff7b041c6dc3cd5ff517aef64d2b69607c..736a6a291cf0fc9ab9410f300174a70e868e4122:/rsync.h diff --git a/rsync.h b/rsync.h index 6a663feb..72176449 100644 --- a/rsync.h +++ b/rsync.h @@ -1,7 +1,7 @@ /* Copyright (C) by Andrew Tridgell 1996, 2000 Copyright (C) Paul Mackerras 1996 - Copyright (C) 2001 by Martin Pool + Copyright (C) 2001, 2002 by Martin Pool This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -18,6 +18,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + #define False 0 #define True 1 @@ -48,7 +49,7 @@ #define SAME_TIME (1<<7) /* update this if you make incompatible changes */ -#define PROTOCOL_VERSION 25 +#define PROTOCOL_VERSION 26 /* We refuse to interoperate with versions that are not in this range. * Note that we assume we'll work with later versions: the onus is on @@ -262,17 +263,17 @@ enum logcode {FNONE=0, FERROR=1, FINFO=2, FLOG=3 }; #elif HAVE_LONGLONG #define int64 long long #else +/* As long as it gets... */ #define int64 off_t #define NO_INT64 #endif -#if HAVE_SHORT_INO_T -# define INO_T uint32 -#elif HAVE_INO_T -# define INO_T ino_t -#else -# define INO_T unsigned -#endif +/* We want to manipulate 64-bit inums. On some systems + * STRUCT_STAT.st_ino can be bigger than an ino_t depending on the + * combination of largefile feature macros. Rather than try to guess, + * we just internally store them in the largest know type. Hopefully + * it's enough. */ +#define INO_T int64 #ifndef MIN #define MIN(a,b) ((a)<(b)?(a):(b)) @@ -386,9 +387,28 @@ static inline int flist_up(struct file_list *flist, int i) } #include "byteorder.h" -#include "version.h" #include "proto.h" #include "lib/mdfour.h" +#include "lib/permstring.h" +#include "lib/addrinfo.h" + +/* We have replacement versions of these if they're missing. */ +#ifndef HAVE_ASPRINTF +int asprintf(char **ptr, const char *format, ...); +#endif + +#ifndef HAVE_VASPRINTF +int vasprintf(char **ptr, const char *format, va_list ap); +#endif + +#if !defined(HAVE_VSNPRINTF) && !defined(HAVE_C99_VSNPRINTF) +int vsnprintf (char *str, size_t count, const char *fmt, va_list args); +#endif + +#if !defined(HAVE_SNPRINTF) && !defined(HAVE_C99_VSNPRINTF) +int snprintf(char *str,size_t count,const char *fmt,...); +#endif + #if !HAVE_STRERROR extern char *sys_errlist[]; @@ -486,6 +506,13 @@ extern int errno; # define NONBLOCK_FLAG FNDELAY #endif +#ifndef INADDR_LOOPBACK +#define INADDR_LOOPBACK 0x7f000001 +#endif + +#ifndef INADDR_NONE +#define INADDR_NONE 0xffffffff +#endif #define IS_DEVICE(mode) (S_ISCHR(mode) || S_ISBLK(mode) || S_ISSOCK(mode) || S_ISFIFO(mode)) @@ -536,3 +563,12 @@ size_t strlcat(char *d, const char *s, size_t bufsize); extern int verbose; + +#ifndef HAVE_INET_NTOP +const char * +inet_ntop(int af, const void *src, char *dst, size_t size); +#endif /* !HAVE_INET_NTOP */ + +#ifndef HAVE_INET_PTON +int isc_net_pton(int af, const char *src, void *dst); +#endif