fix to util_sock.c

okuyamak at okuyamak at
Mon Nov 13 09:34:02 GMT 2000

>>>>> "o" == okuyamak  <okuyamak at> writes:
o> Can you give me what that bug really was? Or where to see?
o> For all I've heard was that there was no support for MSG_WAITALL.

By the way, If buggy target is KNOWN, or if non-buggy target is
KNOWN, then we can always switch it back to read() by used something

#define	  RECV(a,b,c,d)	 recv(a,b,c,d)
#define	RECV(a,b,c,d)	read(a,b,c)

kind of macro.

And by defining HAVE_WORKING_RECV as default, we can always
find one who's not working.

In my sence, using read() against socket is not something we should
do. We should avoid that as much as possible. So, this kind of
"TARGET DEPENDENT" code should be separated from other target
independent codes.
# I experenced read() that did not work for socket more oftenly than
# non working recv(), is the reason.
Kenichi Okuyama at Tokyo Research Lab, IBM-Japan, Co.

More information about the samba-technical mailing list