The following C code give different results on kfreebsd amd64 on one side
and sparc/powerpc/ on the other side
for kfreebsd amd64 :
xav...@debian:~$ ./bind_socket_c
sin len 16
res -1
and
for sparc :
./xav...@canis-latrans:~$ ./bind_socket_c
sin len 16
res 0
for powerpc :
xav...@power5:~$ ./bind_socket_c
sin len 16
res 0
code used :
xav...@debian:~$ cat bind_socket_c.c
#include
#include
#include
int main ()
{
int socket_fd;
struct sockaddr_in sin;
int len,res;
len = sizeof (struct sockaddr_in);
memset (&sin, 0, len);
sin.sin_port = 5786;
printf ("sin len %d\n",len);
socket_fd = socket (AF_INET,SOCK_STREAM,0);
res = bind (socket_fd, &sin, len);
printf ("res %d\n",res);
return 0;
}
problem doesn't seem any more specific to Ada ?
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]