mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-05-24 06:45:27 -04:00
Solaris 2.6 doesn't support "signed char". What a broken system!
This commit is contained in:
6
README
6
README
@@ -72,6 +72,12 @@ To install rsync, first run the "configure" script. This will create a
|
||||
Makefile and config.h appropriate for your system. Then type
|
||||
"make".
|
||||
|
||||
Note that on some systems you will have to force configure not to use
|
||||
gcc because gcc may not support some features (such as 64 bit file
|
||||
offsets) that your system may support. Set the environment variable CC
|
||||
to the name of your native compiler before running configure in this
|
||||
case.
|
||||
|
||||
Once built put a copy of rsync in your search path on the local and
|
||||
remote systems (or use "make install"). That's it!
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ uint32 get_checksum1(char *buf1,int len)
|
||||
{
|
||||
int i;
|
||||
uint32 s1, s2;
|
||||
signed char *buf = (signed char *)buf1;
|
||||
schar *buf = (schar *)buf1;
|
||||
|
||||
s1 = s2 = 0;
|
||||
for (i = 0; i < (len-4); i+=4) {
|
||||
|
||||
@@ -60,7 +60,13 @@ echo $ac_n "checking for off64_t ... $ac_c"
|
||||
AC_TRY_RUN([#include <stdio.h>
|
||||
#include <sys/stat.h>
|
||||
main() { struct stat64 st; off64_t s; exit((lstat64("/dev/null", &st)==0)?0:1); }],
|
||||
echo yes;AC_DEFINE(HAVE_LONGLONG),
|
||||
echo yes;AC_DEFINE(HAVE_OFF64_T),
|
||||
echo no)
|
||||
|
||||
echo $ac_n "checking for unsigned char ... $ac_c"
|
||||
AC_TRY_RUN([#include <stdio.h>
|
||||
main() { char c; c=250; exit((c > 0)?0:1); }],
|
||||
echo yes;AC_DEFINE(HAVE_UNSIGNED_CHAR),
|
||||
echo no)
|
||||
|
||||
echo $ac_n "checking for utimbuf ... $ac_c"
|
||||
|
||||
10
match.c
10
match.c
@@ -130,14 +130,14 @@ static void hash_search(int f,struct sum_struct *s,
|
||||
int end;
|
||||
char sum2[SUM_LENGTH];
|
||||
uint32 s1, s2, sum;
|
||||
signed char *map;
|
||||
schar *map;
|
||||
|
||||
if (verbose > 2)
|
||||
fprintf(FINFO,"hash search b=%d len=%d\n",s->n,(int)len);
|
||||
|
||||
k = MIN(len, s->n);
|
||||
|
||||
map = (signed char *)map_ptr(buf,0,k);
|
||||
map = (schar *)map_ptr(buf,0,k);
|
||||
|
||||
sum = get_checksum1((char *)map, k);
|
||||
s1 = sum & 0xFFFF;
|
||||
@@ -178,7 +178,7 @@ static void hash_search(int f,struct sum_struct *s,
|
||||
|
||||
if (!done_csum2) {
|
||||
int l = MIN(s->n,len-offset);
|
||||
map = (signed char *)map_ptr(buf,offset,l);
|
||||
map = (schar *)map_ptr(buf,offset,l);
|
||||
get_checksum2((char *)map,l,sum2);
|
||||
done_csum2 = 1;
|
||||
}
|
||||
@@ -191,7 +191,7 @@ static void hash_search(int f,struct sum_struct *s,
|
||||
matched(f,s,buf,offset,i);
|
||||
offset += s->sums[i].len - 1;
|
||||
k = MIN((len-offset), s->n);
|
||||
map = (signed char *)map_ptr(buf,offset,k);
|
||||
map = (schar *)map_ptr(buf,offset,k);
|
||||
sum = get_checksum1((char *)map, k);
|
||||
s1 = sum & 0xFFFF;
|
||||
s2 = sum >> 16;
|
||||
@@ -201,7 +201,7 @@ static void hash_search(int f,struct sum_struct *s,
|
||||
|
||||
null_tag:
|
||||
/* Trim off the first byte from the checksum */
|
||||
map = (signed char *)map_ptr(buf,offset,k+1);
|
||||
map = (schar *)map_ptr(buf,offset,k+1);
|
||||
s1 -= map[0] + CHAR_OFFSET;
|
||||
s2 -= k * (map[0]+CHAR_OFFSET);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user