diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-03-21 08:50:06 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-03-21 08:50:06 +0000 |
commit | 9924ce1cdcb6e4ab9635d6370ff7db6219c56094 (patch) | |
tree | 519c1bd5ff03997c9b11ceb7972da7467e44ea48 | |
parent | 80297d5f0cbe8a3de497804dcbb1a89e6f9c1562 (diff) | |
download | busybox-w32-1_8_3.tar.gz busybox-w32-1_8_3.tar.bz2 busybox-w32-1_8_3.zip |
apply four post-1.8.2 patches; bump to 1.8.31_8_3
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | applets/applets.c | 2 | ||||
-rw-r--r-- | editors/vi.c | 9 | ||||
-rw-r--r-- | libbb/lineedit.c | 9 | ||||
-rw-r--r-- | networking/arping.c | 3 |
5 files changed, 15 insertions, 10 deletions
@@ -1,6 +1,6 @@ | |||
1 | VERSION = 1 | 1 | VERSION = 1 |
2 | PATCHLEVEL = 8 | 2 | PATCHLEVEL = 8 |
3 | SUBLEVEL = 2 | 3 | SUBLEVEL = 3 |
4 | EXTRAVERSION = | 4 | EXTRAVERSION = |
5 | NAME = Unnamed | 5 | NAME = Unnamed |
6 | 6 | ||
diff --git a/applets/applets.c b/applets/applets.c index 1950cf34e..11340c4c7 100644 --- a/applets/applets.c +++ b/applets/applets.c | |||
@@ -17,7 +17,7 @@ | |||
17 | #warning See sources.redhat.com/bugzilla/show_bug.cgi?id=3400 | 17 | #warning See sources.redhat.com/bugzilla/show_bug.cgi?id=3400 |
18 | #warning Note that glibc is unsuitable for static linking anyway. | 18 | #warning Note that glibc is unsuitable for static linking anyway. |
19 | #warning If you still want to do it, remove -Wl,--gc-sections | 19 | #warning If you still want to do it, remove -Wl,--gc-sections |
20 | #warning from top-level Makefile and remove this warning. | 20 | #warning from file scripts/trylink and remove this warning. |
21 | #error Aborting compilation. | 21 | #error Aborting compilation. |
22 | #endif | 22 | #endif |
23 | 23 | ||
diff --git a/editors/vi.c b/editors/vi.c index 345a9452d..9426ab855 100644 --- a/editors/vi.c +++ b/editors/vi.c | |||
@@ -184,6 +184,7 @@ struct globals { | |||
184 | #if ENABLE_FEATURE_VI_COLON | 184 | #if ENABLE_FEATURE_VI_COLON |
185 | char *initial_cmds[3]; // currently 2 entries, NULL terminated | 185 | char *initial_cmds[3]; // currently 2 entries, NULL terminated |
186 | #endif | 186 | #endif |
187 | char readbuffer[MAX_LINELEN]; | ||
187 | }; | 188 | }; |
188 | #define G (*ptr_to_globals) | 189 | #define G (*ptr_to_globals) |
189 | #define text (G.text ) | 190 | #define text (G.text ) |
@@ -200,6 +201,10 @@ struct globals { | |||
200 | #define term_orig (G.term_orig ) | 201 | #define term_orig (G.term_orig ) |
201 | #define term_vi (G.term_vi ) | 202 | #define term_vi (G.term_vi ) |
202 | #define initial_cmds (G.initial_cmds ) | 203 | #define initial_cmds (G.initial_cmds ) |
204 | #define readbuffer (G.readbuffer ) | ||
205 | #define INIT_G() do { \ | ||
206 | PTR_TO_GLOBALS = xzalloc(sizeof(G)); \ | ||
207 | } while (0) | ||
203 | 208 | ||
204 | static int init_text_buffer(char *); // init from file or create new | 209 | static int init_text_buffer(char *); // init from file or create new |
205 | static void edit_file(char *); // edit one file | 210 | static void edit_file(char *); // edit one file |
@@ -321,7 +326,7 @@ int vi_main(int argc, char **argv) | |||
321 | my_pid = getpid(); | 326 | my_pid = getpid(); |
322 | #endif | 327 | #endif |
323 | 328 | ||
324 | PTR_TO_GLOBALS = xzalloc(sizeof(G)); | 329 | INIT_G(); |
325 | 330 | ||
326 | #if ENABLE_FEATURE_VI_CRASHME | 331 | #if ENABLE_FEATURE_VI_CRASHME |
327 | srand((long) my_pid); | 332 | srand((long) my_pid); |
@@ -2142,8 +2147,6 @@ static int mysleep(int hund) // sleep for 'h' 1/100 seconds | |||
2142 | return safe_poll(pfd, 1, hund*10) > 0; | 2147 | return safe_poll(pfd, 1, hund*10) > 0; |
2143 | } | 2148 | } |
2144 | 2149 | ||
2145 | #define readbuffer bb_common_bufsiz1 | ||
2146 | |||
2147 | static int readed_for_parse; | 2150 | static int readed_for_parse; |
2148 | 2151 | ||
2149 | //----- IO Routines -------------------------------------------- | 2152 | //----- IO Routines -------------------------------------------- |
diff --git a/libbb/lineedit.c b/libbb/lineedit.c index f65e852b1..4253054c5 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c | |||
@@ -1211,7 +1211,7 @@ static void parse_prompt(const char *prmt_ptr) | |||
1211 | #endif | 1211 | #endif |
1212 | 1212 | ||
1213 | #define setTermSettings(fd, argp) tcsetattr(fd, TCSANOW, argp) | 1213 | #define setTermSettings(fd, argp) tcsetattr(fd, TCSANOW, argp) |
1214 | #define getTermSettings(fd, argp) tcgetattr(fd, argp); | 1214 | #define getTermSettings(fd, argp) tcgetattr(fd, argp) |
1215 | 1215 | ||
1216 | static sighandler_t previous_SIGWINCH_handler; | 1216 | static sighandler_t previous_SIGWINCH_handler; |
1217 | 1217 | ||
@@ -1270,9 +1270,10 @@ int read_line_input(const char *prompt, char *command, int maxsize, line_input_t | |||
1270 | smalluint prevc; | 1270 | smalluint prevc; |
1271 | #endif | 1271 | #endif |
1272 | 1272 | ||
1273 | getTermSettings(0, (void *) &initial_settings); | 1273 | if (getTermSettings(0, (void *) &initial_settings) < 0 |
1274 | /* Happens when e.g. stty -echo was run before */ | 1274 | /* Happens when e.g. stty -echo was run before */ |
1275 | if (!(initial_settings.c_lflag & ECHO)) { | 1275 | || !(initial_settings.c_lflag & ECHO) |
1276 | ) { | ||
1276 | parse_prompt(prompt); | 1277 | parse_prompt(prompt); |
1277 | fflush(stdout); | 1278 | fflush(stdout); |
1278 | fgets(command, maxsize, stdin); | 1279 | fgets(command, maxsize, stdin); |
diff --git a/networking/arping.c b/networking/arping.c index 44615d5b1..a8ee9bf39 100644 --- a/networking/arping.c +++ b/networking/arping.c | |||
@@ -207,7 +207,8 @@ static int recv_pack(unsigned char *buf, int len, struct sockaddr_ll *FROM) | |||
207 | } | 207 | } |
208 | 208 | ||
209 | if (last) { | 209 | if (last) { |
210 | printf(" %u.%03ums\n", last / 1000, last % 1000); | 210 | unsigned diff = MONOTONIC_US() - last; |
211 | printf(" %u.%03ums\n", diff / 1000, diff % 1000); | ||
211 | } else { | 212 | } else { |
212 | printf(" UNSOLICITED?\n"); | 213 | printf(" UNSOLICITED?\n"); |
213 | } | 214 | } |