[Issue 818] std.socket.InternetAddress.sin needs to be properly initialized on OS X

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Jan 21 15:41:21 PST 2007


http://d.puremagic.com/issues/show_bug.cgi?id=818





------- Comment #2 from thomas-dloop at kuehne.cn  2007-01-21 17:41 -------
# import std.socket, std.stdio;
# 
# class Test : InternetAddress{
#    this(){ }
# 
#    void check(){
#       ubyte* d = cast(ubyte*)cast(void*)&sin;
#       writefln("%s", d[0 .. sin.sizeof]);
#       writefln("%s", sin.sin_family == AddressFamily.INET);
#    }
# }
# 
# void main(){
#    (new Test()).check();
# }

dmd-1.0 / Linux:
> [2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
> true

gdmd-0.21 / Linux:
> [2,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255]
> true


-- 



More information about the D.gnu mailing list