diff options
author | Ron Yorston <rmy@pobox.com> | 2013-08-27 16:10:53 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2013-08-27 16:10:53 +0100 |
commit | 3fd34651ea72ea1c335d3170f234cb0517fd897f (patch) | |
tree | 36e8fc40cffd464ffda4759020777dd3ca23ca31 /include | |
parent | e3ac39098326de084a805d0dd31db9666b734f20 (diff) | |
parent | d6ae4fb446daedfe3073d67be655942e9fa7eb18 (diff) | |
download | busybox-w32-3fd34651ea72ea1c335d3170f234cb0517fd897f.tar.gz busybox-w32-3fd34651ea72ea1c335d3170f234cb0517fd897f.tar.bz2 busybox-w32-3fd34651ea72ea1c335d3170f234cb0517fd897f.zip |
Merge branch 'busybox' into merge
Diffstat (limited to 'include')
-rw-r--r-- | include/applets.src.h | 9 | ||||
-rw-r--r-- | include/bb_e2fs_defs.h | 2 | ||||
-rw-r--r-- | include/libbb.h | 27 | ||||
-rw-r--r-- | include/liblzo_interface.h | 2 | ||||
-rw-r--r-- | include/platform.h | 1 |
5 files changed, 29 insertions, 12 deletions
diff --git a/include/applets.src.h b/include/applets.src.h index 00172b1bc..aa319bbc9 100644 --- a/include/applets.src.h +++ b/include/applets.src.h | |||
@@ -52,6 +52,12 @@ s - suid type: | |||
52 | # define APPLET_NOEXEC(name,main,l,s,name2) LINK l name | 52 | # define APPLET_NOEXEC(name,main,l,s,name2) LINK l name |
53 | # define APPLET_NOFORK(name,main,l,s,name2) LINK l name | 53 | # define APPLET_NOFORK(name,main,l,s,name2) LINK l name |
54 | 54 | ||
55 | #elif defined(MAKE_SUID) | ||
56 | # define APPLET(name,l,s) SUID s l name | ||
57 | # define APPLET_ODDNAME(name,main,l,s,name2) SUID s l name | ||
58 | # define APPLET_NOEXEC(name,main,l,s,name2) SUID s l name | ||
59 | # define APPLET_NOFORK(name,main,l,s,name2) SUID s l name | ||
60 | |||
55 | #else | 61 | #else |
56 | static struct bb_applet applets[] = { /* name, main, location, need_suid */ | 62 | static struct bb_applet applets[] = { /* name, main, location, need_suid */ |
57 | # define APPLET(name,l,s) { #name, #name, l, s }, | 63 | # define APPLET(name,l,s) { #name, #name, l, s }, |
@@ -415,7 +421,8 @@ IF_YES(APPLET_NOFORK(yes, yes, BB_DIR_USR_BIN, BB_SUID_DROP, yes)) | |||
415 | IF_GUNZIP(APPLET_ODDNAME(zcat, gunzip, BB_DIR_BIN, BB_SUID_DROP, zcat)) | 421 | IF_GUNZIP(APPLET_ODDNAME(zcat, gunzip, BB_DIR_BIN, BB_SUID_DROP, zcat)) |
416 | IF_ZCIP(APPLET(zcip, BB_DIR_SBIN, BB_SUID_DROP)) | 422 | IF_ZCIP(APPLET(zcip, BB_DIR_SBIN, BB_SUID_DROP)) |
417 | 423 | ||
418 | #if !defined(PROTOTYPES) && !defined(NAME_MAIN_CNAME) && !defined(MAKE_USAGE) | 424 | #if !defined(PROTOTYPES) && !defined(NAME_MAIN_CNAME) && !defined(MAKE_USAGE) \ |
425 | && !defined(MAKE_LINKS) && !defined(MAKE_SUID) | ||
419 | }; | 426 | }; |
420 | #endif | 427 | #endif |
421 | 428 | ||
diff --git a/include/bb_e2fs_defs.h b/include/bb_e2fs_defs.h index b400f8c11..3f5e3c45b 100644 --- a/include/bb_e2fs_defs.h +++ b/include/bb_e2fs_defs.h | |||
@@ -442,7 +442,7 @@ struct ext2_super_block { | |||
442 | uint32_t s_reserved[162]; /* Padding to the end of the block */ | 442 | uint32_t s_reserved[162]; /* Padding to the end of the block */ |
443 | }; | 443 | }; |
444 | struct BUG_ext2_super_block { | 444 | struct BUG_ext2_super_block { |
445 | char bug[sizeof(struct ext2_super_block) == 1024 ? 1 : -1]; | 445 | char bug[sizeof(struct ext2_super_block) == 1024 ? 1 : -1]; |
446 | }; | 446 | }; |
447 | 447 | ||
448 | /* | 448 | /* |
diff --git a/include/libbb.h b/include/libbb.h index f5b7d8dc7..9adb037ca 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -496,9 +496,9 @@ int xmkstemp(char *template) FAST_FUNC; | |||
496 | off_t fdlength(int fd) FAST_FUNC; | 496 | off_t fdlength(int fd) FAST_FUNC; |
497 | 497 | ||
498 | uoff_t FAST_FUNC get_volume_size_in_bytes(int fd, | 498 | uoff_t FAST_FUNC get_volume_size_in_bytes(int fd, |
499 | const char *override, | 499 | const char *override, |
500 | unsigned override_units, | 500 | unsigned override_units, |
501 | int extend); | 501 | int extend); |
502 | 502 | ||
503 | void xpipe(int filedes[2]) FAST_FUNC; | 503 | void xpipe(int filedes[2]) FAST_FUNC; |
504 | /* In this form code with pipes is much more readable */ | 504 | /* In this form code with pipes is much more readable */ |
@@ -691,6 +691,13 @@ const char* FAST_FUNC printable_string(uni_stat_t *stats, const char *str); | |||
691 | * else it is printed as-is (except for ch = 0x9b) */ | 691 | * else it is printed as-is (except for ch = 0x9b) */ |
692 | enum { PRINTABLE_META = 0x100 }; | 692 | enum { PRINTABLE_META = 0x100 }; |
693 | void fputc_printable(int ch, FILE *file) FAST_FUNC; | 693 | void fputc_printable(int ch, FILE *file) FAST_FUNC; |
694 | /* Return a string that is the printable representation of character ch. | ||
695 | * Buffer must hold at least four characters. */ | ||
696 | enum { | ||
697 | VISIBLE_ENDLINE = 1 << 0, | ||
698 | VISIBLE_SHOW_TABS = 1 << 1, | ||
699 | }; | ||
700 | void visible(unsigned ch, char *buf, int flags) FAST_FUNC; | ||
694 | 701 | ||
695 | /* dmalloc will redefine these to it's own implementation. It is safe | 702 | /* dmalloc will redefine these to it's own implementation. It is safe |
696 | * to have the prototypes here unconditionally. */ | 703 | * to have the prototypes here unconditionally. */ |
@@ -848,6 +855,9 @@ struct suffix_mult { | |||
848 | char suffix[4]; | 855 | char suffix[4]; |
849 | unsigned mult; | 856 | unsigned mult; |
850 | }; | 857 | }; |
858 | extern const struct suffix_mult bkm_suffixes[]; | ||
859 | #define km_suffixes (bkm_suffixes + 1) | ||
860 | |||
851 | #include "xatonum.h" | 861 | #include "xatonum.h" |
852 | /* Specialized: */ | 862 | /* Specialized: */ |
853 | 863 | ||
@@ -1125,9 +1135,6 @@ void bb_displayroutes(int noresolve, int netstatfmt) FAST_FUNC; | |||
1125 | 1135 | ||
1126 | 1136 | ||
1127 | /* Networking */ | 1137 | /* Networking */ |
1128 | int create_icmp_socket(void) FAST_FUNC; | ||
1129 | int create_icmp6_socket(void) FAST_FUNC; | ||
1130 | /* interface.c */ | ||
1131 | /* This structure defines protocol families and their handlers. */ | 1138 | /* This structure defines protocol families and their handlers. */ |
1132 | struct aftype { | 1139 | struct aftype { |
1133 | const char *name; | 1140 | const char *name; |
@@ -1156,6 +1163,7 @@ struct hwtype { | |||
1156 | }; | 1163 | }; |
1157 | extern smallint interface_opt_a; | 1164 | extern smallint interface_opt_a; |
1158 | int display_interfaces(char *ifname) FAST_FUNC; | 1165 | int display_interfaces(char *ifname) FAST_FUNC; |
1166 | int in_ether(const char *bufp, struct sockaddr *sap) FAST_FUNC; | ||
1159 | #if ENABLE_FEATURE_HWIB | 1167 | #if ENABLE_FEATURE_HWIB |
1160 | int in_ib(const char *bufp, struct sockaddr *sap) FAST_FUNC; | 1168 | int in_ib(const char *bufp, struct sockaddr *sap) FAST_FUNC; |
1161 | #else | 1169 | #else |
@@ -1452,7 +1460,7 @@ void read_key_ungets(char *buffer, const char *str, unsigned len) FAST_FUNC; | |||
1452 | /* It's NOT just ENABLEd or disabled. It's a number: */ | 1460 | /* It's NOT just ENABLEd or disabled. It's a number: */ |
1453 | # if defined CONFIG_FEATURE_EDITING_HISTORY && CONFIG_FEATURE_EDITING_HISTORY > 0 | 1461 | # if defined CONFIG_FEATURE_EDITING_HISTORY && CONFIG_FEATURE_EDITING_HISTORY > 0 |
1454 | # define MAX_HISTORY (CONFIG_FEATURE_EDITING_HISTORY + 0) | 1462 | # define MAX_HISTORY (CONFIG_FEATURE_EDITING_HISTORY + 0) |
1455 | unsigned size_from_HISTFILESIZE(const char *hp); | 1463 | unsigned size_from_HISTFILESIZE(const char *hp) FAST_FUNC; |
1456 | # else | 1464 | # else |
1457 | # define MAX_HISTORY 0 | 1465 | # define MAX_HISTORY 0 |
1458 | # endif | 1466 | # endif |
@@ -1494,6 +1502,7 @@ line_input_t *new_line_input_t(int flags) FAST_FUNC; | |||
1494 | * >0 length of input string, including terminating '\n' | 1502 | * >0 length of input string, including terminating '\n' |
1495 | */ | 1503 | */ |
1496 | int read_line_input(line_input_t *st, const char *prompt, char *command, int maxsize, int timeout) FAST_FUNC; | 1504 | int read_line_input(line_input_t *st, const char *prompt, char *command, int maxsize, int timeout) FAST_FUNC; |
1505 | void show_history(const line_input_t *st) FAST_FUNC; | ||
1497 | # if ENABLE_FEATURE_EDITING_SAVE_ON_EXIT | 1506 | # if ENABLE_FEATURE_EDITING_SAVE_ON_EXIT |
1498 | void save_history(line_input_t *st); | 1507 | void save_history(line_input_t *st); |
1499 | # endif | 1508 | # endif |
@@ -1825,7 +1834,7 @@ extern const char bb_default_login_shell[] ALIGN1; | |||
1825 | # define VC_4 "/dev/vc/4" | 1834 | # define VC_4 "/dev/vc/4" |
1826 | # define VC_5 "/dev/vc/5" | 1835 | # define VC_5 "/dev/vc/5" |
1827 | # define VC_FORMAT "/dev/vc/%d" | 1836 | # define VC_FORMAT "/dev/vc/%d" |
1828 | # define LOOP_FORMAT "/dev/loop/%d" | 1837 | # define LOOP_FORMAT "/dev/loop/%u" |
1829 | # define LOOP_NAMESIZE (sizeof("/dev/loop/") + sizeof(int)*3 + 1) | 1838 | # define LOOP_NAMESIZE (sizeof("/dev/loop/") + sizeof(int)*3 + 1) |
1830 | # define LOOP_NAME "/dev/loop/" | 1839 | # define LOOP_NAME "/dev/loop/" |
1831 | # define FB_0 "/dev/fb/0" | 1840 | # define FB_0 "/dev/fb/0" |
@@ -1838,7 +1847,7 @@ extern const char bb_default_login_shell[] ALIGN1; | |||
1838 | # define VC_4 "/dev/tty4" | 1847 | # define VC_4 "/dev/tty4" |
1839 | # define VC_5 "/dev/tty5" | 1848 | # define VC_5 "/dev/tty5" |
1840 | # define VC_FORMAT "/dev/tty%d" | 1849 | # define VC_FORMAT "/dev/tty%d" |
1841 | # define LOOP_FORMAT "/dev/loop%d" | 1850 | # define LOOP_FORMAT "/dev/loop%u" |
1842 | # define LOOP_NAMESIZE (sizeof("/dev/loop") + sizeof(int)*3 + 1) | 1851 | # define LOOP_NAMESIZE (sizeof("/dev/loop") + sizeof(int)*3 + 1) |
1843 | # define LOOP_NAME "/dev/loop" | 1852 | # define LOOP_NAME "/dev/loop" |
1844 | # define FB_0 "/dev/fb0" | 1853 | # define FB_0 "/dev/fb0" |
diff --git a/include/liblzo_interface.h b/include/liblzo_interface.h index 9a84c0b6b..b7f1b639b 100644 --- a/include/liblzo_interface.h +++ b/include/liblzo_interface.h | |||
@@ -30,7 +30,7 @@ | |||
30 | /* | 30 | /* |
31 | static void die_at(int line) | 31 | static void die_at(int line) |
32 | { | 32 | { |
33 | bb_error_msg_and_die("internal error at %d", line); | 33 | bb_error_msg_and_die("internal error at %d", line); |
34 | } | 34 | } |
35 | #define assert(v) if (!(v)) die_at(__LINE__) | 35 | #define assert(v) if (!(v)) die_at(__LINE__) |
36 | */ | 36 | */ |
diff --git a/include/platform.h b/include/platform.h index 432cb9cae..f18d5b74e 100644 --- a/include/platform.h +++ b/include/platform.h | |||
@@ -225,6 +225,7 @@ typedef int bb__aliased_int FIX_ALIASING; | |||
225 | typedef long bb__aliased_long FIX_ALIASING; | 225 | typedef long bb__aliased_long FIX_ALIASING; |
226 | typedef uint16_t bb__aliased_uint16_t FIX_ALIASING; | 226 | typedef uint16_t bb__aliased_uint16_t FIX_ALIASING; |
227 | typedef uint32_t bb__aliased_uint32_t FIX_ALIASING; | 227 | typedef uint32_t bb__aliased_uint32_t FIX_ALIASING; |
228 | typedef uint64_t bb__aliased_uint64_t FIX_ALIASING; | ||
228 | 229 | ||
229 | /* NB: unaligned parameter should be a pointer, aligned one - | 230 | /* NB: unaligned parameter should be a pointer, aligned one - |
230 | * a lvalue. This makes it more likely to not swap them by mistake | 231 | * a lvalue. This makes it more likely to not swap them by mistake |