aboutsummaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorTim Kientzle <kientzle@FreeBSD.org>2007-08-07 05:10:18 +0000
committerTim Kientzle <kientzle@FreeBSD.org>2007-08-07 05:10:18 +0000
commitab07faef384a6b9cd3c7ff3a70208a168f101ca2 (patch)
treee6ac08613f165c2206b7f2fc2014d135fdfe5a77 /usr.bin
parentd86180ce1424b8ae8d2437015c1e61f9a76eac79 (diff)
downloadsrc-ab07faef384a6b9cd3c7ff3a70208a168f101ca2.tar.gz
src-ab07faef384a6b9cd3c7ff3a70208a168f101ca2.zip
MFC include guards in bsdtar.c. Also, add HAVE_TIME_H to
bsdtar_platform.h so they actually work correctly.
Notes
Notes: svn path=/stable/6/; revision=171766
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/tar/bsdtar.c18
-rw-r--r--usr.bin/tar/bsdtar_platform.h1
2 files changed, 19 insertions, 0 deletions
diff --git a/usr.bin/tar/bsdtar.c b/usr.bin/tar/bsdtar.c
index 5a69d50d85bb..7d7613b02cb0 100644
--- a/usr.bin/tar/bsdtar.c
+++ b/usr.bin/tar/bsdtar.c
@@ -26,10 +26,18 @@
#include "bsdtar_platform.h"
__FBSDID("$FreeBSD$");
+#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
+#endif
+#ifdef HAVE_ERRNO_H
#include <errno.h>
+#endif
+#ifdef HAVE_FCNTL_H
#include <fcntl.h>
+#endif
#ifdef HAVE_GETOPT_LONG
#include <getopt.h>
#else
@@ -45,15 +53,25 @@ struct option {
#ifdef HAVE_LANGINFO_H
#include <langinfo.h>
#endif
+#ifdef HAVE_LOCALE_H
#include <locale.h>
+#endif
#ifdef HAVE_PATHS_H
#include <paths.h>
#endif
#include <stdio.h>
+#ifdef HAVE_STDLIB_H
#include <stdlib.h>
+#endif
+#ifdef HAVE_STRING_H
#include <string.h>
+#endif
+#ifdef HAVE_TIME_H
#include <time.h>
+#endif
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
#if HAVE_ZLIB_H
#include <zlib.h>
#endif
diff --git a/usr.bin/tar/bsdtar_platform.h b/usr.bin/tar/bsdtar_platform.h
index 550a248b5401..daabbcf89466 100644
--- a/usr.bin/tar/bsdtar_platform.h
+++ b/usr.bin/tar/bsdtar_platform.h
@@ -93,6 +93,7 @@
#define HAVE_SYS_PARAM_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_SYS_TYPES_H 1
+#define HAVE_TIME_H 1
#define HAVE_UINTMAX_T 1
#define HAVE_UNISTD_H 1
#define HAVE_VPRINTF 1