diff options
author | Dylan Simon <dylan@dylex.net> | 2010-03-08 22:01:26 -0500 |
---|---|---|
committer | Michael Bestas <mkbestas@lineageos.org> | 2018-01-03 01:36:04 +0200 |
commit | 803f2a9617d97ed2fb85b7d8b6f83a9a1fe23c60 (patch) | |
tree | 44d6d0b5502c0fdc757f064af474bec88f8903ae | |
parent | 16b49716d55a50f2e985b879b720b2c53c892a3a (diff) | |
download | android_external_rsync-803f2a9617d97ed2fb85b7d8b6f83a9a1fe23c60.tar.gz android_external_rsync-803f2a9617d97ed2fb85b7d8b6f83a9a1fe23c60.tar.bz2 android_external_rsync-803f2a9617d97ed2fb85b7d8b6f83a9a1fe23c60.zip |
Android build, static config, and changesstaging/lineage-15.1lineage-15.1
Works fine on emulator both for local copies and in daemon mode. Very few changes necessary.
Change-Id: I6ef54769b00333f84eabd1306381eac80b3d5f09
proto.h update
Add LOCAL_MODULE_TAGS
Change-Id: Id972b0c0c876477cb29fcb9bb5b4a9c6be6703c0
update config.h and proto.h
Fix build with 4.3's bionic
Change-Id: I09ca525c26571d8dd492339a6763f012783531ef
Fix android compilation for 3.1.1
Change-Id: Ic8c134020beb98e1e52c4d527cbdbfe591d67262
rsync: Fix compilation for O-MR1
Change-Id: I546bbb40339cfce8fe854596fa7442fa0c08b43e
rsync: fix build after 3.1.2 rebase
Change-Id: I6fd02633db2ce15f60299174ae5b34df577195a5
revert dev_t changes
Change-Id: I947106cd86617bdc48a23a03191d491dbe4ca5ea
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | Android.mk | 80 | ||||
-rw-r--r-- | config.h | 773 | ||||
-rw-r--r-- | lib/inet_ntop.c | 2 | ||||
-rw-r--r-- | popt/poptint.h | 2 | ||||
-rw-r--r-- | proto.h | 424 | ||||
-rw-r--r-- | rounding.h | 1 |
7 files changed, 1281 insertions, 4 deletions
@@ -7,13 +7,11 @@ Makefile.old configure.sh configure.sh.old config.cache -config.h config.h.in config.h.in.old config.log config.status aclocal.m4 -/proto.h /proto.h-tstamp /rsync.1 /rsyncd.conf.5 @@ -37,7 +35,6 @@ aclocal.m4 /t_unsafe /wildtest /getfsdev -/rounding.h /doc/rsync.pdf /doc/rsync.ps /support/savetransfer diff --git a/Android.mk b/Android.mk new file mode 100644 index 00000000..f42421ac --- /dev/null +++ b/Android.mk @@ -0,0 +1,80 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := \ + flist.c \ + rsync.c \ + generator.c \ + receiver.c \ + cleanup.c \ + sender.c \ + exclude.c \ + util.c \ + util2.c \ + main.c \ + checksum.c \ + match.c \ + syscall.c \ + log.c \ + backup.c \ + delete.c \ + options.c \ + io.c \ + compat.c \ + hlink.c \ + token.c \ + uidlist.c \ + socket.c \ + hashtable.c \ + fileio.c \ + batch.c \ + clientname.c \ + chmod.c \ + acls.c \ + xattrs.c \ + progress.c \ + pipe.c \ + params.c \ + loadparm.c \ + clientserver.c \ + access.c \ + connection.c \ + authenticate.c \ + lib/wildmatch.c \ + lib/compat.c \ + lib/getpass.c \ + lib/snprintf.c \ + lib/mdfour.c \ + lib/md5.c \ + lib/permstring.c \ + lib/pool_alloc.c \ + lib/sysacls.c \ + lib/sysxattrs.c \ + lib/inet_ntop.c \ + lib/inet_pton.c \ + lib/getaddrinfo.c \ + zlib/deflate.c \ + zlib/inffast.c \ + zlib/inflate.c \ + zlib/inftrees.c \ + zlib/trees.c \ + zlib/zutil.c \ + zlib/adler32.c \ + zlib/compress.c \ + zlib/crc32.c \ + popt/findme.c \ + popt/popt.c \ + popt/poptconfig.c \ + popt/popthelp.c \ + popt/poptparse.c + +LOCAL_C_INCLUDES := $(LOCAL_PATH)/popt $(LOCAL_PATH)/zlib + +LOCAL_CFLAGS := -DHAVE_CONFIG_H + +LOCAL_MODULE := rsync +LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES) +LOCAL_MODULE_TAGS := eng + +include $(BUILD_EXECUTABLE) diff --git a/config.h b/config.h new file mode 100644 index 00000000..a611f01c --- /dev/null +++ b/config.h @@ -0,0 +1,773 @@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Define to 1 if link() can hard-link special files. */ +/* #undef CAN_HARDLINK_SPECIAL */ + +/* Define to 1 if link() can hard-link symlinks. */ +/* #undef CAN_HARDLINK_SYMLINK */ + +/* Define to 1 if chown modifies symlinks. */ +/* #undef CHOWN_MODIFIES_SYMLINK */ + +/* Undefine if you do not want locale features. By default this is defined. */ +#define CONFIG_LOCALE 1 + +/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP + systems. This function is required for `alloca.c' support on those systems. + */ +/* #undef CRAY_STACKSEG_END */ + +/* Define to 1 if using `alloca.c'. */ +/* #undef C_ALLOCA */ + +/* Define to 1 if using external zlib */ +/* #undef EXTERNAL_ZLIB */ + +/* Used to make "checker" understand that FD_ZERO() clears memory. */ +/* #undef FORCE_FD_ZERO_MEMSET */ + +/* Define to the type of elements in the array set by `getgroups'. Usually + this is either `int' or `gid_t'. */ +#define GETGROUPS_T gid_t + +/* Define to 1 if the `getpgrp' function requires zero arguments. */ +#define GETPGRP_VOID 1 + +/* Define to 1 if you have the `aclsort' function. */ +/* #undef HAVE_ACLSORT */ + +/* true if you have acl_get_perm_np */ +/* #undef HAVE_ACL_GET_PERM_NP */ + +/* Define to 1 if you have the <acl/libacl.h> header file. */ +/* #undef HAVE_ACL_LIBACL_H */ + +/* true if you have AIX ACLs */ +/* #undef HAVE_AIX_ACLS */ + +/* Define to 1 if you have `alloca', as a function or macro. */ +#define HAVE_ALLOCA 1 + +/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix). + */ +#define HAVE_ALLOCA_H 1 + +/* Define to 1 if you have the <arpa/inet.h> header file. */ +#define HAVE_ARPA_INET_H 1 + +/* Define to 1 if you have the <arpa/nameser.h> header file. */ +#define HAVE_ARPA_NAMESER_H 1 + +/* Define to 1 if you have the `asprintf' function. */ +#define HAVE_ASPRINTF 1 + +/* Define to 1 if you have the `attropen' function. */ +/* #undef HAVE_ATTROPEN */ + +/* Define to 1 if you have the <attr/xattr.h> header file. */ +/* #undef HAVE_ATTR_XATTR_H */ + +/* Define to 1 if readdir() is broken */ +/* #undef HAVE_BROKEN_READDIR */ + +/* Define to 1 if vsprintf has a C99-compatible return value */ +/* #undef HAVE_C99_VSNPRINTF */ + +/* Define to 1 if you have the `chmod' function. */ +#define HAVE_CHMOD 1 + +/* Define to 1 if you have the `chown' function. */ +#define HAVE_CHOWN 1 + +/* Define to 1 if you have the <compat.h> header file. */ +/* #undef HAVE_COMPAT_H */ + +/* Define to 1 if you have the "connect" function */ +#define HAVE_CONNECT 1 + +/* Define to 1 if you have the <ctype.h> header file. */ +#define HAVE_CTYPE_H 1 + +/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'. + */ +#define HAVE_DIRENT_H 1 + +/* Define if posix_fallocate is efficient (Cygwin) */ +/* #undef HAVE_EFFICIENT_POSIX_FALLOCATE */ + +/* Define to 1 if errno is declared in errno.h */ +#define HAVE_ERRNO_DECL 1 + +/* Define to 1 if you have the `extattr_get_link' function. */ +/* #undef HAVE_EXTATTR_GET_LINK */ + +/* Define to 1 if you have the fallocate function and it compiles and links + without error */ +#define HAVE_FALLOCATE 1 + +/* Define to 1 if you have the `fchmod' function. */ +#define HAVE_FCHMOD 1 + +/* Define to 1 if you have the <fcntl.h> header file. */ +#define HAVE_FCNTL_H 1 + +/* Define to 1 if you have the <float.h> header file. */ +#define HAVE_FLOAT_H 1 + +/* True if you have FreeBSD xattrs */ +/* #undef HAVE_FREEBSD_XATTRS */ + +/* Define to 1 if you have the `fstat' function. */ +#define HAVE_FSTAT 1 + +/* Define to 1 if you have the `ftruncate' function. */ +#define HAVE_FTRUNCATE 1 + +/* Define to 1 if you have the "getaddrinfo" function and required types. */ +#define HAVE_GETADDRINFO 1 + +/* Define to 1 if you have the `getcwd' function. */ +#define HAVE_GETCWD 1 + +/* Define to 1 if you have the `getegid' function. */ +#define HAVE_GETEGID 1 + +/* Define to 1 if you have the `geteuid' function. */ +#define HAVE_GETEUID 1 + +/* Define to 1 if you have the `getgrouplist' function. */ +#define HAVE_GETGROUPLIST 1 + +/* Define to 1 if you have the `getgroups' function. */ +#define HAVE_GETGROUPS 1 + +/* Define to 1 if you have the `getpass' function. */ +/* #undef HAVE_GETPASS */ + +/* Define to 1 if you have the `getpgrp' function. */ +#define HAVE_GETPGRP 1 + +/* Define to 1 if gettimeofday() takes a time-zone arg */ +#define HAVE_GETTIMEOFDAY_TZ 1 + +/* Define to 1 if you have the `getxattr' function. */ +#define HAVE_GETXATTR 1 + +/* Define to 1 if you have the <grp.h> header file. */ +#define HAVE_GRP_H 1 + +/* true if you have HPUX ACLs */ +/* #undef HAVE_HPUX_ACLS */ + +/* Define to 1 if you have the <iconv.h> header file. */ +/* #undef HAVE_ICONV_H */ + +/* Define to 1 if you have the `iconv_open' function. */ +/* #undef HAVE_ICONV_OPEN */ + +/* Define to 1 if the system has the type `id_t'. */ +#define HAVE_ID_T 1 + +/* Define to 1 if you have the `inet_ntop' function. */ +#define HAVE_INET_NTOP 1 + +/* Define to 1 if you have the `inet_pton' function. */ +#define HAVE_INET_PTON 1 + +/* Define to 1 if you have the `initgroups' function. */ +#define HAVE_INITGROUPS 1 + +/* Define to 1 if you have the <inttypes.h> header file. */ +#define HAVE_INTTYPES_H 1 + +/* true if you have IRIX ACLs */ +/* #undef HAVE_IRIX_ACLS */ + +/* Define to 1 if you have the <langinfo.h> header file. */ +/* #undef HAVE_LANGINFO_H */ + +/* Define to 1 if you have the `lchmod' function. */ +/* #undef HAVE_LCHMOD */ + +/* Define to 1 if you have the `lchown' function. */ +#define HAVE_LCHOWN 1 + +/* Define to 1 if you have the `acl' library (-lacl). */ +/* #undef HAVE_LIBACL */ + +/* Define to 1 if you have the `attr' library (-lattr). */ +/* #undef HAVE_LIBATTR */ + +/* Define to 1 if you have the <libcharset.h> header file. */ +/* #undef HAVE_LIBCHARSET_H */ + +/* Define to 1 if you have the `inet' library (-linet). */ +/* #undef HAVE_LIBINET */ + +/* Define to 1 if you have the `nsl' library (-lnsl). */ +/* #undef HAVE_LIBNSL */ + +/* Define to 1 if you have the `nsl_s' library (-lnsl_s). */ +/* #undef HAVE_LIBNSL_S */ + +/* Define to 1 if you have the `popt' library (-lpopt). */ +/* #undef HAVE_LIBPOPT */ + +/* Define to 1 if you have the `resolv' library (-lresolv). */ +/* #undef HAVE_LIBRESOLV */ + +/* Define to 1 if you have the `sec' library (-lsec). */ +/* #undef HAVE_LIBSEC */ + +/* Define to 1 if you have the `socket' library (-lsocket). */ +/* #undef HAVE_LIBSOCKET */ + +/* Define to 1 if you have the `z' library (-lz). */ +/* #undef HAVE_LIBZ */ + +/* Define to 1 if you have the <limits.h> header file. */ +#define HAVE_LIMITS_H 1 + +/* Define to 1 if you have the `link' function. */ +#define HAVE_LINK 1 + +/* Define to 1 if you have the <linux/falloc.h> header file. */ +#define HAVE_LINUX_FALLOC_H 1 + +/* True if you have Linux xattrs */ +#define HAVE_LINUX_XATTRS 1 + +/* Define to 1 if you have the `locale_charset' function. */ +/* #undef HAVE_LOCALE_CHARSET */ + +/* Define to 1 if you have the <locale.h> header file. */ +#define HAVE_LOCALE_H 1 + +/* Define to 1 if the type `long double' works and has more range or precision + than `double'. */ +/* #undef HAVE_LONG_DOUBLE */ + +/* Define to 1 if the type `long double' works and has more range or precision + than `double'. */ +/* #undef HAVE_LONG_DOUBLE_WIDER */ + +/* Define to 1 if you have the `lseek64' function. */ +#define HAVE_LSEEK64 1 + +/* Define to 1 if you have the `lutimes' function. */ +/* #undef HAVE_LUTIMES */ + +/* Define to 1 if you have the `mallinfo' function. */ +#define HAVE_MALLINFO 1 + +/* Define to 1 if you have the <malloc.h> header file. */ +#undef HAVE_MALLOC_H +#define HAVE_MALLOC_H 1 + +/* Define to 1 if you have the <mcheck.h> header file. */ +/* #undef HAVE_MCHECK_H */ + +/* Define to 1 if you have the `memmove' function. */ +#define HAVE_MEMMOVE 1 + +/* Define to 1 if you have the <memory.h> header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the `mkfifo' function. */ +#define HAVE_MKFIFO 1 + +/* Define to 1 if you have the `mknod' function. */ +#define HAVE_MKNOD 1 + +/* Define to 1 if you have the `mkstemp64' function. */ +#define HAVE_MKSTEMP64 1 + +/* Define to 1 if the system has the type `mode_t'. */ +#define HAVE_MODE_T 1 + +/* Define to 1 if you have the `mtrace' function. */ +/* #undef HAVE_MTRACE */ + +/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */ +/* #undef HAVE_NDIR_H */ + +/* Define to 1 if you have the <netdb.h> header file. */ +#define HAVE_NETDB_H 1 + +/* Define to 1 if you have the <netinet/in_systm.h> header file. */ +#define HAVE_NETINET_IN_SYSTM_H 1 + +/* Define to 1 if you have the <netinet/ip.h> header file. */ +#define HAVE_NETINET_IP_H 1 + +/* Define to 1 if you have the `nl_langinfo' function. */ +/* #undef HAVE_NL_LANGINFO */ + +/* Define to 1 if the system has the type `off_t'. */ +#define HAVE_OFF_T 1 + +/* Define to 1 if you have the `open64' function. */ +#define HAVE_OPEN64 1 + +/* true if you have Mac OS X ACLs */ +/* #undef HAVE_OSX_ACLS */ + +/* True if you have Mac OS X xattrs */ +/* #undef HAVE_OSX_XATTRS */ + +/* Define to 1 if the system has the type `pid_t'. */ +#define HAVE_PID_T 1 + +/* Define to 1 if you have the <popt.h> header file. */ +/* #undef HAVE_POPT_H */ + +/* Define to 1 if you have the <popt/popt.h> header file. */ +/* #undef HAVE_POPT_POPT_H */ + +/* true if you have posix ACLs */ +/* #undef HAVE_POSIX_ACLS */ + +/* Define to 1 if you have the `posix_fallocate' function. */ +#define HAVE_POSIX_FALLOCATE 1 + +/* Define to 1 if you have the `putenv' function. */ +#define HAVE_PUTENV 1 + +/* Define to 1 if you have the `readlink' function. */ +#define HAVE_READLINK 1 + +/* Define to 1 if remote shell is remsh, not rsh */ +/* #undef HAVE_REMSH */ + +/* Define to 1 if mkstemp() is available and works right */ +/* #undef HAVE_SECURE_MKSTEMP */ + +/* Define to 1 if you have the `setattrlist' function. */ +/* #undef HAVE_SETATTRLIST */ + +/* Define to 1 if you have the `seteuid' function. */ +#define HAVE_SETEUID 1 + +/* Define to 1 if you have the `setgroups' function. */ +#define HAVE_SETGROUPS 1 + +/* Define to 1 if you have the `setlocale' function. */ +#define HAVE_SETLOCALE 1 + +/* Define to 1 if you have the `setmode' function. */ +/* #undef HAVE_SETMODE */ + +/* Define to 1 if you have the `setsid' function. */ +#define HAVE_SETSID 1 + +/* Define to 1 if you have the `setvbuf' function. */ +#define HAVE_SETVBUF 1 + +/* Define to 1 if you have the `sigaction' function. */ +#define HAVE_SIGACTION 1 + +/* Define to 1 if you have the `sigprocmask' function. */ +#define HAVE_SIGPROCMASK 1 + +/* Define to 1 if the system has the type `size_t'. */ +#define HAVE_SIZE_T 1 + +/* Define to 1 if you have the `snprintf' function. */ +#define HAVE_SNPRINTF 1 + +/* Do we have sockaddr_in6.sin6_scope_id? */ +#define HAVE_SOCKADDR_IN6_SCOPE_ID 1 + +/* Do we have sockaddr_in.sin_len? */ +/* #undef HAVE_SOCKADDR_IN_LEN */ + +/* Do we have sockaddr.sa_len? */ +/* #undef HAVE_SOCKADDR_LEN */ + +/* Do we have sockaddr_un.sun_len? */ +/* #undef HAVE_SOCKADDR_UN_LEN */ + +/* Define to 1 if you have the "socketpair" function */ +/* #undef HAVE_SOCKETPAIR */ + +/* true if you have solaris ACLs */ +/* #undef HAVE_SOLARIS_ACLS */ + +/* True if you have Solaris xattrs */ +/* #undef HAVE_SOLARIS_XATTRS */ + +/* Define to 1 if you have the <stdint.h> header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the <stdlib.h> header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the `strcasecmp' function. */ +#define HAVE_STRCASECMP 1 + +/* Define to 1 if you have the `strchr' function. */ +#define HAVE_STRCHR 1 + +/* Define to 1 if you have the `strdup' function. */ +#define HAVE_STRDUP 1 + +/* Define to 1 if you have the `strerror' function. */ +#define HAVE_STRERROR 1 + +/* Define to 1 if you have the `strftime' function. */ +#define HAVE_STRFTIME 1 + +/* Define to 1 if you have the <strings.h> header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the <string.h> header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strlcat' function. */ +#define HAVE_STRLCAT 1 + +/* Define to 1 if you have the `strlcpy' function. */ +#define HAVE_STRLCPY 1 + +/* Define to 1 if you have the `strpbrk' function. */ +#define HAVE_STRPBRK 1 + +/* Define to 1 if you have the `strtol' function. */ +#define HAVE_STRTOL 1 + +/* Define to 1 if the system has the type `struct addrinfo'. */ +#define HAVE_STRUCT_ADDRINFO 1 + +/* Define to 1 if the system has the type `struct sockaddr_storage'. */ +#define HAVE_STRUCT_SOCKADDR_STORAGE 1 + +/* Define to 1 if the system has the type `struct stat64'. */ +#define HAVE_STRUCT_STAT64 1 + +/* Define to 1 if `st_mtimensec' is a member of `struct stat'. */ +#define HAVE_STRUCT_STAT_ST_MTIMENSEC 1 + +/* Define to 1 if `st_mtim.tv_nsec' is a member of `struct stat'. */ +/* #undef HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC */ + +/* Define to 1 if `st_rdev' is a member of `struct stat'. */ +#define HAVE_STRUCT_STAT_ST_RDEV 1 + +/* Define to 1 if you have the "struct utimbuf" type */ +#define HAVE_STRUCT_UTIMBUF 1 + +/* Define to 1 if you have the <sys/acl.h> header file. */ +/* #undef HAVE_SYS_ACL_H */ + +/* Define to 1 if you have the <sys/attr.h> header file. */ +/* #undef HAVE_SYS_ATTR_H */ + +/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'. + */ +/* #undef HAVE_SYS_DIR_H */ + +/* Define to 1 if you have the <sys/extattr.h> header file. */ +/* #undef HAVE_SYS_EXTATTR_H */ + +/* Define to 1 if you have the SYS_fallocate syscall number */ +#define HAVE_SYS_FALLOCATE 1 + +/* Define to 1 if you have the <sys/fcntl.h> header file. */ +/* #undef HAVE_SYS_FCNTL_H */ + +/* Define to 1 if you have the <sys/filio.h> header file. */ +/* #undef HAVE_SYS_FILIO_H */ + +/* Define to 1 if you have the <sys/ioctl.h> header file. */ +#define HAVE_SYS_IOCTL_H 1 + +/* Define to 1 if you have the <sys/mode.h> header file. */ +/* #undef HAVE_SYS_MODE_H */ + +/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'. + */ +/* #undef HAVE_SYS_NDIR_H */ + +/* Define to 1 if you have the <sys/param.h> header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the <sys/select.h> header file. */ +#define HAVE_SYS_SELECT_H 1 + +/* Define to 1 if you have the <sys/socket.h> header file. */ +#define HAVE_SYS_SOCKET_H 1 + +/* Define to 1 if you have the <sys/stat.h> header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the <sys/time.h> header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the <sys/types.h> header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the <sys/unistd.h> header file. */ +/* #undef HAVE_SYS_UNISTD_H */ + +/* Define to 1 if you have the <sys/un.h> header file. */ +#define HAVE_SYS_UN_H 1 + +/* Define to 1 if you have the <sys/wait.h> header file. */ +#define HAVE_SYS_WAIT_H 1 + +/* Define to 1 if you have the <sys/xattr.h> header file. */ +#define HAVE_SYS_XATTR_H 1 + +/* Define to 1 if you have the `tcgetpgrp' function. */ +#define HAVE_TCGETPGRP 1 + +/* true if you have Tru64 ACLs */ +/* #undef HAVE_TRU64_ACLS */ + +/* Define to 1 if you have the <unistd.h> header file. */ +#define HAVE_UNISTD_H 1 + +/* true if you have UnixWare ACLs */ +/* #undef HAVE_UNIXWARE_ACLS */ + +/* Define to 1 if you have the `utime' function. */ +#define HAVE_UTIME 1 + +/* Define to 1 if you have the `utimensat' function. */ +#define HAVE_UTIMENSAT 1 + +/* Define to 1 if you have the `utimes' function. */ +#define HAVE_UTIMES 1 + +/* Define to 1 if you have the <utime.h> header file. */ +#define HAVE_UTIME_H 1 + +/* Define to 1 if `utime(file, NULL)' sets file's timestamp to the present. */ +#define HAVE_UTIME_NULL 1 + +/* Define to 1 if you have the `vasprintf' function. */ +#define HAVE_VASPRINTF 1 + +/* Define to 1 if you have the `va_copy' function. */ +/* #undef HAVE_VA_COPY */ + +/* Define to 1 if you have the `vsnprintf' function. */ +#define HAVE_VSNPRINTF 1 + +/* Define to 1 if you have the `wait4' function. */ +#define HAVE_WAIT4 1 + +/* Define to 1 if you have the `waitpid' function. */ +#define HAVE_WAITPID 1 + +/* Define to 1 if you have the <zlib.h> header file. */ +#define HAVE_ZLIB_H 1 + +/* Define to 1 if you have the `_acl' function. */ +/* #undef HAVE__ACL */ + +/* Define to 1 if you have the `_facl' function. */ +/* #undef HAVE__FACL */ + +/* Define to 1 if you have the `__acl' function. */ +/* #undef HAVE___ACL */ + +/* Define to 1 if you have the `__facl' function. */ +/* #undef HAVE___FACL */ + +/* Define to 1 if you have the `__va_copy' function. */ +/* #undef HAVE___VA_COPY */ + +/* Define as const if the declaration of iconv() needs const. */ +#define ICONV_CONST const + +/* Define if you want the --iconv option. Specifing a value will set the + default iconv setting (a NULL means no --iconv processing by default). */ +/* #undef ICONV_OPTION */ + +/* true if you have IPv6 */ +/* #undef INET6 */ + +/* Define to 1 if `major', `minor', and `makedev' are declared in <mkdev.h>. + */ +/* #undef MAJOR_IN_MKDEV */ + +/* Define to 1 if `major', `minor', and `makedev' are declared in + <sysmacros.h>. */ +#define MAJOR_IN_SYSMACROS 1 + +/* Define to 1 if makedev() takes 3 args */ +/* #undef MAKEDEV_TAKES_3_ARGS */ + +/* Define to 1 if mknod() can create FIFOs. */ +/* #undef MKNOD_CREATES_FIFOS */ + +/* Define to 1 if mknod() can create sockets. */ +/* #undef MKNOD_CREATES_SOCKETS */ + +/* unprivileged group for unprivileged user */ +#define NOBODY_GROUP "nogroup" + +/* unprivileged user--e.g. nobody */ +#define NOBODY_USER "nobody" + +/* True if device files do not support xattrs */ +/* #undef NO_DEVICE_XATTRS */ + +/* True if special files do not support xattrs */ +/* #undef NO_SPECIAL_XATTRS */ + +/* True if symlinks do not support user xattrs */ +#define NO_SYMLINK_USER_XATTRS 1 + +/* True if symlinks do not support xattrs */ +/* #undef NO_SYMLINK_XATTRS */ + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "" + +/* location of configuration file for rsync server */ +#define RSYNCD_SYSCONF "/etc/rsyncd.conf" + +/* location of rsync on remote machine */ +#define RSYNC_PATH "rsync" + +/* default -e command */ +#define RSYNC_RSH "ssh" + +/* Define to 1 if --protected-args should be the default */ +/* #undef RSYNC_USE_PROTECTED_ARGS */ + +/* rsync release version */ +#define RSYNC_VERSION "3.1.2" + +/* Define to 1 if sockets need to be shutdown */ +/* #undef SHUTDOWN_ALL_SOCKETS */ + +/* Define to 1 if "signed char" is a valid type */ +#define SIGNED_CHAR_OK 1 + +/* The size of `int', as computed by sizeof. */ +#define SIZEOF_INT 4 + +/* The size of `int16_t', as computed by sizeof. */ +#define SIZEOF_INT16_T 2 + +/* The size of `int32_t', as computed by sizeof. */ +#define SIZEOF_INT32_T 4 + +/* The size of `int64_t', as computed by sizeof. */ +#define SIZEOF_INT64_T 8 + +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 4 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 + +/* The size of `off64_t', as computed by sizeof. */ +#define SIZEOF_OFF64_T 8 + +/* The size of `off_t', as computed by sizeof. */ +#define SIZEOF_OFF_T 4 + +/* The size of `short', as computed by sizeof. */ +#define SIZEOF_SHORT 2 + +/* The size of `time_t', as computed by sizeof. */ +#define SIZEOF_TIME_T 4 + +/* The size of `uint16_t', as computed by sizeof. */ +#define SIZEOF_UINT16_T 2 + +/* The size of `uint32_t', as computed by sizeof. */ +#define SIZEOF_UINT32_T 4 + +/* If using the C implementation of alloca, define if you know the + direction of stack growth for your system; otherwise it will be + automatically deduced at runtime. + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown */ +/* #undef STACK_DIRECTION */ + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define to 1 to add support for ACLs */ +/* #undef SUPPORT_ACLS */ + +/* Define to 1 to add support for extended attributes */ +#define SUPPORT_XATTRS 1 + +/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */ +#define TIME_WITH_SYS_TIME 1 + +/* Define to 1 if you want rsync to make use of iconv_open() */ +/* #undef USE_ICONV_OPEN */ + +/* String to pass to iconv() for the UTF-8 charset. */ +/* #undef UTF8_CHARSET */ + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +/* # undef WORDS_BIGENDIAN */ +# endif +#endif + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define _GNU_SOURCE so that we get all necessary prototypes */ +#define _GNU_SOURCE 1 + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to `int' if <sys/types.h> doesn't define. */ +/* #undef gid_t */ + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +/* #undef inline */ +#endif + +/* Define to `unsigned int' if <sys/types.h> does not define. */ +/* #undef size_t */ + +/* type to use in place of socklen_t if not defined */ +/* #undef socklen_t */ + +/* Define to `int' if <sys/types.h> doesn't define. */ +/* #undef uid_t */ diff --git a/lib/inet_ntop.c b/lib/inet_ntop.c index 7be7368e..c51175ff 100644 --- a/lib/inet_ntop.c +++ b/lib/inet_ntop.c @@ -43,7 +43,7 @@ static const char *inet_ntop6(const unsigned char *src, char *dst, * Paul Vixie, 1996. */ const char * -inet_ntop(int af, const void *src, char *dst, size_t size) +inet_ntop(int af, const void *src, char *dst, socklen_t size) { switch (af) { case AF_INET: diff --git a/popt/poptint.h b/popt/poptint.h index bec7c976..9c11c836 100644 --- a/popt/poptint.h +++ b/popt/poptint.h @@ -9,6 +9,8 @@ #ifndef H_POPTINT #define H_POPTINT +#include <stdlib.h> + /** * Wrapper to free(3), hides const compilation noise, permit NULL, return NULL. * @param p memory to free diff --git a/proto.h b/proto.h new file mode 100644 index 00000000..24253958 --- /dev/null +++ b/proto.h @@ -0,0 +1,424 @@ +/* This file is automatically generated with "make proto". DO NOT EDIT */ + +int allow_access(const char *addr, const char **host_ptr, int i); +void free_acl(stat_x *sxp); +int get_acl(const char *fname, stat_x *sxp); +void send_acl(int f, stat_x *sxp); +void receive_acl(int f, struct file_struct *file); +void cache_tmp_acl(struct file_struct *file, stat_x *sxp); +void uncache_tmp_acls(void); +int set_acl(const char *fname, const struct file_struct *file, stat_x *sxp, mode_t new_mode); +void match_acl_ids(void); +int default_perms_for_dir(const char *dir); +void base64_encode(const char *buf, int len, char *out, int pad); +char *auth_server(int f_in, int f_out, int module, const char *host, + const char *addr, const char *leader); +void auth_client(int fd, const char *user, const char *challenge); +char *get_backup_name(const char *fname); +int make_backup(const char *fname, BOOL prefer_rename); +void write_stream_flags(int fd); +void read_stream_flags(int fd); +void check_batch_flags(void); +void write_batch_shell_file(int argc, char *argv[], int file_arg_cnt); +uint32 get_checksum1(char *buf1, int32 len); +void get_checksum2(char *buf, int32 len, char *sum); +void file_checksum(const char *fname, const STRUCT_STAT *st_p, char *sum); +void sum_init(int seed); +void sum_update(const char *p, int32 len); +int sum_end(char *sum); +struct chmod_mode_struct *parse_chmod(const char *modestr, + struct chmod_mode_struct **root_mode_ptr); +int tweak_mode(int mode, struct chmod_mode_struct *chmod_modes); +int free_chmod_mode(struct chmod_mode_struct *chmod_modes); +void close_all(void); +NORETURN void _exit_cleanup(int code, const char *file, int line); +void cleanup_disable(void); +void cleanup_set(const char *fnametmp, const char *fname, struct file_struct *file, + int fd_r, int fd_w); +void cleanup_set_pid(pid_t pid); +char *client_addr(int fd); +char *client_name(int fd); +void client_sockaddr(int fd, + struct sockaddr_storage *ss, + socklen_t *ss_len); +int lookup_name(int fd, const struct sockaddr_storage *ss, + socklen_t ss_len, + char *name_buf, size_t name_buf_size, + char *port_buf, size_t port_buf_size); +int compare_addrinfo_sockaddr(const struct addrinfo *ai, + const struct sockaddr_storage *ss); +int check_name(int fd, + const struct sockaddr_storage *ss, + char *name_buf, size_t name_buf_size); +int start_socket_client(char *host, int remote_argc, char *remote_argv[], + int argc, char *argv[]); +int start_inband_exchange(int f_in, int f_out, const char *user, int argc, char *argv[]); +int start_daemon(int f_in, int f_out); +int daemon_main(void); +void set_allow_inc_recurse(void); +void setup_protocol(int f_out,int f_in); +int claim_connection(char *fname, int max_connections); +enum delret delete_item(char *fbuf, uint16 mode, uint16 flags); +uint16 get_del_for_flag(uint16 mode); +void set_filter_dir(const char *dir, unsigned int dirlen); +void *push_local_filters(const char *dir, unsigned int dirlen); +void pop_local_filters(void *mem); +void change_local_filter_dir(const char *dname, int dlen, int dir_depth); +int check_filter(filter_rule_list *listp, enum logcode code, + const char *name, int name_is_dir); +const filter_rule *rule_template(uint32 rflags); +void parse_filter_str(filter_rule_list *listp, const char *rulestr, + const filter_rule *template, int xflags); +void parse_filter_file(filter_rule_list *listp, const char *fname, const filter_rule *template, int xflags); +char *get_rule_prefix(filter_rule *rule, const char *pat, int for_xfer, + unsigned int *plen_ptr); +void send_filter_list(int f_out); +void recv_filter_list(int f_in); +int sparse_end(int f, OFF_T size); +int flush_write_file(int f); +int write_file(int f, char *buf, int len); +struct map_struct *map_file(int fd, OFF_T len, int32 read_size, int32 blk_size); +char *map_ptr(struct map_struct *map, OFF_T offset, int32 len); +int unmap_file(struct map_struct *map); +void init_flist(void); +void show_flist_stats(void); +int link_stat(const char *path, STRUCT_STAT *stp, int follow_dirlinks); +int change_pathname(struct file_struct *file, const char *dir, int dirlen); +struct file_struct *make_file(const char *fname, struct file_list *flist, + STRUCT_STAT *stp, int flags, int filter_level); +void unmake_file(struct file_struct *file); +void send_extra_file_list(int f, int at_least); +struct file_list *send_file_list(int f, int argc, char *argv[]); +struct file_list *recv_file_list(int f, int dir_ndx); +void recv_additional_file_list(int f); +int flist_find(struct file_list *flist, struct file_struct *f); +int flist_find_name(struct file_list *flist, const char *fname, int want_dir_match); +int flist_find_ignore_dirness(struct file_list *flist, struct file_struct *f); +void clear_file(struct file_struct *file); +struct file_list *flist_new(int flags, char *msg); +void flist_free(struct file_list *flist); +int f_name_cmp(const struct file_struct *f1, const struct file_struct *f2); +int f_name_has_prefix(const struct file_struct *f1, const struct file_struct *f2); +char *f_name_buf(void); +char *f_name(const struct file_struct *f, char *fbuf); +struct file_list *get_dirlist(char *dirname, int dlen, int flags); +int unchanged_attrs(const char *fname, struct file_struct *file, stat_x *sxp); +void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statret, + stat_x *sxp, int32 iflags, uchar fnamecmp_type, + const char *xname); +int unchanged_file(char *fn, struct file_struct *file, STRUCT_STAT *st); +int atomic_create(struct file_struct *file, char *fname, const char *slnk, const char *hlnk, + dev_t rdev, stat_x *sxp, int del_for_flag); +void check_for_finished_files(int itemizing, enum logcode code, int check_redo); +void generate_files(int f_out, const char *local_name); +struct hashtable *hashtable_create(int size, int key64); +void hashtable_destroy(struct hashtable *tbl); +void *hashtable_find(struct hashtable *tbl, int64 key, int allocate_if_missing); +void init_hard_links(void); +struct ht_int64_node *idev_find(int64 dev, int64 ino); +void idev_destroy(void); +void match_hard_links(struct file_list *flist); +int hard_link_check(struct file_struct *file, int ndx, char *fname, + int statret, stat_x *sxp, int itemizing, + enum logcode code); +int hard_link_one(struct file_struct *file, const char *fname, + const char *oldname, int terse); +void finish_hard_link(struct file_struct *file, const char *fname, int fin_ndx, + STRUCT_STAT *stp, int itemizing, enum logcode code, + int alt_dest); +int skip_hard_link(struct file_struct *file, struct file_list **flist_p); +void reduce_iobuf_size(xbuf *out, size_t new_size); +void restore_iobuf_size(xbuf *out); +void noop_io_until_death(void); +int send_msg(enum msgcode code, const char *buf, size_t len, int convert); +void send_msg_int(enum msgcode code, int num); +void io_set_sock_fds(int f_in, int f_out); +void set_io_timeout(int secs); +void increment_active_files(int ndx, int itemizing, enum logcode code); +int get_redo_num(void); +int get_hlink_num(void); +void start_filesfrom_forwarding(int fd); +int read_line(int fd, char *buf, size_t bufsiz, int flags); +void read_args(int f_in, char *mod_name, char *buf, size_t bufsiz, int rl_nulls, + char ***argv_p, int *argc_p, char **request_p); +BOOL io_start_buffering_out(int f_out); +BOOL io_start_buffering_in(int f_in); +void io_end_buffering_in(BOOL free_buffers); +void io_end_buffering_out(BOOL free_buffers); +void maybe_flush_socket(int important); +void maybe_send_keepalive(time_t now, int flags); +void start_flist_forward(int ndx); +void stop_flist_forward(void); +void wait_for_receiver(void); +unsigned short read_shortint(int f); +int32 read_int(int f); +int32 read_varint(int f); +int64 read_varlong(int f, uchar min_bytes); +int64 read_longint(int f); +void read_buf(int f, char *buf, size_t len); +void read_sbuf(int f, char *buf, size_t len); +uchar read_byte(int f); +int read_vstring(int f, char *buf, int bufsize); +void read_sum_head(int f, struct sum_struct *sum); +void write_sum_head(int f, struct sum_struct *sum); +void io_flush(int flush_it_all); +void write_shortint(int f, unsigned short x); +void write_int(int f, int32 x); +void write_varint(int f, int32 x); +void write_varlong(int f, int64 x, uchar min_bytes); +void write_longint(int f, int64 x); +void write_bigbuf(int f, const char *buf, size_t len); +void write_buf(int f, const char *buf, size_t len); +void write_sbuf(int f, const char *buf); +void write_byte(int f, uchar c); +void write_vstring(int f, const char *str, int len); +void write_ndx(int f, int32 ndx); +int32 read_ndx(int f); +int read_line_old(int fd, char *buf, size_t bufsiz, int eof_ok); +void io_printf(int fd, const char *format, ...); +void io_start_multiplex_out(int fd); +void io_start_multiplex_in(int fd); +int io_end_multiplex_in(int mode); +int io_end_multiplex_out(int mode); +void start_write_batch(int fd); +void stop_write_batch(void); +char *lp_bind_address(void); +char *lp_motd_file(void); +char *lp_pid_file(void); +char *lp_socket_options(void); +int lp_listen_backlog(void); +int lp_rsync_port(void); +char *lp_auth_users(int module_id); +char *lp_charset(int module_id); +char *lp_comment(int module_id); +char *lp_dont_compress(int module_id); +char *lp_exclude(int module_id); +char *lp_exclude_from(int module_id); +char *lp_filter(int module_id); +char *lp_gid(int module_id); +char *lp_hosts_allow(int module_id); +char *lp_hosts_deny(int module_id); +char *lp_include(int module_id); +char *lp_include_from(int module_id); +char *lp_incoming_chmod(int module_id); +char *lp_lock_file(int module_id); +char *lp_log_file(int module_id); +char *lp_log_format(int module_id); +char *lp_name(int module_id); +char *lp_outgoing_chmod(int module_id); +char *lp_path(int module_id); +char *lp_postxfer_exec(int module_id); +char *lp_prexfer_exec(int module_id); +char *lp_refuse_options(int module_id); +char *lp_secrets_file(int module_id); +char *lp_temp_dir(int module_id); +char *lp_uid(int module_id); +int lp_max_connections(int module_id); +int lp_max_verbosity(int module_id); +int lp_syslog_facility(int module_id); +int lp_timeout(int module_id); +BOOL lp_fake_super(int module_id); +BOOL lp_forward_lookup(int module_id); +BOOL lp_ignore_errors(int module_id); +BOOL lp_ignore_nonreadable(int module_id); +BOOL lp_list(int module_id); +BOOL lp_munge_symlinks(int module_id); +BOOL lp_numeric_ids(int module_id); +BOOL lp_read_only(int module_id); +BOOL lp_reverse_lookup(int module_id); +BOOL lp_strict_modes(int module_id); +BOOL lp_transfer_logging(int module_id); +BOOL lp_use_chroot(int module_id); +BOOL lp_write_only(int module_id); +int lp_load(char *pszFname, int globals_only); +BOOL set_dparams(int syntax_check_only); +int lp_num_modules(void); +int lp_number(char *name); +void log_init(int restart); +void logfile_close(void); +void logfile_reopen(void); +void rwrite(enum logcode code, const char *buf, int len, int is_utf8); +void rprintf(enum logcode code, const char *format, ...); +void rsyserr(enum logcode code, int errcode, const char *format, ...); +void rflush(enum logcode code); +void remember_initial_stats(void); +int log_format_has(const char *format, char esc); +void log_item(enum logcode code, struct file_struct *file, int iflags, const char *hlink); +void maybe_log_item(struct file_struct *file, int iflags, int itemizing, + const char *buf); +void log_delete(const char *fname, int mode); +void log_exit(int code, const char *file, int line); +pid_t wait_process(pid_t pid, int *status_ptr, int flags); +void write_del_stats(int f); +void read_del_stats(int f); +int child_main(int argc, char *argv[]); +void start_server(int f_in, int f_out, int argc, char *argv[]); +int client_run(int f_in, int f_out, pid_t pid, int argc, char *argv[]); +void remember_children(UNUSED(int val)); +const char *get_panic_action(void); +int main(int argc,char *argv[]); +void match_sums(int f, struct sum_struct *s, struct map_struct *buf, OFF_T len); +void match_report(void); +void limit_output_verbosity(int level); +void reset_output_levels(void); +void negate_output_levels(void); +void usage(enum logcode F); +void option_error(void); +int parse_arguments(int *argc_p, const char ***argv_p); +void server_options(char **args, int *argc_p); +char *check_for_hostspec(char *s, char **host_ptr, int *port_ptr); +int pm_process( char *FileName, + BOOL (*sfunc)(char *), + BOOL (*pfunc)(char *, char *) ); +pid_t piped_child(char **command, int *f_in, int *f_out); +pid_t local_child(int argc, char **argv, int *f_in, int *f_out, + int (*child_main)(int, char*[])); +void set_current_file_index(struct file_struct *file, int ndx); +void end_progress(OFF_T size); +void show_progress(OFF_T ofs, OFF_T size); +int get_tmpname(char *fnametmp, const char *fname, BOOL make_unique); +int open_tmpfile(char *fnametmp, const char *fname, struct file_struct *file); +int recv_files(int f_in, int f_out, char *local_name); +void setup_iconv(void); +int iconvbufs(iconv_t ic, xbuf *in, xbuf *out, int flags); +void send_protected_args(int fd, char *args[]); +int read_ndx_and_attrs(int f_in, int f_out, int *iflag_ptr, uchar *type_ptr, + char *buf, int *len_ptr); +void free_sums(struct sum_struct *s); +mode_t dest_mode(mode_t flist_mode, mode_t stat_mode, int dflt_perms, + int exists); +int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp, + const char *fnamecmp, int flags); +void sig_int(int sig_num); +int finish_transfer(const char *fname, const char *fnametmp, + const char *fnamecmp, const char *partialptr, + struct file_struct *file, int ok_to_set_time, + int overwriting_basis); +struct file_list *flist_for_ndx(int ndx, const char *fatal_error_loc); +const char *who_am_i(void); +void successful_send(int ndx); +void send_files(int f_in, int f_out); +int try_bind_local(int s, int ai_family, int ai_socktype, + const char *bind_addr); +int open_socket_out(char *host, int port, const char *bind_addr, + int af_hint); +int open_socket_out_wrapped(char *host, int port, const char *bind_addr, + int af_hint); +int is_a_socket(int fd); +void start_accept_loop(int port, int (*fn)(int, int)); +void set_socket_options(int fd, char *options); +int do_unlink(const char *fname); +int do_symlink(const char *lnk, const char *fname); +ssize_t do_readlink(const char *path, char *buf, size_t bufsiz); +int do_link(const char *fname1, const char *fname2); +int do_lchown(const char *path, uid_t owner, gid_t group); +int do_mknod(const char *pathname, mode_t mode, dev_t dev); +int do_rmdir(const char *pathname); +int do_open(const char *pathname, int flags, mode_t mode); +int do_chmod(const char *path, mode_t mode); +int do_rename(const char *fname1, const char *fname2); +int do_ftruncate(int fd, OFF_T size); +void trim_trailing_slashes(char *name); +int do_mkdir(char *fname, mode_t mode); +int do_mkstemp(char *template, mode_t perms); +int do_stat(const char *fname, STRUCT_STAT *st); +int do_lstat(const char *fname, STRUCT_STAT *st); +int do_fstat(int fd, STRUCT_STAT *st); +OFF_T do_lseek(int fd, OFF_T offset, int whence); +int do_utimensat(const char *fname, time_t modtime, uint32 mod_nsec); +int do_lutimes(const char *fname, time_t modtime, uint32 mod_nsec); +int do_utimes(const char *fname, time_t modtime, uint32 mod_nsec); +int do_utime(const char *fname, time_t modtime, UNUSED(uint32 mod_nsec)); +int do_fallocate(int fd, OFF_T offset, OFF_T length); +int do_open_nofollow(const char *pathname, int flags); +void set_compression(const char *fname); +void send_token(int f, int32 token, struct map_struct *buf, OFF_T offset, + int32 n, int32 toklen); +int32 recv_token(int f, char **data); +void see_token(char *data, int32 toklen); +char *uid_to_user(uid_t uid); +char *gid_to_group(gid_t gid); +int user_to_uid(const char *name, uid_t *uid_p, BOOL num_ok); +int group_to_gid(const char *name, gid_t *gid_p, BOOL num_ok); +uid_t match_uid(uid_t uid); +gid_t match_gid(gid_t gid, uint16 *flags_ptr); +const char *add_uid(uid_t uid); +const char *add_gid(gid_t gid); +void send_id_list(int f); +uid_t recv_user_name(int f, uid_t uid); +gid_t recv_group_name(int f, gid_t gid, uint16 *flags_ptr); +void recv_id_list(int f, struct file_list *flist); +void parse_name_map(char *map, BOOL usernames); +const char *getallgroups(uid_t uid, item_list *gid_list); +void set_nonblocking(int fd); +void set_blocking(int fd); +int fd_pair(int fd[2]); +void print_child_argv(const char *prefix, char **cmd); +int set_modtime(const char *fname, time_t modtime, uint32 mod_nsec, mode_t mode); +int make_path(char *fname, int flags); +int full_write(int desc, const char *ptr, size_t len); +int copy_file(const char *source, const char *dest, int ofd, mode_t mode); +int robust_unlink(const char *fname); +int robust_rename(const char *from, const char *to, const char *partialptr, + int mode); +pid_t do_fork(void); +void kill_all(int sig); +int lock_range(int fd, int offset, int len); +int glob_expand(const char *arg, char ***argv_p, int *argc_p, int *maxargs_p); +void glob_expand_module(char *base1, char *arg, char ***argv_p, int *argc_p, int *maxargs_p); +void strlower(char *s); +size_t pathjoin(char *dest, size_t destsize, const char *p1, const char *p2); +size_t stringjoin(char *dest, size_t destsize, ...); +int count_dir_elements(const char *p); +int clean_fname(char *name, int flags); +char *sanitize_path(char *dest, const char *p, const char *rootdir, int depth, + int flags); +int change_dir(const char *dir, int set_path_only); +char *normalize_path(char *path, BOOL force_newbuf, unsigned int *len_ptr); +char *full_fname(const char *fn); +char *partial_dir_fname(const char *fname); +int handle_partial_dir(const char *fname, int create); +int unsafe_symlink(const char *dest, const char *src); +char *timestring(time_t t); +int cmp_time(time_t file1, time_t file2); +int _Insure_trap_error(int a1, int a2, int a3, int a4, int a5, int a6); +const char *find_filename_suffix(const char *fn, int fn_len, int *len_ptr); +uint32 fuzzy_distance(const char *s1, unsigned len1, const char *s2, unsigned len2); +struct bitbag *bitbag_create(int max_ndx); +void bitbag_set_bit(struct bitbag *bb, int ndx); +void bitbag_clear_bit(struct bitbag *bb, int ndx); +int bitbag_check_bit(struct bitbag *bb, int ndx); +int bitbag_next_bit(struct bitbag *bb, int after); +void flist_ndx_push(flist_ndx_list *lp, int ndx); +int flist_ndx_pop(flist_ndx_list *lp); +void *expand_item_list(item_list *lp, size_t item_size, + const char *desc, int incr); +int msleep(int t); +void *_new_array(unsigned long num, unsigned int size, int use_calloc); +void *_realloc_array(void *ptr, unsigned int size, size_t num); +const char *sum_as_hex(const char *sum); +NORETURN void out_of_memory(const char *str); +NORETURN void overflow_exit(const char *str); +void free_xattr(stat_x *sxp); +int get_xattr(const char *fname, stat_x *sxp); +int copy_xattrs(const char *source, const char *dest); +int send_xattr(int f, stat_x *sxp); +int xattr_diff(struct file_struct *file, stat_x *sxp, int find_all); +void send_xattr_request(const char *fname, struct file_struct *file, int f_out); +int recv_xattr_request(struct file_struct *file, int f_in); +void receive_xattr(int f, struct file_struct *file); +void cache_tmp_xattr(struct file_struct *file, stat_x *sxp); +void uncache_tmp_xattrs(void); +int set_xattr(const char *fname, const struct file_struct *file, + const char *fnamecmp, stat_x *sxp); +char *get_xattr_acl(const char *fname, int is_access_acl, size_t *len_p); +int set_xattr_acl(const char *fname, int is_access_acl, const char *buf, size_t buf_len); +int del_def_xattr_acl(const char *fname); +int get_stat_xattr(const char *fname, int fd, STRUCT_STAT *fst, STRUCT_STAT *xst); +int set_stat_xattr(const char *fname, struct file_struct *file, mode_t new_mode); +int x_stat(const char *fname, STRUCT_STAT *fst, STRUCT_STAT *xst); +int x_lstat(const char *fname, STRUCT_STAT *fst, STRUCT_STAT *xst); +int x_fstat(int fd, STRUCT_STAT *fst, STRUCT_STAT *xst); +int sys_gettimeofday(struct timeval *tv); +char *do_big_num(int64 num, int human_flag, const char *fract); +char *do_big_dnum(double dnum, int human_flag, int decimal_digits); diff --git a/rounding.h b/rounding.h new file mode 100644 index 00000000..eb2937ac --- /dev/null +++ b/rounding.h @@ -0,0 +1 @@ +#define EXTRA_ROUNDING 0 |