From 81dd9d3ebc3eca04fade4df4689c53d1d11c5f19 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Sat, 18 Dec 2010 04:48:09 +1000 Subject: Detect undefined PATH_MAX POSIX does not require PATH_MAX be defined when there is not actual limit to its value. This affects HURD based systems. Work around this by defining PATH_MAX to 4096 (as on Linux) when this is not defined. Also, clean up inclusions of limits.h and remove autoconf check for this header as we do not use macro shields for its inclusion anyway. Signed-off-by: Allan McRae Signed-off-by: Dan McGee --- lib/libalpm/be_sync.c | 1 + lib/libalpm/db.h | 1 - lib/libalpm/dload.c | 1 - lib/libalpm/error.c | 1 - lib/libalpm/package.c | 1 - lib/libalpm/sync.c | 1 + lib/libalpm/trans.c | 1 + 7 files changed, 3 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/libalpm/be_sync.c b/lib/libalpm/be_sync.c index d0f98c20..4786864a 100644 --- a/lib/libalpm/be_sync.c +++ b/lib/libalpm/be_sync.c @@ -23,6 +23,7 @@ #include #include #include +#include /* libarchive */ #include diff --git a/lib/libalpm/db.h b/lib/libalpm/db.h index ace366d1..10aa1644 100644 --- a/lib/libalpm/db.h +++ b/lib/libalpm/db.h @@ -23,7 +23,6 @@ #define _ALPM_DB_H #include "alpm.h" -#include #include /* libarchive */ diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c index 1cb24e61..ea7f5570 100644 --- a/lib/libalpm/dload.c +++ b/lib/libalpm/dload.c @@ -29,7 +29,6 @@ #include #include #include -#include /* the following two are needed on BSD for libfetch */ #if defined(HAVE_SYS_SYSLIMITS_H) #include /* PATH_MAX */ diff --git a/lib/libalpm/error.c b/lib/libalpm/error.c index 78a78667..d4c296fc 100644 --- a/lib/libalpm/error.c +++ b/lib/libalpm/error.c @@ -22,7 +22,6 @@ /* TODO: needed for the libfetch stuff, unfortunately- we should kill it */ #include -#include /* the following two are needed on BSD for libfetch */ #if defined(HAVE_SYS_SYSLIMITS_H) #include /* PATH_MAX */ diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c index 2ea51251..edfb7bd3 100644 --- a/lib/libalpm/package.c +++ b/lib/libalpm/package.c @@ -25,7 +25,6 @@ #include #include -#include #include #include #include diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c index 8af32e45..0a978024 100644 --- a/lib/libalpm/sync.c +++ b/lib/libalpm/sync.c @@ -31,6 +31,7 @@ #include /* intmax_t */ #include #include +#include /* libalpm */ #include "sync.h" diff --git a/lib/libalpm/trans.c b/lib/libalpm/trans.c index 5bc2c911..5c132111 100644 --- a/lib/libalpm/trans.c +++ b/lib/libalpm/trans.c @@ -31,6 +31,7 @@ #include #include #include +#include /* libalpm */ #include "trans.h" -- cgit v1.2.3-70-g09d2