[U-Boot] [PATCH] Avoid using GNU basename

Mike Frysinger vapier at gentoo.org
Wed Feb 29 19:51:31 CET 2012


On Tuesday 28 February 2012 10:36:22 Keith Mok wrote:
> There is no GNU basename support in MacOS.
> Use generic POSIX basename defined in libgen.h instead.

alternative: define a non-braindead version in compiler.h:

static const char *_basename(const char *filename)
{   
    const char *p = strrchr(filename, '/');
    return p ? p + 1 : filename;
}

/* Avoid issues with clobbering C library def */
#undef basename
#define basename(x) _basename(x)
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120229/c9d26b8c/attachment.pgp>


More information about the U-Boot mailing list