From 9a81c1a0754de8102e3d22454951e476a3e169e9 Mon Sep 17 00:00:00 2001 From: kientzle Date: Tue, 7 Aug 2007 05:30:22 +0000 Subject: [PATCH] MFC include guards and fill in extra definitions in bsdtar_platform.h. --- usr.bin/tar/bsdtar_platform.h | 5 ++++ usr.bin/tar/write.c | 56 +++++++++++++++++++++++++++-------- 2 files changed, 48 insertions(+), 13 deletions(-) diff --git a/usr.bin/tar/bsdtar_platform.h b/usr.bin/tar/bsdtar_platform.h index b074c580de57..58c542c9f931 100644 --- a/usr.bin/tar/bsdtar_platform.h +++ b/usr.bin/tar/bsdtar_platform.h @@ -49,15 +49,18 @@ #define HAVE_ACL_PERMSET_T 1 #define HAVE_ACL_USER 1 #endif +#undef HAVE_ATTR_XATTR_H #define HAVE_BZLIB_H 1 #define HAVE_CHFLAGS 1 #define HAVE_DIRENT_D_NAMLEN 1 #define HAVE_DIRENT_H 1 #define HAVE_D_MD_ORDER 1 #define HAVE_ERRNO_H 1 +#undef HAVE_EXT2FS_EXT2_FS_H #define HAVE_FCHDIR 1 #define HAVE_FCNTL_H 1 #define HAVE_FNMATCH 1 +#define HAVE_FNMATCH_H 1 #define HAVE_FNM_LEADING_DIR 1 #define HAVE_FTRUNCATE 1 #define HAVE_GETOPT_LONG 1 @@ -68,6 +71,8 @@ #define HAVE_LIBBZ2 1 #define HAVE_LIBZ 1 #define HAVE_LIMITS_H 1 +#undef HAVE_LINUX_FS_H +#undef HAVE_LINUX_EXT2_FS_H #define HAVE_LOCALE_H 1 #define HAVE_MALLOC 1 #define HAVE_MEMMOVE 1 diff --git a/usr.bin/tar/write.c b/usr.bin/tar/write.c index ef47f9c1d710..c116f53d71e1 100644 --- a/usr.bin/tar/write.c +++ b/usr.bin/tar/write.c @@ -26,27 +26,57 @@ #include "bsdtar_platform.h" __FBSDID("$FreeBSD$"); -#include +#ifdef HAVE_SYS_TYPES_H #include -#ifdef HAVE_POSIX_ACL +#endif +#ifdef HAVE_SYS_ACL_H #include #endif +#ifdef HAVE_SYS_IOCTL_H +#include +#endif +#ifdef HAVE_SYS_STAT_H +#include +#endif #ifdef HAVE_ATTR_XATTR_H #include #endif +#ifdef HAVE_ERRNO_H #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef __linux +#endif +#ifdef HAVE_EXT2FS_EXT2_FS_H #include -#include +#endif +#ifdef HAVE_FCNTL_H +#include +#endif +#ifdef HAVE_FNMATCH_H +#include +#endif +#ifdef HAVE_GRP_H +#include +#endif +#ifdef HAVE_LIMITS_H +#include +#endif +#ifdef HAVE_LINUX_FS_H +#include /* for Linux file flags */ +#endif +#ifdef HAVE_LINUX_EXT2_FS_H +#include /* for Linux file flags */ +#endif +#ifdef HAVE_PWD_H +#include +#endif +#include +#ifdef HAVE_STDLIB_H +#include +#endif +#ifdef HAVE_STRING_H +#include +#endif +#ifdef HAVE_UNISTD_H +#include #endif #include "bsdtar.h"