diff options
author | dd <dd@FreeBSD.org> | 2001-05-15 23:41:01 +0000 |
---|---|---|
committer | dd <dd@FreeBSD.org> | 2001-05-15 23:41:01 +0000 |
commit | 1bdb5430ed3cb53ff0ce2e6a919731ad76e4ff1f (patch) | |
tree | 05e0c99f5d3f3aa93732e48b24e0e6a0e4f0a773 /lib/libc/gen/setprogname.c | |
parent | f9e46c64d154d86491bba0358cbf939e3d2fb26a (diff) | |
download | FreeBSD-src-1bdb5430ed3cb53ff0ce2e6a919731ad76e4ff1f.zip FreeBSD-src-1bdb5430ed3cb53ff0ce2e6a919731ad76e4ff1f.tar.gz |
Introduce getprogname(3) and setprogname(3) library calls. These get
and set __progname, respectively.
Discussed on: -arch (Feb 2001), -audit
Reviewed by: -audit
Approved by: kris
Obtained from: (mostly) NetBSD
Diffstat (limited to 'lib/libc/gen/setprogname.c')
-rw-r--r-- | lib/libc/gen/setprogname.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/libc/gen/setprogname.c b/lib/libc/gen/setprogname.c new file mode 100644 index 0000000..6c56013 --- /dev/null +++ b/lib/libc/gen/setprogname.c @@ -0,0 +1,13 @@ +#if defined(LIBC_RCS) && !defined(lint) +static const char rcsid[] = + "$FreeBSD$"; +#endif /* LIBC_RCS and not lint */ + +extern const char *__progname; + +void +setprogname(const char *progname) +{ + + __progname = progname; +} |