]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
IFC.
authorTim Kientzle <kientzle@gmail.com>
Sun, 14 Dec 2008 22:05:58 +0000 (17:05 -0500)
committerTim Kientzle <kientzle@gmail.com>
Sun, 14 Dec 2008 22:05:58 +0000 (17:05 -0500)
SVN-Revision: 276

libarchive/test/main.c
tar/Makefile
tar/bsdtar.1
tar/bsdtar.h
tar/bsdtar_platform.h

index 28d1bc9bdb07385df2098f6287a44c71d6c96b13..c996a400fb0cecdd286dcf0e20d652d85eb7b260 100644 (file)
@@ -45,7 +45,7 @@
 #define        EXTRA_DUMP(x)   archive_error_string((struct archive *)(x))
 #define        EXTRA_VERSION   archive_version()
 #define KNOWNREF       "test_compat_gtar_1.tgz.uu"
-__FBSDID("$FreeBSD: src/lib/libarchive/test/main.c,v 1.14 2008/08/31 07:06:02 kientzle Exp $");
+__FBSDID("$FreeBSD: src/lib/libarchive/test/main.c,v 1.15 2008/12/08 17:22:44 kientzle Exp $");
 
 /*
  * "list.h" is simply created by "grep DEFINE_TEST"; it has
@@ -897,6 +897,7 @@ int main(int argc, char **argv)
        time_t now;
        char *refdir_alloc = NULL;
        char *progname, *p;
+       char *tmp;
        char tmpdir[256];
        char tmpdir_timestamp[256];
 
@@ -916,6 +917,17 @@ int main(int argc, char **argv)
        testprog = getenv(ENVBASE);
 #endif
 
+       if (getenv("TMPDIR") != NULL)
+               tmp = getenv("TMPDIR");
+       else if (getenv("TMP") != NULL)
+               tmp = getenv("TMP");
+       else if (getenv("TEMP") != NULL)
+               tmp = getenv("TEMP");
+       else if (getenv("TEMPDIR") != NULL)
+               tmp = getenv("TEMPDIR");
+       else
+               tmp = "/tmp";
+
        /* Allow -d to be controlled through the environment. */
        if (getenv(ENVBASE "_DEBUG") != NULL)
                dump_on_failure = 1;
@@ -976,7 +988,8 @@ int main(int argc, char **argv)
                strftime(tmpdir_timestamp, sizeof(tmpdir_timestamp),
                    "%Y-%m-%dT%H.%M.%S",
                    localtime(&now));
-               sprintf(tmpdir, "/tmp/%s.%s-%03d", progname, tmpdir_timestamp, i);
+               sprintf(tmpdir, "%s/%s.%s-%03d", tmp, progname,
+                   tmpdir_timestamp, i);
                if (mkdir(tmpdir,0755) == 0)
                        break;
                if (errno == EEXIST)
index 20329edf5e6365f893daed682eeb89af77187ddc..031d33557d62e937d7b21f37eb5f1c26eacf5bd1 100644 (file)
@@ -1,4 +1,4 @@
-# $FreeBSD: src/usr.bin/tar/Makefile,v 1.39 2008/11/08 04:43:24 kientzle Exp $
+# $FreeBSD: src/usr.bin/tar/Makefile,v 1.40 2008/12/06 07:38:14 kientzle Exp $
 
 PROG=  bsdtar
 BSDTAR_VERSION_STRING=2.5.904a
index 1859c12409d073abab8e82039161904e46a67e8b..f660948c98169c32f63fdce09f96175436f128e8 100644 (file)
@@ -22,7 +22,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $FreeBSD: src/usr.bin/tar/bsdtar.1,v 1.45 2008/11/08 04:43:24 kientzle Exp $
+.\" $FreeBSD: src/usr.bin/tar/bsdtar.1,v 1.46 2008/12/06 07:37:55 kientzle Exp $
 .\"
 .Dd May 15, 2008
 .Dt BSDTAR 1
@@ -607,7 +607,8 @@ and
 .Cm w
 options.
 .Pp
-Additional long options are provided to improve compatibility with other tar implementations.
+Additional long options are provided to improve compatibility with other
+tar implementations.
 .Sh SECURITY
 Certain security issues are common to many archiving programs, including
 .Nm .
index 04a4c2eef84ecaacf91611b56368a4c38a7be161..98398b205dac7677dd163ab667f7cbdab3e77c7f 100644 (file)
@@ -22,7 +22,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: src/usr.bin/tar/bsdtar.h,v 1.36 2008/11/08 04:43:24 kientzle Exp $
+ * $FreeBSD: src/usr.bin/tar/bsdtar.h,v 1.37 2008/12/06 07:37:14 kientzle Exp $
  */
 
 #include "bsdtar_platform.h"
index a1c96bfe9dc0d3caa1e48b2c0218868e1206e358..a47e8c9d2b90f50287534c3eebb48914c085852e 100644 (file)
@@ -22,7 +22,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: src/usr.bin/tar/bsdtar_platform.h,v 1.25 2008/01/02 00:23:00 kientzle Exp $
+ * $FreeBSD: src/usr.bin/tar/bsdtar_platform.h,v 1.26 2008/12/06 07:37:14 kientzle Exp $
  */
 
 /*