diff options
author | Ron Yorston <rmy@pobox.com> | 2018-02-13 09:44:44 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2018-02-13 09:44:44 +0000 |
commit | dc19a361bd6c6df30338371532691bbc7f7126bb (patch) | |
tree | 1fb2cd646d54b5f8e425c4f11f3e09fc21d1966b /include | |
parent | 096aee2bb468d1ab044de36e176ed1f6c7e3674d (diff) | |
parent | 3459024bf404af814cacfe90a0deb719e282ae62 (diff) | |
download | busybox-w32-dc19a361bd6c6df30338371532691bbc7f7126bb.tar.gz busybox-w32-dc19a361bd6c6df30338371532691bbc7f7126bb.tar.bz2 busybox-w32-dc19a361bd6c6df30338371532691bbc7f7126bb.zip |
Merge branch 'busybox' into merge
Diffstat (limited to 'include')
-rw-r--r-- | include/bb_archive.h | 15 | ||||
-rw-r--r-- | include/libbb.h | 26 | ||||
-rw-r--r-- | include/liblzo_interface.h | 6 |
3 files changed, 36 insertions, 11 deletions
diff --git a/include/bb_archive.h b/include/bb_archive.h index acb3c3cbd..c67a299d1 100644 --- a/include/bb_archive.h +++ b/include/bb_archive.h | |||
@@ -260,6 +260,21 @@ int bbunpack(char **argv, | |||
260 | char* FAST_FUNC (*make_new_name)(char *filename, const char *expected_ext), | 260 | char* FAST_FUNC (*make_new_name)(char *filename, const char *expected_ext), |
261 | const char *expected_ext | 261 | const char *expected_ext |
262 | ) FAST_FUNC; | 262 | ) FAST_FUNC; |
263 | #define BBUNPK_OPTSTR "cfkvq" | ||
264 | #define BBUNPK_OPTSTRLEN 5 | ||
265 | #define BBUNPK_OPTSTRMASK ((1 << BBUNPK_OPTSTRLEN) - 1) | ||
266 | enum { | ||
267 | BBUNPK_OPT_STDOUT = 1 << 0, | ||
268 | BBUNPK_OPT_FORCE = 1 << 1, | ||
269 | /* only some decompressors: */ | ||
270 | BBUNPK_OPT_KEEP = 1 << 2, | ||
271 | BBUNPK_OPT_VERBOSE = 1 << 3, | ||
272 | BBUNPK_OPT_QUIET = 1 << 4, | ||
273 | /* not included in BBUNPK_OPTSTR: */ | ||
274 | BBUNPK_OPT_DECOMPRESS = 1 << 5, | ||
275 | BBUNPK_OPT_TEST = 1 << 6, | ||
276 | BBUNPK_SEAMLESS_MAGIC = (1 << 31) * ENABLE_ZCAT * SEAMLESS_COMPRESSION, | ||
277 | }; | ||
263 | 278 | ||
264 | void check_errors_in_children(int signo); | 279 | void check_errors_in_children(int signo); |
265 | #if BB_MMU | 280 | #if BB_MMU |
diff --git a/include/libbb.h b/include/libbb.h index 5be5684da..761370111 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -422,10 +422,11 @@ enum { /* cp.c, mv.c, install.c depend on these values. CAREFUL when changing th | |||
422 | /* -P = -d (mapped in cp.c) */ | 422 | /* -P = -d (mapped in cp.c) */ |
423 | FILEUTILS_VERBOSE = (1 << 12) * ENABLE_FEATURE_VERBOSE, /* -v */ | 423 | FILEUTILS_VERBOSE = (1 << 12) * ENABLE_FEATURE_VERBOSE, /* -v */ |
424 | FILEUTILS_UPDATE = 1 << 13, /* -u */ | 424 | FILEUTILS_UPDATE = 1 << 13, /* -u */ |
425 | FILEUTILS_NO_TARGET_DIR = 1 << 14, /* -T */ | ||
425 | #if ENABLE_SELINUX | 426 | #if ENABLE_SELINUX |
426 | FILEUTILS_PRESERVE_SECURITY_CONTEXT = 1 << 14, /* -c */ | 427 | FILEUTILS_PRESERVE_SECURITY_CONTEXT = 1 << 15, /* -c */ |
427 | #endif | 428 | #endif |
428 | FILEUTILS_RMDEST = 1 << (15 - !ENABLE_SELINUX), /* --remove-destination */ | 429 | FILEUTILS_RMDEST = 1 << (16 - !ENABLE_SELINUX), /* --remove-destination */ |
429 | /* | 430 | /* |
430 | * Hole. cp may have some bits set here, | 431 | * Hole. cp may have some bits set here, |
431 | * they should not affect remove_file()/copy_file() | 432 | * they should not affect remove_file()/copy_file() |
@@ -435,7 +436,7 @@ enum { /* cp.c, mv.c, install.c depend on these values. CAREFUL when changing th | |||
435 | #endif | 436 | #endif |
436 | FILEUTILS_IGNORE_CHMOD_ERR = 1 << 31, | 437 | FILEUTILS_IGNORE_CHMOD_ERR = 1 << 31, |
437 | }; | 438 | }; |
438 | #define FILEUTILS_CP_OPTSTR "pdRfilsLHarPvu" IF_SELINUX("c") | 439 | #define FILEUTILS_CP_OPTSTR "pdRfilsLHarPvuT" IF_SELINUX("c") |
439 | extern int remove_file(const char *path, int flags) FAST_FUNC; | 440 | extern int remove_file(const char *path, int flags) FAST_FUNC; |
440 | /* NB: without FILEUTILS_RECUR in flags, it will basically "cat" | 441 | /* NB: without FILEUTILS_RECUR in flags, it will basically "cat" |
441 | * the source, not copy (unless "source" is a directory). | 442 | * the source, not copy (unless "source" is a directory). |
@@ -658,6 +659,7 @@ void setsockopt_reuseaddr(int fd) FAST_FUNC; /* On Linux this never fails. */ | |||
658 | int setsockopt_keepalive(int fd) FAST_FUNC; | 659 | int setsockopt_keepalive(int fd) FAST_FUNC; |
659 | int setsockopt_broadcast(int fd) FAST_FUNC; | 660 | int setsockopt_broadcast(int fd) FAST_FUNC; |
660 | int setsockopt_bindtodevice(int fd, const char *iface) FAST_FUNC; | 661 | int setsockopt_bindtodevice(int fd, const char *iface) FAST_FUNC; |
662 | int bb_getsockname(int sockfd, void *addr, socklen_t addrlen) FAST_FUNC; | ||
661 | /* NB: returns port in host byte order */ | 663 | /* NB: returns port in host byte order */ |
662 | unsigned bb_lookup_port(const char *port, const char *protocol, unsigned default_port) FAST_FUNC; | 664 | unsigned bb_lookup_port(const char *port, const char *protocol, unsigned default_port) FAST_FUNC; |
663 | typedef struct len_and_sockaddr { | 665 | typedef struct len_and_sockaddr { |
@@ -794,7 +796,8 @@ static inline tls_state_t *new_tls_state(void) | |||
794 | return tls; | 796 | return tls; |
795 | } | 797 | } |
796 | void tls_handshake(tls_state_t *tls, const char *sni) FAST_FUNC; | 798 | void tls_handshake(tls_state_t *tls, const char *sni) FAST_FUNC; |
797 | void tls_run_copy_loop(tls_state_t *tls) FAST_FUNC; | 799 | #define TLSLOOP_EXIT_ON_LOCAL_EOF (1 << 0) |
800 | void tls_run_copy_loop(tls_state_t *tls, unsigned flags) FAST_FUNC; | ||
798 | 801 | ||
799 | 802 | ||
800 | void socket_want_pktinfo(int fd) FAST_FUNC; | 803 | void socket_want_pktinfo(int fd) FAST_FUNC; |
@@ -808,6 +811,7 @@ ssize_t recv_from_to(int fd, void *buf, size_t len, int flags, | |||
808 | socklen_t sa_size) FAST_FUNC; | 811 | socklen_t sa_size) FAST_FUNC; |
809 | 812 | ||
810 | uint16_t inet_cksum(uint16_t *addr, int len) FAST_FUNC; | 813 | uint16_t inet_cksum(uint16_t *addr, int len) FAST_FUNC; |
814 | int parse_pasv_epsv(char *buf) FAST_FUNC; | ||
811 | 815 | ||
812 | /* 0 if argv[0] is NULL: */ | 816 | /* 0 if argv[0] is NULL: */ |
813 | unsigned string_array_len(char **argv) FAST_FUNC; | 817 | unsigned string_array_len(char **argv) FAST_FUNC; |
@@ -1966,6 +1970,8 @@ typedef struct md5_ctx_t md5sha_ctx_t; | |||
1966 | 1970 | ||
1967 | extern uint32_t *global_crc32_table; | 1971 | extern uint32_t *global_crc32_table; |
1968 | uint32_t *crc32_filltable(uint32_t *tbl256, int endian) FAST_FUNC; | 1972 | uint32_t *crc32_filltable(uint32_t *tbl256, int endian) FAST_FUNC; |
1973 | uint32_t *crc32_new_table_le(void) FAST_FUNC; | ||
1974 | uint32_t *global_crc32_new_table_le(void) FAST_FUNC; | ||
1969 | uint32_t crc32_block_endian1(uint32_t val, const void *buf, unsigned len, uint32_t *crc_table) FAST_FUNC; | 1975 | uint32_t crc32_block_endian1(uint32_t val, const void *buf, unsigned len, uint32_t *crc_table) FAST_FUNC; |
1970 | uint32_t crc32_block_endian0(uint32_t val, const void *buf, unsigned len, uint32_t *crc_table) FAST_FUNC; | 1976 | uint32_t crc32_block_endian0(uint32_t val, const void *buf, unsigned len, uint32_t *crc_table) FAST_FUNC; |
1971 | 1977 | ||
@@ -2048,10 +2054,16 @@ extern const char bb_path_wtmp_file[] ALIGN1; | |||
2048 | #else | 2054 | #else |
2049 | extern const char bb_busybox_exec_path[] ALIGN1; | 2055 | extern const char bb_busybox_exec_path[] ALIGN1; |
2050 | #endif | 2056 | #endif |
2051 | /* util-linux manpage says /sbin:/bin:/usr/sbin:/usr/bin, | 2057 | /* allow default system PATH to be extended via CFLAGS */ |
2052 | * but I want to save a few bytes here */ | 2058 | #ifndef BB_ADDITIONAL_PATH |
2053 | extern const char bb_PATH_root_path[] ALIGN1; /* "PATH=/sbin:/usr/sbin:/bin:/usr/bin" */ | 2059 | #define BB_ADDITIONAL_PATH "" |
2060 | #endif | ||
2061 | #define BB_PATH_ROOT_PATH "PATH=/sbin:/usr/sbin:/bin:/usr/bin" BB_ADDITIONAL_PATH | ||
2062 | extern const char bb_PATH_root_path[] ALIGN1; /* BB_PATH_ROOT_PATH */ | ||
2054 | #define bb_default_root_path (bb_PATH_root_path + sizeof("PATH")) | 2063 | #define bb_default_root_path (bb_PATH_root_path + sizeof("PATH")) |
2064 | /* util-linux manpage says /sbin:/bin:/usr/sbin:/usr/bin, | ||
2065 | * but I want to save a few bytes here: | ||
2066 | */ | ||
2055 | #define bb_default_path (bb_PATH_root_path + sizeof("PATH=/sbin:/usr/sbin")) | 2067 | #define bb_default_path (bb_PATH_root_path + sizeof("PATH=/sbin:/usr/sbin")) |
2056 | 2068 | ||
2057 | extern const int const_int_0; | 2069 | extern const int const_int_0; |
diff --git a/include/liblzo_interface.h b/include/liblzo_interface.h index b7f1b639b..1e194b944 100644 --- a/include/liblzo_interface.h +++ b/include/liblzo_interface.h | |||
@@ -49,12 +49,10 @@ int lzo1x_999_compress_level(const uint8_t* in, unsigned in_len, | |||
49 | 49 | ||
50 | /* decompression */ | 50 | /* decompression */ |
51 | //int lzo1x_decompress(const uint8_t* src, unsigned src_len, | 51 | //int lzo1x_decompress(const uint8_t* src, unsigned src_len, |
52 | // uint8_t* dst, unsigned* dst_len, | 52 | // uint8_t* dst, unsigned* dst_len /*, void* wrkmem */); |
53 | // void* wrkmem /* NOT USED */); | ||
54 | /* safe decompression with overrun testing */ | 53 | /* safe decompression with overrun testing */ |
55 | int lzo1x_decompress_safe(const uint8_t* src, unsigned src_len, | 54 | int lzo1x_decompress_safe(const uint8_t* src, unsigned src_len, |
56 | uint8_t* dst, unsigned* dst_len, | 55 | uint8_t* dst, unsigned* dst_len /*, void* wrkmem */); |
57 | void* wrkmem /* NOT USED */); | ||
58 | 56 | ||
59 | #define LZO_E_OK 0 | 57 | #define LZO_E_OK 0 |
60 | #define LZO_E_ERROR (-1) | 58 | #define LZO_E_ERROR (-1) |