From fb643cd48329d2b8d4d79dbb6934b715e0db8dc7 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 10 Jun 2009 11:49:02 -0400 Subject: COMP: Use HAVE_SYS_PARAM_H properly in libtar The value is computed by a try-compile for libtar. This teaches the sources to actually use the result. --- Utilities/cmtar/append.c | 4 +++- Utilities/cmtar/decode.c | 4 +++- Utilities/cmtar/extract.c | 4 +++- Utilities/cmtar/libtar.c | 4 +++- Utilities/cmtar/util.c | 4 +++- Utilities/cmtar/wrapper.c | 2 +- 6 files changed, 16 insertions(+), 6 deletions(-) diff --git a/Utilities/cmtar/append.c b/Utilities/cmtar/append.c index 38e8294..14c7362 100644 --- a/Utilities/cmtar/append.c +++ b/Utilities/cmtar/append.c @@ -18,7 +18,9 @@ #if defined(_WIN32) && !defined(__CYGWIN__) # include #else -# include +# ifdef HAVE_SYS_PARAM_H +# include +# endif #endif #include #include diff --git a/Utilities/cmtar/decode.c b/Utilities/cmtar/decode.c index d6a48c5..b183010 100644 --- a/Utilities/cmtar/decode.c +++ b/Utilities/cmtar/decode.c @@ -17,7 +17,9 @@ #if defined(_WIN32) && !defined(__CYGWIN__) # include #else -# include +# ifdef HAVE_SYS_PARAM_H +# include +# endif #endif #ifndef WIN32 diff --git a/Utilities/cmtar/extract.c b/Utilities/cmtar/extract.c index 925f621..a584a8f 100644 --- a/Utilities/cmtar/extract.c +++ b/Utilities/cmtar/extract.c @@ -28,7 +28,9 @@ # include #else # include -# include +# ifdef HAVE_SYS_PARAM_H +# include +# endif #endif #ifdef STDC_HEADERS diff --git a/Utilities/cmtar/libtar.c b/Utilities/cmtar/libtar.c index b509349..0d031b7 100644 --- a/Utilities/cmtar/libtar.c +++ b/Utilities/cmtar/libtar.c @@ -19,7 +19,9 @@ #include #include #else -#include +# ifdef HAVE_SYS_PARAM_H +# include +# endif #endif #ifdef STDC_HEADERS diff --git a/Utilities/cmtar/util.c b/Utilities/cmtar/util.c index 31f7fc8..0e23a05 100644 --- a/Utilities/cmtar/util.c +++ b/Utilities/cmtar/util.c @@ -23,7 +23,9 @@ #if defined(_WIN32) && !defined(__CYGWIN__) #include #else -#include +# ifdef HAVE_SYS_PARAM_H +# include +# endif #endif /* hashing function for pathnames */ diff --git a/Utilities/cmtar/wrapper.c b/Utilities/cmtar/wrapper.c index b194717..4f1271a 100644 --- a/Utilities/cmtar/wrapper.c +++ b/Utilities/cmtar/wrapper.c @@ -17,7 +17,7 @@ #include #if defined(HAVE_SYS_PARAM_H) -#include +# include #endif #if defined(HAVE_DIRENT_H) #include -- cgit v0.12