diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/bb_archive.h | 6 | ||||
-rw-r--r-- | include/libbb.h | 10 |
2 files changed, 15 insertions, 1 deletions
diff --git a/include/bb_archive.h b/include/bb_archive.h index b2cb7b347..58e4c21bb 100644 --- a/include/bb_archive.h +++ b/include/bb_archive.h | |||
@@ -252,6 +252,12 @@ typedef struct transformer_state_t { | |||
252 | off_t bytes_in; /* used in unzip code only: needs to know packed size */ | 252 | off_t bytes_in; /* used in unzip code only: needs to know packed size */ |
253 | uint32_t crc32; | 253 | uint32_t crc32; |
254 | time_t mtime; /* gunzip code may set this on exit */ | 254 | time_t mtime; /* gunzip code may set this on exit */ |
255 | |||
256 | union { /* if we read magic, it's saved here */ | ||
257 | uint8_t b[8]; | ||
258 | uint16_t b16[4]; | ||
259 | uint32_t b32[2]; | ||
260 | } magic; | ||
255 | } transformer_state_t; | 261 | } transformer_state_t; |
256 | 262 | ||
257 | void init_transformer_state(transformer_state_t *xstate) FAST_FUNC; | 263 | void init_transformer_state(transformer_state_t *xstate) FAST_FUNC; |
diff --git a/include/libbb.h b/include/libbb.h index 05a0c575c..9da94638b 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -920,6 +920,7 @@ extern ssize_t open_read_close(const char *filename, void *buf, size_t maxsz) FA | |||
920 | extern char *xmalloc_reads(int fd, size_t *maxsz_p) FAST_FUNC; | 920 | extern char *xmalloc_reads(int fd, size_t *maxsz_p) FAST_FUNC; |
921 | /* Reads block up to *maxsz_p (default: INT_MAX - 4095) */ | 921 | /* Reads block up to *maxsz_p (default: INT_MAX - 4095) */ |
922 | extern void *xmalloc_read(int fd, size_t *maxsz_p) FAST_FUNC RETURNS_MALLOC; | 922 | extern void *xmalloc_read(int fd, size_t *maxsz_p) FAST_FUNC RETURNS_MALLOC; |
923 | extern void *xmalloc_read_with_initial_buf(int fd, size_t *maxsz_p, char *buf, size_t total) FAST_FUNC; | ||
923 | /* Returns NULL if file can't be opened (default max size: INT_MAX - 4095) */ | 924 | /* Returns NULL if file can't be opened (default max size: INT_MAX - 4095) */ |
924 | extern void *xmalloc_open_read_close(const char *filename, size_t *maxsz_p) FAST_FUNC RETURNS_MALLOC; | 925 | extern void *xmalloc_open_read_close(const char *filename, size_t *maxsz_p) FAST_FUNC RETURNS_MALLOC; |
925 | /* Never returns NULL */ | 926 | /* Never returns NULL */ |
@@ -1359,7 +1360,6 @@ enum { | |||
1359 | LOGMODE_BOTH = LOGMODE_SYSLOG + LOGMODE_STDIO, | 1360 | LOGMODE_BOTH = LOGMODE_SYSLOG + LOGMODE_STDIO, |
1360 | }; | 1361 | }; |
1361 | extern const char *msg_eol; | 1362 | extern const char *msg_eol; |
1362 | extern smallint syslog_level; | ||
1363 | extern smallint logmode; | 1363 | extern smallint logmode; |
1364 | extern uint8_t xfunc_error_retval; | 1364 | extern uint8_t xfunc_error_retval; |
1365 | extern void (*die_func)(void); | 1365 | extern void (*die_func)(void); |
@@ -1379,6 +1379,14 @@ void bb_verror_msg(const char *s, va_list p, const char *strerr) FAST_FUNC; | |||
1379 | void bb_die_memory_exhausted(void) NORETURN FAST_FUNC; | 1379 | void bb_die_memory_exhausted(void) NORETURN FAST_FUNC; |
1380 | void bb_logenv_override(void) FAST_FUNC; | 1380 | void bb_logenv_override(void) FAST_FUNC; |
1381 | 1381 | ||
1382 | #if ENABLE_FEATURE_SYSLOG_INFO | ||
1383 | void bb_info_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))) FAST_FUNC; | ||
1384 | void bb_vinfo_msg(const char *s, va_list p) FAST_FUNC; | ||
1385 | #else | ||
1386 | #define bb_info_msg bb_error_msg | ||
1387 | #define bb_vinfo_msg(s,p) bb_verror_msg(s,p,NULL) | ||
1388 | #endif | ||
1389 | |||
1382 | /* We need to export XXX_main from libbusybox | 1390 | /* We need to export XXX_main from libbusybox |
1383 | * only if we build "individual" binaries | 1391 | * only if we build "individual" binaries |
1384 | */ | 1392 | */ |