Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
if (sort_opts == SORT_DIR) {
dif = S_ISDIR(d2->dn_mode) - S_ISDIR(d1->dn_mode);
} else
+#ifdef HAVE_STRVERSCMP && HAVE_STRVERSCMP == 1
if (sort_opts == SORT_VERSION) {
dif = strverscmp(d1->name, d2->name);
} else
+#endif
if (sort_opts == SORT_EXT) {
dif = strcmp(strchrnul(d1->name, '.'), strchrnul(d2->name, '.'));
}
#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
# undef HAVE_STRCHRNUL
# undef HAVE_STRSEP
# undef HAVE_STRSIGNAL
+# undef HAVE_STRVERSCMP
# undef HAVE_VASPRINTF
# undef HAVE_NET_ETHERNET_H
#endif
# undef HAVE_PTSNAME_R
# undef HAVE_SYS_STATFS_H
# undef HAVE_SIGHANDLER_T
+# undef HAVE_STRVERSCMP
# undef HAVE_XTABS
# undef HAVE_DPRINTF
#endif
#if defined(__digital__) && defined(__unix__)
# undef HAVE_STPCPY
+# undef HAVE_STRVERSCMP
#endif
#if defined(ANDROID)
# undef HAVE_DPRINTF
# undef HAVE_STPCPY
# undef HAVE_STRCHRNUL
+# undef HAVE_STRVERSCMP
# undef HAVE_NET_ETHERNET_H
#endif