Roland Mainz writes:
> Which link flags should a standard-compillant application use (e.g.
> C99/XPG6) for socket access ?

See the standards(5) man page.  Standards-compliant applications are
supposed to set -D_XOPEN_SOURCE=(number) and use a particular compiler
invocation to get the right things.

For C99/XPG6, you need to invoke the compiler as 'c99', set
-D_XOPEN_SOURCE=600, and (if you're using sockets) link with -lxnet.

> AFAIK many opens-source projects only use
> "-lnsl -lsocket" in their code and aren't even aware about the option of
> using "-lxnet" and somehow prefer "-lnsl -lsocket" (e.g. Mozilla, X11
> and the GNU stuff are examples).

True.  And they're usually poorer for it, as they can't use ancillary
data.

-- 
James Carlson, Solaris Networking              <[EMAIL PROTECTED]>
Sun Microsystems / 35 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