mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 21:05:08 +00:00
A couple of miscellaneous fixes:
* prototypes for optarg/optind on platforms that don't already have them * Disambiguate version number macros * Remove unnecessary PACKAGE_NAME macro * Hook for forthcoming bsdtar test suite * Sync version number up with the portable distribution
This commit is contained in:
parent
ec3df377a1
commit
d671137571
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=175051
|
@ -1,15 +1,18 @@
|
|||
# $FreeBSD$
|
||||
|
||||
PROG= bsdtar
|
||||
VERSION= 2.2.5
|
||||
BSDTAR_VERSION_STRING= 2.4.11
|
||||
SRCS= bsdtar.c getdate.y matching.c read.c tree.c util.c write.c
|
||||
WARNS?= 5
|
||||
DPADD= ${LIBARCHIVE} ${LIBBZ2} ${LIBZ}
|
||||
LDADD= -larchive -lbz2 -lz
|
||||
CFLAGS+= -DPACKAGE_VERSION=\"${VERSION}\"
|
||||
CFLAGS+= -DBSDTAR_VERSION_STRING=\"${BSDTAR_VERSION_STRING}\"
|
||||
CFLAGS+= -DPLATFORM_CONFIG_H=\"config_freebsd.h\"
|
||||
CFLAGS+= -I${.CURDIR}
|
||||
SYMLINKS= bsdtar ${BINDIR}/tar
|
||||
MLINKS= bsdtar.1 tar.1
|
||||
|
||||
check: $(PROG)
|
||||
cd ${.CURDIR}/test && make clean test
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
|
|
|
@ -78,6 +78,14 @@ struct option {
|
|||
|
||||
#include "bsdtar.h"
|
||||
|
||||
#if !HAVE_DECL_OPTARG
|
||||
extern int optarg;
|
||||
#endif
|
||||
|
||||
#if !HAVE_DECL_OPTIND
|
||||
extern int optind;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Per POSIX.1-1988, tar defaults to reading/writing archives to/from
|
||||
* the default tape device for the system. Pick something reasonable here.
|
||||
|
@ -784,7 +792,9 @@ usage(struct bsdtar *bsdtar)
|
|||
static void
|
||||
version(void)
|
||||
{
|
||||
printf("bsdtar %s - %s\n", PACKAGE_VERSION, archive_version());
|
||||
printf("bsdtar %s - %s\n",
|
||||
BSDTAR_VERSION_STRING,
|
||||
archive_version());
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
/* A default configuration for FreeBSD, used if there is no config.h. */
|
||||
|
||||
#include <sys/param.h> /* __FreeBSD_version */
|
||||
#define PACKAGE_NAME "bsdtar"
|
||||
|
||||
#if __FreeBSD__ > 4
|
||||
#define HAVE_ACL_GET_PERM 0
|
||||
|
@ -39,6 +38,8 @@
|
|||
#undef HAVE_ATTR_XATTR_H
|
||||
#define HAVE_BZLIB_H 1
|
||||
#define HAVE_CHFLAGS 1
|
||||
#define HAVE_DECL_OPTARG 1
|
||||
#define HAVE_DECL_OPTIND 1
|
||||
#define HAVE_DIRENT_D_NAMLEN 1
|
||||
#define HAVE_DIRENT_H 1
|
||||
#define HAVE_D_MD_ORDER 1
|
||||
|
|
Loading…
Reference in a new issue