rbj@icst-cmr.arpa (05/28/87)
Why do so many of the man pages (eg inet(3N), the one which directly prompted this posting) list the necessary include files to use the routines in question, *except* that (almost?) NONE of them mention <sys/types.h>, which is required by maybe half of them? The only sure way I've found to tell whether types.h is required is to try it! Possibly because it is so common that it is included more often than not. Do you want every manual entry to mention <stdio.h> as well? For that matter, why are the include files organized as they are? It seems to me that it would be much more intelligent for each .h file to look like #ifndef <identifier-unique-to-this-.h-file> #define <identifier-unique-to-this-.h-file> ...body of the .h... #endif It would indeed. Do you volunteer? (Root Boy) Jim Cottrell <rbj@icst-cmr.arpa> National Bureau of Standards Flamer's Hotline: (301) 975-5688 Uh-oh -- WHY am I suddenly thinking of a VENERABLE religious leader frolicking on a FORT LAUDERDALE weekend?
gwyn@brl-smoke.UUCP (05/29/87)
In article <7574@brl-adm.ARPA> rbj@icst-cmr.arpa (Root Boy Jim) writes: >Possibly because it is so common that it is included more often than not. >Do you want every manual entry to mention <stdio.h> as well? YES, if it is necessary to correct functioning of the interface as specified in the documentation.
meissner@dg_rtp.UUCP (Michael Meissner) (05/30/87)
/* somebody else */ > Why do so many of the man pages (eg inet(3N), the one which directly > prompted this posting) list the necessary include files to use the > routines in question, *except* that (almost?) NONE of them mention > <sys/types.h>, which is required by maybe half of them? The only sure > way I've found to tell whether types.h is required is to try it! > In article <7574@brl-adm.ARPA> rbj@icst-cmr.arpa (Root Boy Jim) writes: > > Possibly because it is so common that it is included more often than not. > Do you want every manual entry to mention <stdio.h> as well? Now that you mention it, yes I do expect that every man page that refers to stdio functions include <stdio.h>. In the same vein, all string functions should mention <string.h> (well, ok <strings.h> for BSD systems). It's things like this that make it painful to come up to speed in UNIX. -- Michael Meissner, Data General Uucp: ...mcnc!rti!dg_rtp!meissner It is 11pm, do you know what your sendmail and uucico are doing?
tim@ism780c.UUCP (06/10/87)
Rather than fix the man pages, someone should fix the include files! Each include file should be sure to define something that no other include file defines, and the entire file should be wrapped in a #ifndef...#endif on that thing. Then, if an include file needs some other include files, it can just include them itself. -- Tim Smith "Well if you want to say yes, say yes {seismo,sdcrdcf}!ism780c!tim And if you want to say no, say no 'Cause there's a million ways to go You know that there are"
root@hobbes.UUCP (06/18/87)
+---- Tim Smith writes the following in article <6573@ism780c.UUCP> ---- | Rather than fix the man pages, someone should fix the include files! | | Each include file should be sure to define something that no other | include file defines, and the entire file should be wrapped in a | #ifndef...#endif on that thing. | | Then, if an include file needs some other include files, it can just | include them itself. +---- I code my own files this way because it works well and I don't have to do anything that the computer should do for me. BUT, I have a SVr2 binary license. Am I going to change my .h files? NO ! ! ! Why should I? I can't give out copies of the include files to others because of: /* Copyright (c) 1984 AT&T */ /* All Rights Reserved */ /* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T */ /* The copyright notice above does not evidence any */ /* actual or intended publication of such source code. */ What good does my hacking my include files do anyone else out there? More importantly, what good does it do me? If I want my code to be portable then EVERYONE ELSE must doctor their .h files too. ^^^^^^^^ The only way to keep code portable is to fix the man pages. The missing required files should be noted and the results posted. This info will help everyone out here who doesn't already know what needs what, and source code will remain portable. -- John Plocher UUCP: <backbone>!uwvax!uwmacc!hobbes!plocher ============== Internet: plocher%hobbes.UUCP@uwvax.cs.Wisc.EDU FidoNet: 121/0 BITNET: uwvax!uwmacc!hobbes!plocher@psuvax1