X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/e00df64bae38dd1beb021f7b2ff7da99987d154b..3ba2c330e1ba90a2ef11508b62d74be8967b0770:/configure.in diff --git a/configure.in b/configure.in index 5a3065d5..47089de1 100644 --- a/configure.in +++ b/configure.in @@ -5,7 +5,7 @@ AC_CONFIG_SRCDIR([byteorder.h]) AC_CONFIG_HEADER(config.h) AC_PREREQ(2.52) -RSYNC_VERSION=2.6.1 +RSYNC_VERSION=2.6.3 AC_SUBST(RSYNC_VERSION) AC_MSG_NOTICE([Configuring rsync $RSYNC_VERSION]) @@ -146,21 +146,26 @@ AC_TRY_RUN([ int main(void) { struct flock lock; - int status; - int fd = open("conftest.dat", O_CREAT|O_RDWR, 0600); + int status; + char tpl[32] = "/tmp/locktest.XXXXXX"; + int fd = mkstemp(tpl); + if (fd < 0) { + strcpy(tpl, "conftest.dat"); + fd = open(tpl, O_CREAT|O_RDWR, 0600); + } + lock.l_type = F_WRLCK; lock.l_whence = SEEK_SET; lock.l_start = 0; lock.l_len = 1; lock.l_pid = 0; - fcntl(fd,F_SETLK,&lock); if (fork() == 0) { - lock.l_start = 1; - exit(fcntl(fd,F_SETLK,&lock) == 0); - } - wait(&status); - unlink("conftest.dat"); + lock.l_start = 1; + _exit(fcntl(fd,F_SETLK,&lock) == 0); + } + wait(&status); + unlink(tpl); exit(WEXITSTATUS(status)); } ], @@ -437,9 +442,10 @@ dnl AC_FUNC_MEMCMP AC_FUNC_UTIME_NULL AC_FUNC_ALLOCA AC_CHECK_FUNCS(waitpid wait4 getcwd strdup strerror chown chmod mknod mkfifo \ - fchmod fstat strchr readlink link utime utimes strftime mtrace \ - memmove lchown vsnprintf snprintf asprintf setsid glob strpbrk \ - strlcat strlcpy strtol mallinfo getgroups setgroups geteuid getegid) + fchmod fstat strchr readlink link utime utimes strftime mtrace ftruncate \ + memmove lchown vsnprintf snprintf asprintf setsid glob strpbrk setmode \ + strlcat strlcpy strtol mallinfo getgroups setgroups geteuid getegid \ + open64 mkstemp64) AC_CACHE_CHECK([for working socketpair],rsync_cv_HAVE_SOCKETPAIR,[ AC_TRY_RUN([ @@ -537,7 +543,7 @@ AC_TRY_RUN([ #include main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}], rsync_cv_HAVE_GETTIMEOFDAY_TZ=yes,rsync_cv_HAVE_GETTIMEOFDAY_TZ=no,rsync_cv_HAVE_GETTIMEOFDAY_TZ=cross)]) -if test x"$rsync_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then +if test x"$rsync_cv_HAVE_GETTIMEOFDAY_TZ" != x"no"; then AC_DEFINE(HAVE_GETTIMEOFDAY_TZ, 1, [ ]) fi