
2 Mar
2012
2 Mar
'12
8:16 a.m.
Dear Keith Mok,
In message CAHjoi4eR+n=qQ8vZAKwwgLiPSFfrBWHRHwYNvfJn4y0F9EqO7g@mail.gmail.com you wrote:
There is no GNU basename support in MacOS. Use generic POSIX basename defined in libgen.h instead.
...
int fp, ep; const char *prg;
char *prog_pathname;
prg = basename(argv[0]);
prog_pathname = strdup(argv[0]);
prg = basename(prog_pathname);
free() missing. Actually the strdup should not be needed at all, as we don't use argv[0] after that - at least we shouldn't. The remaining "usage(argv[0]);" should be fixed instead.
Besides - I agree with Mike's comment how your MacOS issue should be fixed.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
Drun'? 'm not drun'! You woudn' dare call m' drun' if I was sober!
- Terry Pratchett, _Men at Arms_