summaryrefslogtreecommitdiffstats
path: root/tools/build/progname.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/build/progname.c')
-rw-r--r--tools/build/progname.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/tools/build/progname.c b/tools/build/progname.c
new file mode 100644
index 0000000..dc1611e
--- /dev/null
+++ b/tools/build/progname.c
@@ -0,0 +1,25 @@
+/* $FreeBSD$ */
+
+/*
+ * Compat shims for those programs that use this newer interface. These
+ * are more minimal than their libc bretheren as far as namespaces and
+ * such go because their use is so limited. Also, the libc versions
+ * have too many depends on libc build environment; it is more of a pain
+ * to set that up than to recreate them here shorn of all the other goo.
+ */
+
+extern const char *__progname;
+
+void
+setprogname(const char *p)
+{
+
+ __progname = p;
+}
+
+const char *
+getprogname(void)
+{
+
+ return (__progname);
+}
OpenPOWER on IntegriCloud