[cs631apue] setprogname() not defined

Jan Schaumann jschauma at stevens.edu
Mon Sep 17 14:52:23 EDT 2012


Lance Burgo <lburgo at stevens.edu> wrote:
 
> I was attempting to follow the style guidelines
> here<http://www.cs.stevens.edu/~jschauma/631/style> and
> have been unable to use setprogname() as mentioned. I can't seem to find
> the function defined anywhere. Should this be left out for the Ubuntu
> server at linux-lab.cs.stevens.edu?

On Linux systems, this function is provided by the BSD compatibility
libraries.  Use

#include <bsd/stdlib.h>

and link against libbsd.

Unfortunately the Linux package does not provide manual pages for
getprogname/setprogname -- see
http://netbsd.gw.com/cgi-bin/man-cgi?getprogname++NetBSD-current
instead.

-Jan


More information about the cs631apue mailing list