aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2023-10-01 07:02:58 +0100
committerRon Yorston <rmy@pobox.com>2023-10-01 07:06:19 +0100
commit1942077cade6374a7c37fcdcf6cbf55dd52e13c4 (patch)
treeb3fd39398157f86af3cd22ebab562242c6ae48f3 /include
parent1ff6eb52032bb52501ef3bd8b49010ac19efa268 (diff)
downloadbusybox-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.h1
-rw-r--r--include/platform.h1
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);
228char *strndup(char const *s, size_t n); 228char *strndup(char const *s, size_t n);
229char *mingw_strerror(int errnum); 229char *mingw_strerror(int errnum);
230char *strsignal(int sig); 230char *strsignal(int sig);
231int 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