----------------original message-----------------
De: "Jan-Benedict Glaw" [email protected]
A: "Xavier Grave" [email protected], [email protected]
Date: Sat, 9 Jan 2010 11:24:15 +0100
-------------------------------------------------
 
 
> On Sat, 2010-01-09 02:50:23 +0100, Xavier Grave [email protected] 
> wrote:
>> 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 :



>> problem doesn't seem any more specific to Ada ?
> 
> `errno' should contain more detailed information about why it failed.
> Also, keep in mind that "sin.sin_port = 5786" is probably not what you
> want, think of network byte order! Sparc and PPC are big endian and I
> guess that amd64 is little endian.

I have tested the same code (both Ada and c) on Debian GNU/Linux i386 and
results are similar to sparc and powerpc
But I will try with the good network bytes order on FreeBSD, thanks for the
tip

xavier





--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to