Paul Durrant writes:
> On 4/8/06, Xie Gang <[EMAIL PROTECTED]> wrote:
> > I wrote a socket program and compiled it on solaris. I found it quite 
> > different from linux. The gcc did not search for the socket lib 
> > automatically. The -lsocket must be given.
> > I don't know why this happens.
> 
> On Linux the socket calls are in (g)libc so it's not that the linux
> linker magically searches for libsocket.so - such a library simply
> does not exist on Linux. However, I do sympathise - the fact that one
> needs to add -lsocket to the linker flags trips up many an open source
> app. when building it on Solaris and it gets annoying after a while.

True, but the deeper issue is that we have at least two[1] competing
and incompatible sockets interfaces -- one is the 3SOCKET old-BSD
style family and the other is the 3XNET standards-compliant family.

In most cases, folks really want 3XNET (one example issue: this is the
only way to get ancillary data) and yet they stumble into libsocket
first.  The few things 3XNET doesn't offer (*_r, r*, and ether_*
functions) are seldom needed.

[1] We have three if you count the old SunOS 4.x compatibility stuff,
    which I don't.

-- 
James Carlson, KISS Network                    <[EMAIL PROTECTED]>
Sun Microsystems / 1 Network Drive         71.232W   Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757   42.496N   Fax +1 781 442 1677
_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to