Matt McCutchen's Web Site
/
rsync
/
rsync-patches.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
08e9fae
)
Fix configure check for fallocate().
author
Wayne Davison
<wayned@samba.org>
Tue, 29 Dec 2009 19:09:18 +0000
(11:09 -0800)
committer
Wayne Davison
<wayned@samba.org>
Tue, 29 Dec 2009 19:09:18 +0000
(11:09 -0800)
preallocate.diff
patch
|
blob
|
blame
|
history
diff --git
a/preallocate.diff
b/preallocate.diff
index
b285b38
..
c3b54f6
100644
(file)
--- a/
preallocate.diff
+++ b/
preallocate.diff
@@
-54,9
+54,9
@@
diff --git a/configure.in b/configure.in
+dnl Preallocation stuff (also fallocate, posix_fallocate function tests above):
+
+AC_CACHE_CHECK([for useable fallocate],rsync_cv_have_fallocate,[
+dnl Preallocation stuff (also fallocate, posix_fallocate function tests above):
+
+AC_CACHE_CHECK([for useable fallocate],rsync_cv_have_fallocate,[
-+AC_TRY_LINK([#include <
sys/syscal
l.h>
++AC_TRY_LINK([#include <
fcnt
l.h>
+#include <sys/types.h>],
+#include <sys/types.h>],
-+[
syscall(fallocate,
0, 0, 0, 0);],
++[
fallocate(
0, 0, 0, 0);],
+rsync_cv_have_fallocate=yes,rsync_cv_have_fallocate=no)])
+if test x"$rsync_cv_have_fallocate" = x"yes"; then
+ AC_DEFINE(HAVE_FALLOCATE, 1, [Define to 1 if you have the fallocate function and it compiles and links without error])
+rsync_cv_have_fallocate=yes,rsync_cv_have_fallocate=no)])
+if test x"$rsync_cv_have_fallocate" = x"yes"; then
+ AC_DEFINE(HAVE_FALLOCATE, 1, [Define to 1 if you have the fallocate function and it compiles and links without error])
@@
-65,7
+65,7
@@
diff --git a/configure.in b/configure.in
+AC_CACHE_CHECK([for SYS_fallocate],rsync_cv_have_sys_fallocate,[
+AC_TRY_COMPILE([#include <sys/syscall.h>
+#include <sys/types.h>],
+AC_CACHE_CHECK([for SYS_fallocate],rsync_cv_have_sys_fallocate,[
+AC_TRY_COMPILE([#include <sys/syscall.h>
+#include <sys/types.h>],
-+[syscall(SYS_fallocate, 0, 0,
0,
0);],
++[syscall(SYS_fallocate, 0, 0,
(loff_t)0, (loff_t)
0);],
+rsync_cv_have_sys_fallocate=yes,rsync_cv_have_sys_fallocate=no)])
+if test x"$rsync_cv_have_sys_fallocate" = x"yes"; then
+ AC_DEFINE(HAVE_SYS_FALLOCATE, 1, [Define to 1 if you have the SYS_fallocate syscall number])
+rsync_cv_have_sys_fallocate=yes,rsync_cv_have_sys_fallocate=no)])
+if test x"$rsync_cv_have_sys_fallocate" = x"yes"; then
+ AC_DEFINE(HAVE_SYS_FALLOCATE, 1, [Define to 1 if you have the SYS_fallocate syscall number])