>> #if !defined __FreeBSD__ >> char *dirname(char *path); >> #endif >> Can you confirm that it helps? > It's bogus because ours is const char *.
FreeBSD defines dirname as a different function from the standard and then *busybox* is bogus ? Please. This is the exact kind of bullshit incompatibilities that application developers should not have to care about, ever. FreeBSD has no business redefining dirname's prototype; if it's not char *dirname (char *), it's not conformant, period. Denys, you do not have to jump through hoops to make this work. If there's a simple way to support it, fine; if there's not, FreeBSD is broken and that's all there is to it. (It's not as if FreeBSD wasn't already broken in multiple ways, starting with non-conformant, non-standalone libc include files.) This comes from someone who's very much opposed to following standards blindly - but let's be reasonable here. Of course char *dirname (char *) is a sucky prototype. Of course the dirname() API itself sucks, because there's no way to implement it without some leakage. But it's the standard API. If the FreeBSD libc guys do not like it, they're free to provide another, superior, API, just like provide other APIs in my own general C library. They could even add hooks in the libc that advise against the use of dirname() whenever it is encountered in a C source, and that suggest their other API instead. But they should call it freebsd_dirname or better_dirname or whatever; NOT dirname. dirname() should follow the mediocre but standard prototype. Fighting bad standards is good, but calling a spade a const spade is not. -- Laurent _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
