mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-10-23 22:28:16 -04:00
test for "long long" and %lld in configure.
This commit is contained in:
1 parent
31e125226d
commit
0d0e2e93e8
3 files changed
+18
-3
No files matched your search
@@ -52,6 +52,12 @@ main() { exit(fnmatch("*.o", "x.o", 0) == 0? 0: 1); }],
|
||||
echo yes;AC_DEFINE(HAVE_FNMATCH),
|
||||
echo no)
|
||||
|
||||
echo $ac_n "checking for long long... $ac_c"
|
||||
AC_TRY_RUN([#include <stdio.h>
|
||||
main() { long long x = 1000000000000; char b[20]; sprintf(b,"%lld", x); exit(strcmp("1000000000000", b) == 0? 0: 1); }],
|
||||
echo yes;AC_DEFINE(HAVE_LONGLONG),
|
||||
echo no)
|
||||
|
||||
echo $ac_n "checking for utimbuf ... $ac_c"
|
||||
AC_TRY_COMPILE([#include <sys/types.h>
|
||||
#include <utime.h>],
|
||||
|
||||
@@ -88,10 +88,17 @@ static void report(int f)
|
||||
tsize = read_longint(f);
|
||||
}
|
||||
|
||||
#if HAVE_LONGLONG
|
||||
printf("wrote %lld bytes read %lld bytes %g bytes/sec\n",
|
||||
(long long)out,(long long)in,(in+out)/(0.5 + (t-starttime)));
|
||||
printf("total size is %lld speedup is %g\n",
|
||||
(long long)tsize,(1.0*tsize)/(in+out));
|
||||
#else
|
||||
printf("wrote %ld bytes read %ld bytes %g bytes/sec\n",
|
||||
(long)out,(long)in,(in+out)/(0.5 + (t-starttime)));
|
||||
printf("total size is %ld speedup is %g\n",
|
||||
(long)tsize,(1.0*tsize)/(in+out));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ static void matched(int f,struct sum_struct *s,struct map_struct *buf,
|
||||
off_t n = offset - last_match;
|
||||
int j;
|
||||
|
||||
if (verbose > 2 && i != -1)
|
||||
if (verbose > 2 && i >= 0)
|
||||
fprintf(FERROR,"match at %d last_match=%d j=%d len=%d n=%d\n",
|
||||
(int)offset,(int)last_match,i,(int)s->sums[i].len,(int)n);
|
||||
|
||||
@@ -106,7 +106,7 @@ static void matched(int f,struct sum_struct *s,struct map_struct *buf,
|
||||
if (n > 0)
|
||||
write_flush(f);
|
||||
|
||||
if (i != -1)
|
||||
if (i >= 0)
|
||||
n += s->sums[i].len;
|
||||
|
||||
for (j=0;j<n;j+=CHUNK_SIZE) {
|
||||
@@ -115,8 +115,10 @@ static void matched(int f,struct sum_struct *s,struct map_struct *buf,
|
||||
}
|
||||
|
||||
|
||||
if (i != -1)
|
||||
if (i >= 0)
|
||||
last_match = offset + s->sums[i].len;
|
||||
else
|
||||
last_match = offset;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user