diff --git a/ChangeLog b/ChangeLog index 48a7bb5..419c7ae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-10-14 Paolo Bonzini + + * configure.ac: Remove obselete configure tests. + * sed/fmt.c: Assume limits.h is always present. + * sed/utils.c: Assume vfprintf is always present. + 2009-10-14 Yuri G. Kudryashov (tiny change) * testsuite/Makefile.tests: Override LC_ALL, not LANG. diff --git a/configure.ac b/configure.ac index 38e79af..01e5542 100644 --- a/configure.ac +++ b/configure.ac @@ -43,17 +43,15 @@ if test "$sed_cv_libcp_needed" = yes; then LIBS="-lcP $LIBS" fi -AC_HEADER_DIRENT -AC_CHECK_HEADERS_ONCE(io.h limits.h locale.h stdarg.h alloca.h stddef.h errno.h \ - wchar.h wctype.h sys/file.h, [], [], [AC_INCLUDES_DEFAULT]) +AC_CHECK_HEADERS_ONCE(locale.h errno.h wchar.h wctype.h, + [], [], [AC_INCLUDES_DEFAULT]) AC_C_CONST AC_TYPE_SIZE_T -AC_FUNC_VPRINTF AM_GNU_GETTEXT_VERSION(0.17) AM_GNU_GETTEXT([external]) -AC_CHECK_FUNCS_ONCE(isatty bcopy bzero isascii memcpy memset strchr strtoul +AC_CHECK_FUNCS_ONCE(isatty isascii memcpy strchr strtoul popen pathconf fchown fchmod setlocale) AC_ARG_ENABLE(pcregrep, diff --git a/sed/fmt.c b/sed/fmt.c index b2d2efb..2c1f250 100644 --- a/sed/fmt.c +++ b/sed/fmt.c @@ -23,18 +23,7 @@ #include #include #include - -#if HAVE_LIMITS_H -# include -#endif - -#ifndef UINT_MAX -# define UINT_MAX ((unsigned int) ~(unsigned int) 0) -#endif - -#ifndef INT_MAX -# define INT_MAX ((int) (UINT_MAX >> 1)) -#endif +#include /* The following parameters represent the program's idea of what is "best". Adjust to taste, subject to the caveats given. */ diff --git a/sed/utils.c b/sed/utils.c index 37ec491..abb72f9 100644 --- a/sed/utils.c +++ b/sed/utils.c @@ -69,15 +69,7 @@ panic(const char *str, ...) fprintf(stderr, "%s: ", myname); va_start(ap, str); -#ifndef HAVE_VPRINTF -# ifndef HAVE_DOPRNT - fputs(str, stderr); /* not great, but perhaps better than nothing... */ -# else /* HAVE_DOPRNT */ - _doprnt(str, &ap, stderr); -# endif /* HAVE_DOPRNT */ -#else /* HAVE_VFPRINTF */ vfprintf(stderr, str, ap); -#endif /* HAVE_VFPRINTF */ va_end(ap); putc('\n', stderr);