freebsd-skq/lib/libc/gen/getprogname.c
markm 76fe441a7b Do not use __progname directly (except in [gs]etprogname(3)).
Also, make an internal _getprogname() that is used only inside
libc. For libc, getprogname(3) is a weak symbol in case a
function of the same name is defined in userland.
2002-03-29 22:43:43 +00:00

18 lines
249 B
C

#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include "namespace.h"
#include <stdlib.h>
#include "un-namespace.h"
#include "libc_private.h"
__weak_reference(_getprogname, getprogname);
const char *
_getprogname(void)
{
return (__progname);
}