diff options
author | Ron Yorston <rmy@pobox.com> | 2023-10-01 07:02:58 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2023-10-01 07:06:19 +0100 |
commit | 1942077cade6374a7c37fcdcf6cbf55dd52e13c4 (patch) | |
tree | b3fd39398157f86af3cd22ebab562242c6ae48f3 /include | |
parent | 1ff6eb52032bb52501ef3bd8b49010ac19efa268 (diff) | |
download | busybox-w32-1942077cade6374a7c37fcdcf6cbf55dd52e13c4.tar.gz busybox-w32-1942077cade6374a7c37fcdcf6cbf55dd52e13c4.tar.bz2 busybox-w32-1942077cade6374a7c37fcdcf6cbf55dd52e13c4.zip |
sort: add support for sorting version strings
Add an implementation of strverscmp from musl so that the 'sort -V'
option works.
Add '-V' to the trivial usage message.
Costs 248-256 bytes.
(GitHub issue #370)
Diffstat (limited to 'include')
-rw-r--r-- | include/mingw.h | 1 | ||||
-rw-r--r-- | include/platform.h | 1 |
2 files changed, 1 insertions, 1 deletions
diff --git a/include/mingw.h b/include/mingw.h index 6ed9bed4a..f6f0bf262 100644 --- a/include/mingw.h +++ b/include/mingw.h | |||
@@ -228,6 +228,7 @@ int unsetenv(const char *env); | |||
228 | char *strndup(char const *s, size_t n); | 228 | char *strndup(char const *s, size_t n); |
229 | char *mingw_strerror(int errnum); | 229 | char *mingw_strerror(int errnum); |
230 | char *strsignal(int sig); | 230 | char *strsignal(int sig); |
231 | int strverscmp(const char *s1, const char *s2); | ||
231 | 232 | ||
232 | #define strerror mingw_strerror | 233 | #define strerror mingw_strerror |
233 | 234 | ||
diff --git a/include/platform.h b/include/platform.h index 8ae5ed4bc..5795a0cf3 100644 --- a/include/platform.h +++ b/include/platform.h | |||
@@ -476,7 +476,6 @@ typedef unsigned smalluint; | |||
476 | # undef HAVE_STRCASESTR | 476 | # undef HAVE_STRCASESTR |
477 | # undef HAVE_STRCHRNUL | 477 | # undef HAVE_STRCHRNUL |
478 | # undef HAVE_STRSEP | 478 | # undef HAVE_STRSEP |
479 | # undef HAVE_STRVERSCMP | ||
480 | #if !defined(__MINGW64_VERSION_MAJOR) | 479 | #if !defined(__MINGW64_VERSION_MAJOR) |
481 | # undef HAVE_VASPRINTF | 480 | # undef HAVE_VASPRINTF |
482 | #endif | 481 | #endif |