aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2018-02-13 09:44:44 +0000
committerRon Yorston <rmy@pobox.com>2018-02-13 09:44:44 +0000
commitdc19a361bd6c6df30338371532691bbc7f7126bb (patch)
tree1fb2cd646d54b5f8e425c4f11f3e09fc21d1966b /include
parent096aee2bb468d1ab044de36e176ed1f6c7e3674d (diff)
parent3459024bf404af814cacfe90a0deb719e282ae62 (diff)
downloadbusybox-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.h15
-rw-r--r--include/libbb.h26
-rw-r--r--include/liblzo_interface.h6
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)
266enum {
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
264void check_errors_in_children(int signo); 279void 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")
439extern int remove_file(const char *path, int flags) FAST_FUNC; 440extern 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. */
658int setsockopt_keepalive(int fd) FAST_FUNC; 659int setsockopt_keepalive(int fd) FAST_FUNC;
659int setsockopt_broadcast(int fd) FAST_FUNC; 660int setsockopt_broadcast(int fd) FAST_FUNC;
660int setsockopt_bindtodevice(int fd, const char *iface) FAST_FUNC; 661int setsockopt_bindtodevice(int fd, const char *iface) FAST_FUNC;
662int 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 */
662unsigned bb_lookup_port(const char *port, const char *protocol, unsigned default_port) FAST_FUNC; 664unsigned bb_lookup_port(const char *port, const char *protocol, unsigned default_port) FAST_FUNC;
663typedef struct len_and_sockaddr { 665typedef 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}
796void tls_handshake(tls_state_t *tls, const char *sni) FAST_FUNC; 798void tls_handshake(tls_state_t *tls, const char *sni) FAST_FUNC;
797void tls_run_copy_loop(tls_state_t *tls) FAST_FUNC; 799#define TLSLOOP_EXIT_ON_LOCAL_EOF (1 << 0)
800void tls_run_copy_loop(tls_state_t *tls, unsigned flags) FAST_FUNC;
798 801
799 802
800void socket_want_pktinfo(int fd) FAST_FUNC; 803void 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
810uint16_t inet_cksum(uint16_t *addr, int len) FAST_FUNC; 813uint16_t inet_cksum(uint16_t *addr, int len) FAST_FUNC;
814int parse_pasv_epsv(char *buf) FAST_FUNC;
811 815
812/* 0 if argv[0] is NULL: */ 816/* 0 if argv[0] is NULL: */
813unsigned string_array_len(char **argv) FAST_FUNC; 817unsigned string_array_len(char **argv) FAST_FUNC;
@@ -1966,6 +1970,8 @@ typedef struct md5_ctx_t md5sha_ctx_t;
1966 1970
1967extern uint32_t *global_crc32_table; 1971extern uint32_t *global_crc32_table;
1968uint32_t *crc32_filltable(uint32_t *tbl256, int endian) FAST_FUNC; 1972uint32_t *crc32_filltable(uint32_t *tbl256, int endian) FAST_FUNC;
1973uint32_t *crc32_new_table_le(void) FAST_FUNC;
1974uint32_t *global_crc32_new_table_le(void) FAST_FUNC;
1969uint32_t crc32_block_endian1(uint32_t val, const void *buf, unsigned len, uint32_t *crc_table) FAST_FUNC; 1975uint32_t crc32_block_endian1(uint32_t val, const void *buf, unsigned len, uint32_t *crc_table) FAST_FUNC;
1970uint32_t crc32_block_endian0(uint32_t val, const void *buf, unsigned len, uint32_t *crc_table) FAST_FUNC; 1976uint32_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
2049extern const char bb_busybox_exec_path[] ALIGN1; 2055extern 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
2053extern 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
2062extern 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
2057extern const int const_int_0; 2069extern 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 */
55int lzo1x_decompress_safe(const uint8_t* src, unsigned src_len, 54int 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)