commit: 6baa58541b51e1805bc18c859a4b1d2b36b7d107
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 13 22:56:03 2016 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sat Feb 13 22:56:03 2016 +0000
URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=6baa5854
compat: drop strcasestr/asprintf fallback
We pull in strcasestr & asprintf via gnulib now, so don't need these
local copies.
libq/compat.c | 22 ----------------------
1 file changed, 22 deletions(-)
diff --git a/libq/compat.c b/libq/compat.c
index d5f3278..ca5bb47 100644
--- a/libq/compat.c
+++ b/libq/compat.c
@@ -8,28 +8,6 @@
#define S_BLKSIZE DK_DEVID_BLKSIZE
-/* strcasestr is a GNU extention */
-char* strcasestr(const char *big, const char *little) {
- char* b = alloca((strlen(big) + 1) * sizeof(char));
- char* l = alloca((strlen(little) + 1) * sizeof(char));
- char* off;
- size_t i;
- for (i = 0; big[i]; i++) b[i] = (char)tolower(big[i]);
- for (i = 0; little[i]; i++) l[i] = (char)tolower(little[i]);
- off = strstr(b, l);
- return(off == NULL ? off : (char*)(big + (off - b)));
-}
-
-#undef xasprintf
-#define xasprintf(strp, fmt, args...) \
- do { /* xasprintf() */ \
- char str[BUFSIZ]; \
- if ((snprintf(str, sizeof(str)-1, fmt , ## args)) == -1) \
- err("Out of stack space?"); \
- str[sizeof(str)-1] = '\0'; \
- *strp = xstrdup(str); \
- } while (0)
-
#elif defined(__hpux__) || defined(__MINT__)
/* must not include both dir.h and dirent.h on hpux11..11 & FreeMiNT */
#elif defined(__linux__)