Просмотр исходного кода

add dummied strverscmp (obnoxious GNU function)

programs that use this tend to horribly botch international text
support, so it's questionable whether we want to support it even in
the long term... for now, it's just a dummy that calls strcmp.
Rich Felker 13 лет назад
Родитель
Сommit
a6540174be
2 измененных файлов с 8 добавлено и 0 удалено
  1. 1 0
      include/string.h
  2. 7 0
      src/string/strverscmp.c

+ 1 - 0
include/string.h

@@ -69,6 +69,7 @@ size_t strlcpy (char *, const char *, size_t);
 #endif
 #endif
 
 
 #ifdef _GNU_SOURCE
 #ifdef _GNU_SOURCE
+int strverscmp (const char *, const char *);
 int strcasecmp (const char *, const char *);
 int strcasecmp (const char *, const char *);
 int strncasecmp (const char *, const char *, size_t);
 int strncasecmp (const char *, const char *, size_t);
 char *strchrnul(const char *, int);
 char *strchrnul(const char *, int);

+ 7 - 0
src/string/strverscmp.c

@@ -0,0 +1,7 @@
+#include <string.h>
+
+int strverscmp(const char *l, const char *r)
+{
+	/* FIXME */
+	return strcmp(l, r);
+}