From 5df77bab6d3324c2b9dc696e38ccac9317b1ff70 Mon Sep 17 00:00:00 2001 From: tgoodwin Date: Wed, 28 Oct 1998 14:19:43 +0000 Subject: Portability: apparently some systems declare `char *basename(const char *)' in system header files. Changing our basename() (in history.c) to match this prototype allows it to be compiled on such systems, and is harmless. (Harmless, that is, if no system declares `char *basename(char *)'.) --- history.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'history.c') diff --git a/history.c b/history.c index 3a42a2e..d1035dd 100644 --- a/history.c +++ b/history.c @@ -56,7 +56,7 @@ static char *newstr() { return ealloc((size_t)1024); } -static char *basename(char *s) { +static char *basename(const char *s) { char *t = strrchr(s, '/'); return (t == NULL) ? s : t + 1; } -- cgit v1.2.3