[fpc-devel]possible bug in sockets.pp

Thomas Schatzl tom_at_work at yline.com
Sat Nov 3 12:08:10 CET 2001


From: "Jonas Maebe" <jonas at zeus.rug.ac.be>
Subject: Re: [fpc-devel]possible bug in sockets.pp

> On 2 Nov 2001 Thomas.Hergenhahn at nexans.com wrote:
>
> > When I tried to open a socket in the unix domain bind(Sock, Addr,
> > SizeOf(Addr)) returned the error "invalid argument", but I could not
> > find what was wrong with my code. When I changed the definition
> > of TUnixSockAddr in sockets.pp from:
> >
> > type
> >   TUnixSockAddr = packed Record
> >     family:word; { was byte, fixed }
> >     path:array[0..108] of char;
> >     end;
>
> That's not correct, in the C headers family is an "unsigned short", which
> is the same as a byte in Pascal.

No, "unsigned short" equals the Pascal "Word" type (usually). Pascal "Byte"
equals "unsigned char".



More information about the fpc-devel mailing list