diff options
author | kientzle <kientzle@FreeBSD.org> | 2004-08-14 03:45:45 +0000 |
---|---|---|
committer | kientzle <kientzle@FreeBSD.org> | 2004-08-14 03:45:45 +0000 |
commit | 49a8ad2487b2329a538450200f1b1b2d698d6a23 (patch) | |
tree | c8c3ea449972625054a074cdd1e21e770642ffbb /lib/libarchive/archive_string.c | |
parent | 136013f29f7390ade8ad49fc70a7a0ef804d10b3 (diff) | |
download | FreeBSD-src-49a8ad2487b2329a538450200f1b1b2d698d6a23.zip FreeBSD-src-49a8ad2487b2329a538450200f1b1b2d698d6a23.tar.gz |
Eliminate reliance on non-portable <err.h> by implementing a very
simple errx() function.
Improve behavior when bzlib/zlib are missing by detecting and
issuing an error message on attempts to read gzip/bzip2 compressed
archives.
Diffstat (limited to 'lib/libarchive/archive_string.c')
-rw-r--r-- | lib/libarchive/archive_string.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libarchive/archive_string.c b/lib/libarchive/archive_string.c index 323b611..0e92836 100644 --- a/lib/libarchive/archive_string.c +++ b/lib/libarchive/archive_string.c @@ -32,10 +32,10 @@ __FBSDID("$FreeBSD$"); * strings while minimizing heap activity. */ -#include <err.h> #include <stdlib.h> #include <string.h> +#include "archive_private.h" #include "archive_string.h" struct archive_string * @@ -68,8 +68,10 @@ __archive_string_ensure(struct archive_string *as, size_t s) while (as->buffer_length < s) as->buffer_length *= 2; as->s = realloc(as->s, as->buffer_length); + /* TODO: Return null instead and fix up all of our callers to + * handle this correctly. */ if (as->s == NULL) - errx(1,"Out of memory"); + __archive_errx(1, "Out of memory"); return (as); } |