[cs631apue] setprogname/getprogname not available on Linux

Yangmu Jiang yjiang23 at stevens.edu
Sun Sep 20 23:06:48 EDT 2015

Style guide requires to add the following code:
	 * At the start of main(), call setprogname() to set the program
	 * name.  This does nothing on NetBSD, but increases portability
	 * to other systems.
If setprogname()/getprogname() exists, they should be in <stdlib.h>, but google told me
Linux doesn’t have such functions, they belong to *BSD. So, I can’t get tcp.c compiled
if I follow the style guide.
Does anybody have the same question? Shall we ignore the style guide?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.stevens.edu/pipermail/cs631apue/attachments/20150920/0eb25f1c/attachment.html>

More information about the cs631apue mailing list