]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Enable the new -s substitution support on FreeBSD, include
authorTim Kientzle <kientzle@gmail.com>
Sat, 24 May 2008 21:19:02 +0000 (17:19 -0400)
committerTim Kientzle <kientzle@gmail.com>
Sat, 24 May 2008 21:19:02 +0000 (17:19 -0400)
the new source file, and fix a minor compiler warning in the
substitution code.

SVN-Revision: 91

tar/Makefile
tar/config_freebsd.h
tar/subst.c

index b6a6a7768ac8f5a5e43c99e0cbd1c85ce0fc4392..57888f269e315927b3bf64d2f3a5cc2c96797c1e 100644 (file)
@@ -2,7 +2,7 @@
 
 PROG=  bsdtar
 BSDTAR_VERSION_STRING=2.5.3b
-SRCS=  bsdtar.c getdate.y matching.c read.c siginfo.c tree.c util.c write.c
+SRCS=  bsdtar.c getdate.y matching.c read.c siginfo.c subst.c tree.c util.c write.c
 WARNS?=        5
 DPADD= ${LIBARCHIVE} ${LIBBZ2} ${LIBZ}
 LDADD= -larchive -lbz2 -lz
index 8704f05ca83b24d7b67ea4a4aef2b1035c2ff219..52737c41e90312414133f674dfb812d51d9cb91c 100644 (file)
@@ -77,6 +77,7 @@
 #endif
 #define        HAVE_PATHS_H 1
 #define        HAVE_PWD_H 1
+#define        HAVE_REGEX_H 1
 #define        HAVE_SETLOCALE 1
 #define        HAVE_STDARG_H 1
 #define        HAVE_STDINT_H 1
index 2233a21e17e2134fce68fd96897b6b49662b73b0..9fcd4d95fcf5e312c44b043c92691ba4d040e540 100644 (file)
@@ -224,7 +224,7 @@ apply_substitution(struct bsdtar *bsdtar, const char *name, char **result, int s
                                break;
                        case '1' ... '9':
                                realloc_strncat(bsdtar, result, rule->result + j, i - j - 1);
-                               if (c - '0' > rule->re.re_nsub) {
+                               if ((size_t)(c - '0') > (size_t)(rule->re.re_nsub)) {
                                        free(*result);
                                        *result = NULL;
                                        return -1;