From dfee4c496f8ce45c701600db9aff5dfcaa4f8505 Mon Sep 17 00:00:00 2001 From: Tim Kientzle Date: Sat, 7 Aug 2004 17:17:11 +0000 Subject: [PATCH] Linux port corrections: * Add a more reasonable default device for linux * Add an autoconf check for the FNM_LEADING_DIR extension (which isn't yet obeyed in the code) --- usr.bin/tar/bsdtar.c | 5 ++++- usr.bin/tar/bsdtar_platform.h | 4 ---- usr.bin/tar/configure.ac.in | 2 ++ 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/usr.bin/tar/bsdtar.c b/usr.bin/tar/bsdtar.c index aa9fc95022a..535a8aa845d 100644 --- a/usr.bin/tar/bsdtar.c +++ b/usr.bin/tar/bsdtar.c @@ -65,11 +65,14 @@ struct option { #include "bsdtar.h" +#ifdef linux +#define _PATH_DEFTAPE "/dev/st0" +#endif + #ifndef _PATH_DEFTAPE #define _PATH_DEFTAPE "/dev/tape" #endif - static int bsdtar_getopt(struct bsdtar *, const char *optstring, const struct option **poption); static void long_help(struct bsdtar *); diff --git a/usr.bin/tar/bsdtar_platform.h b/usr.bin/tar/bsdtar_platform.h index a6919a93913..c2795a9f7f6 100644 --- a/usr.bin/tar/bsdtar_platform.h +++ b/usr.bin/tar/bsdtar_platform.h @@ -133,9 +133,6 @@ #endif #endif -/* XXX get fnmatch GNU extensions (FNM_LEADING_DIR) - * (should probably use AC_FUNC_FNMATCH_GNU once using autoconf...) */ - #if HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC #define ARCHIVE_STAT_MTIME_NANOS(st) (st)->st_mtimespec.tv_nsec #else @@ -146,5 +143,4 @@ #endif #endif - #endif /* !BSDTAR_PLATFORM_H_INCLUDED */ diff --git a/usr.bin/tar/configure.ac.in b/usr.bin/tar/configure.ac.in index 7d21439a91c..d93c3acc765 100644 --- a/usr.bin/tar/configure.ac.in +++ b/usr.bin/tar/configure.ac.in @@ -33,6 +33,8 @@ AC_CHECK_DECL([D_MD_ORDER], # Checks for library functions. AC_FUNC_FNMATCH +# Check for FNM_LEADING_DIR fnmatch extension +AC_GNU_SOURCE AC_PROG_GCC_TRADITIONAL AC_FUNC_LSTAT AC_HEADER_MAJOR