[PATCH] Added replacement function for strverscmp
Rich Felker
dalias at aerifal.cx
Mon Jun 13 19:47:39 UTC 2011
On Mon, Jun 13, 2011 at 12:42:09PM -0700, Daniel Fandrich wrote:
> This is a GNU extension that isn't found in other libcs.
> [...]
> --- a/include/platform.h
> +++ b/include/platform.h
> @@ -348,6 +348,7 @@ typedef unsigned smalluint;
> #define HAVE_STRCHRNUL 1
> #define HAVE_STRSEP 1
> #define HAVE_STRSIGNAL 1
> +#define HAVE_STRVERSCMP 1
> #define HAVE_VASPRINTF 1
> #define HAVE_XTABS 1
> #define HAVE_MNTENT_H 1
> @@ -372,6 +373,7 @@ typedef unsigned smalluint;
> # undef HAVE_STRCHRNUL
> # undef HAVE_STRSEP
> # undef HAVE_STRSIGNAL
> +# undef HAVE_STRVERSCMP
> [...]
> +# undef HAVE_STRVERSCMP
> [...]
> +# undef HAVE_STRVERSCMP
> [...]
> +# undef HAVE_STRVERSCMP
If it's nonstandard and glibc-only, shouldn't it be *undefined* by
default and defined only if defined(__GLIBC__)&&!defined(__UCLIBC__)
or similar?
Also, what on earth is it useful for? Why would BB users even want it?
My experience with it has always been very bad; as an example, XFCE
Thunar (file manager) insists on using it and has no way to disable
it, and this makes it impossible to browse directories where filenames
are hexadecimal numbers intended to be presented in hex order.
> +#ifndef HAVE_STRVERSCMP
> +/* Compare strings while treating digits characters numerically.
> + Copyright (C) 1997, 2002, 2009 Free Software Foundation, Inc.
> + This file is part of the GNU C Library.
> + Contributed by Jean-François Bignolles <bignolle at ecoledoc.ibp.fr>, 1997.
Looks like an encoding error in your email/patch...
Rich
More information about the busybox
mailing list