Just use string.h, strings.h if they're available.

This commit is contained in:
Micah Cowan
2008-11-11 20:54:30 -08:00
parent ad318f0903
commit 7f787f3fc9
2 changed files with 7 additions and 21 deletions

View File

@@ -208,7 +208,7 @@ AC_TRY_LINK([#include <utmpx.h>
[AC_CHECK_HEADER(dwarf.h, AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN),
[AC_CHECK_HEADER(elf.h, AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN))])]
,LIBS="$oldlibs")
AC_CHECK_HEADERS([stropts.h])
AC_CHECK_HEADERS([stropts.h string.h strings.h])
AC_CHECKING(for Solaris 2.x)
AC_EGREP_CPP(yes,

View File

@@ -75,26 +75,12 @@ extern int errno;
#undef strerror
#endif
#if !defined(SYSV) && !defined(linux)
# ifdef NEWSOS
# define strlen ___strlen___
# include <strings.h>
# undef strlen
# else /* NEWSOS */
# include <strings.h>
# endif /* NEWSOS */
#else /* SYSV */
# if defined(SVR4) || defined(NEWSOS)
# define strlen ___strlen___
# include <string.h>
# undef strlen
# if !defined(NEWSOS) && !defined(__hpux)
extern size_t strlen(const char *);
# endif
# else /* SVR4 */
# include <string.h>
# endif /* SVR4 */
#endif /* SYSV */
#ifdef HAVE_STRINGS_H
# include <strings.h>
#endif
#ifdef HAVE_STRING_H
# include <string.h>
#endif
#ifdef USEVARARGS
# if defined(__STDC__)