File-RsyncP

 view release on metacpan or  search on metacpan

FileList/config.h.in  view on Meta::CPAN


/* */
#undef HAVE_BROKEN_READDIR

/* */
#undef HAVE_C99_VSNPRINTF

/* Define to 1 if you have the `chmod' function. */
#undef HAVE_CHMOD

/* Define to 1 if you have the `chown' function. */
#undef HAVE_CHOWN

/* Define to 1 if you have the <compat.h> header file. */
#undef HAVE_COMPAT_H

/* */
#undef HAVE_CONNECT

/* Define to 1 if you have the <ctype.h> header file. */
#undef HAVE_CTYPE_H

FileList/config.h.in  view on Meta::CPAN


/* Define to 1 if you have the `inet_ntop' function. */
#undef HAVE_INET_NTOP

/* Define to 1 if you have the `inet_pton' function. */
#undef HAVE_INET_PTON

/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H

/* Define to 1 if you have the `lchown' function. */
#undef HAVE_LCHOWN

/* 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

FileList/configure  view on Meta::CPAN











for ac_func in waitpid wait4 getcwd strdup strerror chown chmod mknod mkfifo \
    fchmod fstat strchr readlink link utime utimes strftime mtrace ftruncate \
    memmove lchown vsnprintf snprintf asprintf setsid glob strpbrk \
    strlcat strlcpy strtol mallinfo getgroups setgroups geteuid getegid \
    open64 mkstemp64
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF

FileList/install-sh  view on Meta::CPAN


# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"


# put in absolute paths if you don't have them in your path; or use env. vars.

mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"

transformbasename=""
transform_arg=""
instcmd="$mvprog"
chmodcmd="$chmodprog 0755"
chowncmd=""
chgrpcmd=""
stripcmd=""
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=""
dst=""
dir_arg=""

while [ x"$1" != x ]; do
    case $1 in

FileList/install-sh  view on Meta::CPAN


	-d) dir_arg=true
	    shift
	    continue;;

	-m) chmodcmd="$chmodprog $2"
	    shift
	    shift
	    continue;;

	-o) chowncmd="$chownprog $2"
	    shift
	    shift
	    continue;;

	-g) chgrpcmd="$chgrpprog $2"
	    shift
	    shift
	    continue;;

	-s) stripcmd="$stripprog"

FileList/install-sh  view on Meta::CPAN

	fi

	pathcomp="${pathcomp}/"
done
fi

if [ x"$dir_arg" != x ]
then
	$doit $instcmd $dst &&

	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
else

# If we're going to rename the final executable, determine the name now.

	if [ x"$transformarg" = x ] 
	then
		dstfile=`basename $dst`

FileList/install-sh  view on Meta::CPAN

	$doit $instcmd $src $dsttmp &&

	trap "rm -f ${dsttmp}" 0 &&

# and set any options; do chmod last to preserve setuid bits

# If any of these fail, we abort the whole thing.  If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $instcmd $src $dsttmp" command.

	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&

# Now rename the file to the real destination.

	$doit $rmcmd -f $dstdir/$dstfile &&
	$doit $mvcmd $dsttmp $dstdir/$dstfile 

fi &&

FileList/proto.h  view on Meta::CPAN

int open_socket_out_wrapped(char *host, int port, const char *bind_address,
			    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);
void become_daemon(void);
int sock_exec(const char *prog);
int do_unlink(char *fname);
int do_symlink(char *fname1, char *fname2);
int do_link(char *fname1, char *fname2);
int do_lchown(const char *path, uid_t owner, gid_t group);
int do_mknod(char *pathname, mode_t mode, dev_t dev);
int do_rmdir(char *pathname);
int do_chmod(const char *path, mode_t mode);
int do_rename(char *fname1, char *fname2);
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);

FileList/rsync.h  view on Meta::CPAN

# define strrchr                rindex
#endif

#ifndef HAVE_ERRNO_DECL
extern int errno;
#endif

#define SUPPORT_LINKS HAVE_READLINK
#define SUPPORT_HARD_LINKS HAVE_LINK

/* This could be bad on systems which have no lchown and where chown
 * follows symbollic links.  On such systems it might be better not to
 * try to chown symlinks at all. */
#ifndef HAVE_LCHOWN
#define lchown chown
#endif

#define SIGNAL_CAST (RETSIGTYPE (*)())

#ifndef EWOULDBLOCK
#define EWOULDBLOCK EAGAIN
#endif

#ifndef STDIN_FILENO
#define STDIN_FILENO 0

lib/File/RsyncP/FileIO.pm  view on Meta::CPAN

        atime => $s[8],
        mtime => $s[9],
    };
    $f->{atime} = $f->{mtime} if ( !defined($f->{atime}) );
    if ( ($f->{mode} & ~S_IFMT) != ($a->{mode} & ~S_IFMT)
		&& !chmod($f->{mode} & ~S_IFMT, $lName) ) {
        $fio->log(sprintf("Can't chmod(%s, 0%o)", $lName, $f->{mode}));
        $ret = -1;
    }
    if ( ($f->{uid} != $a->{uid} || $f->{gid} != $a->{gid})
	    && !chown($f->{uid}, $f->{gid}, $lName) ) {
        $fio->log("Can't chown($f->{uid}, $f->{gid}, $lName)");
        $ret = -1;
    }
    if ( ($f->{mtime} != $a->{mtime} || $f->{atime} != $a->{atime})
            && !utime($f->{atime}, $f->{mtime}, $lName) ) {
        $fio->log("Can't mtime($f->{atime}, $f->{mtime}, $lName)");
        $ret = -1;
    }
    return $ret;
}



( run in 0.459 second using v1.01-cache-2.11-cpan-5511b514fd6 )