Skip to content

Commit 5a3fed1

Browse files
committed
libutil: don't provide strstr implementation
strstr is part of C89. Signed-off-by: Masatake YAMATO <[email protected]>
1 parent 1fab0f9 commit 5a3fed1

File tree

3 files changed

+0
-17
lines changed

3 files changed

+0
-17
lines changed

configure.ac

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,6 @@ if test "$REPLACE_FNMATCH" != 0; then
581581
fi
582582

583583
AC_CHECK_FUNCS(asprintf)
584-
AC_CHECK_FUNCS(strstr)
585584
AC_CHECK_FUNCS(strcasecmp stricmp, break)
586585
AC_CHECK_FUNCS(strncasecmp strnicmp, break)
587586

main/routines.c

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -300,19 +300,6 @@ extern int strnuppercmp (const char *s1, const char *s2, size_t n)
300300
return result;
301301
}
302302

303-
#ifndef HAVE_STRSTR
304-
extern char* strstr (const char *str, const char *substr)
305-
{
306-
const size_t length = strlen (substr);
307-
const char *p;
308-
309-
for (p = str ; *p != '\0' ; ++p)
310-
if (strncmp (p, substr, length) == 0)
311-
return (char*) p;
312-
return NULL;
313-
}
314-
#endif
315-
316303
extern char* strrstr (const char *str, const char *substr)
317304
{
318305
const size_t length = strlen (substr);

main/routines.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,6 @@ extern void eFreeIndirect(void **ptr);
5757
/* String manipulation functions */
5858
extern int struppercmp (const char *s1, const char *s2);
5959
extern int strnuppercmp (const char *s1, const char *s2, size_t n);
60-
#ifndef HAVE_STRSTR
61-
extern char* strstr (const char *str, const char *substr);
62-
#endif
6360
extern char* strrstr (const char *str, const char *substr);
6461
extern char* eStrdup (const char* str);
6562
extern char* eStrndup (const char* str, size_t len);

0 commit comments

Comments
 (0)