Re: [patch] Correct configure test for sin_len to compile on Tru64 Unix

2004-03-15 Thread Shinichi Maruyama

wayned  So, it looks like we need 2 configure tests and separate defines for
wayned  sa_len and sin_len.
wayned How about the appended patch?  This applies to the very latest CVS
wayned source and would require the running of autoconf and autoheader
wayned after applying it.

I use rsync 2.6.1cvs on FreeBSD 4.X machines.
This OS has sin_len in struct sockaddr_in. But after
configure, HAVE_SOCKADDR_SIN_LEN remains undef in config.h.
Needs patch like this ?

Index: configure.in
===
RCS file: /cvsroot/rsync/configure.in,v
retrieving revision 1.186
diff -u -r1.186 configure.in
--- configure.in27 Feb 2004 07:22:39 -  1.186
+++ configure.in16 Mar 2004 00:51:14 -
@@ -396,12 +396,13 @@
 #include sys/socket.h
 ])
 
-AC_CHECK_MEMBER([struct sockaddr.sin_len],
+AC_CHECK_MEMBER([struct sockaddr_in.sin_len],
[ AC_DEFINE(HAVE_SOCKADDR_SIN_LEN, 1, [Do we have sockaddr.sin_len?]) 
],
[],
[
 #include sys/types.h
 #include sys/socket.h
+#include netinet/in.h
 ])
 
 AC_MSG_CHECKING(struct sockaddr_storage)


-- 
Yes, I'm in panic.
Shinichi Maruyama ([EMAIL PROTECTED])
-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: [patch] Correct configure test for sin_len to compile on Tru64 Unix

2004-03-15 Thread Wayne Davison
On Tue, Mar 16, 2004 at 10:01:19AM +0900, Shinichi Maruyama wrote:
   This OS has sin_len in struct sockaddr_in. But after
 configure, HAVE_SOCKADDR_SIN_LEN remains undef in config.h.
   Needs patch like this ?

Yup -- much appreciated!  I've checked in your fix, plus an extra
cleanup of the define names in light of this fixed structure check.

..wayne..
-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


[patch] Correct configure test for sin_len to compile on Tru64 Unix

2004-02-25 Thread Petter Reinholdtsen

The last versions of rsync fail to compile on Tru64 Unix (alpha),
because of a typo in configure.in.

The problem is that the code in configure check for sockaddr.sa_len,
while the code uses sockaddr.sin_len.  This patch fixes the problem.
Please include it in the next version of rsync.


diff -ur src-2.6.0/configure.in src-2.6.0-local/configure.in
--- src-2.6.0-local/configure.in2004-01-01 20:09:16.0 +0100
+++ src-2.6.0-foo/configure.in  2004-02-25 13:43:37.0 +0100
@@ -367,7 +367,7 @@
 fi


-AC_CHECK_MEMBER([struct sockaddr.sa_len],
+AC_CHECK_MEMBER([struct sockaddr.sin_len],
[ AC_DEFINE(HAVE_SOCKADDR_LEN) ],
[],
[

Without this fix, the compile fail with this error message:

  cc-wrapper -I. -I. -g -DHAVE_CONFIG_H  -c socket.c -o socket.o
  cc: Error: socket.c, line 619: In this statement, sin_len is not
a member of sock2. (needmember)
  sock2.sin_len = sizeof(sock2);
  ^
  make: *** [socket.o] Error 1
-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html