From d22777146446ecaf8b4b9c0afd593d23c5c9766e Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Sat, 18 Dec 2010 05:11:29 +1000 Subject: Use limits.h for PATH_MAX We use PATH_MAX everywhere by including limits.h so there is no point in doing a check for it in a different header when dealing with FreeBSD's libfetch. Also, remove autoconf check for strings.h header as it is not used anywhere. Signed-off-by: Allan McRae Signed-off-by: Dan McGee --- configure.ac | 4 ++-- lib/libalpm/dload.c | 6 ++---- lib/libalpm/error.c | 6 ++---- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/configure.ac b/configure.ac index 11b6b11a..5627fb76 100644 --- a/configure.ac +++ b/configure.ac @@ -172,8 +172,8 @@ AS_IF([test "x$with_fetch" != "xno"], AM_CONDITIONAL([HAVE_LIBFETCH], [test "x$ac_cv_lib_fetch_fetchParseURL" = "xyes"]) # Checks for header files. -AC_CHECK_HEADERS([fcntl.h glob.h libintl.h locale.h mntent.h string.h strings.h \ - sys/ioctl.h sys/mount.h sys/param.h sys/statvfs.h sys/syslimits.h \ +AC_CHECK_HEADERS([fcntl.h glob.h libintl.h locale.h mntent.h string.h \ + sys/ioctl.h sys/mount.h sys/param.h sys/statvfs.h \ sys/time.h sys/types.h sys/ucred.h syslog.h wchar.h]) # Checks for typedefs, structures, and compiler characteristics. diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c index ea7f5570..09f716f5 100644 --- a/lib/libalpm/dload.c +++ b/lib/libalpm/dload.c @@ -29,10 +29,8 @@ #include #include #include -/* the following two are needed on BSD for libfetch */ -#if defined(HAVE_SYS_SYSLIMITS_H) -#include /* PATH_MAX */ -#endif +/* the following two are needed for FreeBSD's libfetch */ +#include /* PATH_MAX */ #if defined(HAVE_SYS_PARAM_H) #include /* MAXHOSTNAMELEN */ #endif diff --git a/lib/libalpm/error.c b/lib/libalpm/error.c index d4c296fc..3d056265 100644 --- a/lib/libalpm/error.c +++ b/lib/libalpm/error.c @@ -22,10 +22,8 @@ /* TODO: needed for the libfetch stuff, unfortunately- we should kill it */ #include -/* the following two are needed on BSD for libfetch */ -#if defined(HAVE_SYS_SYSLIMITS_H) -#include /* PATH_MAX */ -#endif +/* the following two are needed for FreeBSD's libfetch */ +#include /* PATH_MAX */ #if defined(HAVE_SYS_PARAM_H) #include /* MAXHOSTNAMELEN */ #endif -- cgit v1.2.3-24-g4f1b