diff options
| author | tgoodwin <tgoodwin> | 1998-10-28 14:19:43 +0000 |
|---|---|---|
| committer | Toby Goodwin <toby@paccrat.org> | 2015-05-16 21:23:12 +0100 |
| commit | 5df77bab6d3324c2b9dc696e38ccac9317b1ff70 (patch) | |
| tree | d33bac15274c2d719ec0f34851f5d4de525d7f18 | |
| parent | f034ca39df7f6f513d0d4d4f479194592ac48645 (diff) | |
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 *)'.)
| -rw-r--r-- | history.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; } |