Hi again: I just moved an include line and discovered that _GNU_SOURCE must be defined before almost any include, or it won't work. This is because almost every other include file includes <features.h>. It's probably best to document it as "should be defined before any include directives". <features.h> does not require explicit inclusion, since <sys/socket.h> includes <features.h> (my test code was naughtily including <bits/socket.h>). Thanks again, Jim. On Sat, Aug 14, 2010 at 12:32 PM, Jim Belton <jim.belton@xxxxxxxxx> wrote: > Hi: > > I've found a few minor improvements could be made to the tcp(7) and > unix(7) manual pages: > 1. <linux/sockios.h> needs to be included to get the definitions of > the SIOC ioctls documented in tcp(7), but it is not listed as a > required include file on that page. > 2. The SIOCINQ ioctl applies to unix domain sockets as well as tcp > sockets, but this is not documented on the unix(7) page. I have tested > that this works. I would guess that the other SIOC ioctls also work on > unix domains sockets. > 3. The ucred structure is hidden by default in the latest versions of > the header files, but is not revealed (as documented on the unix(7) > page) by defining _GNU_SOURCE, but by defining __USE_GNU. Also, this > definition must be made before the first inclusion of any file that > include <sys/socket.h>, which is most of the networking header files. > Finally, you can define __USE_GNU by defining _GNU_SOURCE, but to do > that, you must include <features.h> between the definition of > _GNU_SOURCE and the inclusion of the first file that includes > <sys/sockets.h> > > I'm not sure whether the glibc header maintainers would be OK with > docs talking about __USE_GNU. This may be an internal implementation > detail that they prefer to keep changeable. > > Being a UNIX old timer, I know my way around nroff and man pages. If > you don't have the time, I can make these changes to the man source. > Please let me know if you need me to do this. > > Thanks for keeping the docs up to date! Developers really appreciate > them. Having used MSDN, I can safely say that the Linux and FreeBSD > manuals are still far better. > > Best regards, > Jim > -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html