make compressed help code NOMMU- and NOFORK-friendly -
no forking anymore, bunzip2 unpack routine now does all it in memory.
This commit is contained in:
@@ -403,9 +403,10 @@ extern char *xasprintf(const char *format, ...) __attribute__ ((format (printf,
|
||||
|
||||
/* dmalloc will redefine these to it's own implementation. It is safe
|
||||
* to have the prototypes here unconditionally. */
|
||||
extern void *malloc_or_warn(size_t size);
|
||||
extern void *xmalloc(size_t size);
|
||||
extern void *xrealloc(void *old, size_t size);
|
||||
extern void *xzalloc(size_t size);
|
||||
extern void *xrealloc(void *old, size_t size);
|
||||
|
||||
extern ssize_t safe_read(int fd, void *buf, size_t count);
|
||||
extern ssize_t full_read(int fd, void *buf, size_t count);
|
||||
@@ -862,7 +863,7 @@ void md5_begin(md5_ctx_t *ctx);
|
||||
void md5_hash(const void *data, size_t length, md5_ctx_t *ctx);
|
||||
void *md5_end(void *resbuf, md5_ctx_t *ctx);
|
||||
|
||||
uint32_t *crc32_filltable(int endian);
|
||||
uint32_t *crc32_filltable(uint32_t *tbl256, int endian);
|
||||
|
||||
|
||||
enum { /* DO NOT CHANGE THESE VALUES! cp.c, mv.c, install.c depend on them. */
|
||||
|
@@ -102,6 +102,11 @@ extern const llist_t *find_list_entry(const llist_t *list, const char *filename)
|
||||
extern const llist_t *find_list_entry2(const llist_t *list, const char *filename);
|
||||
|
||||
extern USE_DESKTOP(long long) int uncompressStream(int src_fd, int dst_fd);
|
||||
/* A bit of bunzip2 internals are exposed for compressed help support: */
|
||||
typedef struct bunzip_data bunzip_data;
|
||||
int start_bunzip(bunzip_data **bdp, int in_fd, const unsigned char *inbuf, int len);
|
||||
int read_bunzip(bunzip_data *bd, char *outbuf, int len);
|
||||
void dealloc_bunzip(bunzip_data *bd);
|
||||
|
||||
typedef struct inflate_unzip_result {
|
||||
off_t bytes_out;
|
||||
|
Reference in New Issue
Block a user