aboutsummaryrefslogtreecommitdiffstats
path: root/src/apk_blob.h
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2010-12-09 10:47:09 +0200
committerTimo Teräs <timo.teras@iki.fi>2010-12-09 10:47:09 +0200
commitd92df520790dffbc114cd17c4cd1d45a09c118f9 (patch)
treeec9072833a950a71782c871cb754fb4d7665d906 /src/apk_blob.h
parentc9690b0e7cdb977184e9649cd1bd3688787c1fb5 (diff)
downloadaports-d92df520790dffbc114cd17c4cd1d45a09c118f9.tar.bz2
aports-d92df520790dffbc114cd17c4cd1d45a09c118f9.tar.xz
io: enhance istream/bstreams with pipe to forked child
* prunes the child pid to avoid zombies * handles the errors so e.g. file-not-found is reported properly
Diffstat (limited to 'src/apk_blob.h')
-rw-r--r--src/apk_blob.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/apk_blob.h b/src/apk_blob.h
index 8ef95c6c29..877635cd34 100644
--- a/src/apk_blob.h
+++ b/src/apk_blob.h
@@ -18,7 +18,7 @@
#include "apk_defines.h"
struct apk_blob {
- unsigned int len;
+ long len;
char *ptr;
};
typedef struct apk_blob apk_blob_t;
@@ -56,6 +56,7 @@ static inline const EVP_MD *apk_checksum_default(void)
#define APK_BLOB_IS_NULL(blob) ((blob).ptr == NULL)
#define APK_BLOB_NULL ((apk_blob_t){0, NULL})
+#define APK_BLOB_ERROR(err) ((apk_blob_t){err, NULL})
#define APK_BLOB_BUF(buf) ((apk_blob_t){sizeof(buf), (char *)(buf)})
#define APK_BLOB_CSUM(csum) ((apk_blob_t){(csum).type, (char *)(csum).data})
#define APK_BLOB_STRUCT(s) ((apk_blob_t){sizeof(s), (char*)&(s)})