summaryrefslogtreecommitdiff
path: root/bsd-misc.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2000-11-17 03:47:20 +0000
committerBen Lindstrom <mouring@eviladmin.org>2000-11-17 03:47:20 +0000
commit49a79c09762613f29601ef2470d13952168021be (patch)
tree140539420c10c5b358481cadcec495a5a41103fd /bsd-misc.c
parentbaaa2c05dd789bdce64fa7eb5697a5f969d68288 (diff)
- (stevek) Reworked progname support.
- (bal) Misplaced #include "includes.h" in bsd-setproctitle.c. Patch by Shinichi Maruyama <marya@st.jip.co.jp> I assume the progname patch was finished. I believe stevek is on vacation, but it passes compiling under Linux and NeXTStep.
Diffstat (limited to 'bsd-misc.c')
-rw-r--r--bsd-misc.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/bsd-misc.c b/bsd-misc.c
index 59814946c..2a0596593 100644
--- a/bsd-misc.c
+++ b/bsd-misc.c
@@ -26,6 +26,26 @@
26#include "xmalloc.h" 26#include "xmalloc.h"
27#include "ssh.h" 27#include "ssh.h"
28 28
29char *get_progname(char *argv0)
30{
31#ifdef HAVE___PROGNAME
32 extern char *__progname;
33
34 return __progname;
35#else
36 char *p;
37
38 if (argv0 == NULL)
39 return "unknown"; /* XXX */
40 p = strrchr(argv0, '/');
41 if (p == NULL)
42 p = argv0;
43 else
44 p++;
45 return p;
46#endif
47}
48
29#ifndef HAVE_SETLOGIN 49#ifndef HAVE_SETLOGIN
30int setlogin(const char *name) 50int setlogin(const char *name)
31{ 51{