summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-11-29 06:43:05 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-11-29 06:43:05 +0000
commit9343da45d3f226cc8b45879ac8dbacac2911cdd8 (patch)
tree9e76d089f819e99fc7e57f3fb771af834cdc7c5a
parent84641942e5366b2e09367ba4f4376c99f15ecc8e (diff)
downloadbusybox-w32-1_12_3.tar.gz
busybox-w32-1_12_3.tar.bz2
busybox-w32-1_12_3.zip
apply post-1.12.2 fixes, bump version to 1.12.31_12_3
-rw-r--r--Makefile2
-rw-r--r--libbb/getopt32.c13
-rw-r--r--libbb/lineedit.c2
3 files changed, 16 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index c25cf5d11..1bfb27082 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
1VERSION = 1 1VERSION = 1
2PATCHLEVEL = 12 2PATCHLEVEL = 12
3SUBLEVEL = 2 3SUBLEVEL = 3
4EXTRAVERSION = 4EXTRAVERSION =
5NAME = Unnamed 5NAME = Unnamed
6 6
diff --git a/libbb/getopt32.c b/libbb/getopt32.c
index ee85181cd..f33ead1c6 100644
--- a/libbb/getopt32.c
+++ b/libbb/getopt32.c
@@ -515,6 +515,19 @@ getopt32(char **argv, const char *applet_opts, ...)
515 } 515 }
516 } 516 }
517 517
518 /* In case getopt32 was already called:
519 * reset the libc getopt() function, which keeps internal state.
520 * run_nofork_applet_prime() does this, but we might end up here
521 * also via gunzip_main() -> gzip_main(). Play safe.
522 */
523#ifdef __GLIBC__
524 optind = 0;
525#else /* BSD style */
526 optind = 1;
527 /* optreset = 1; */
528#endif
529 /* optarg = NULL; opterr = 0; optopt = 0; - do we need this?? */
530
518 pargv = NULL; 531 pargv = NULL;
519 532
520 /* Note: just "getopt() <= 0" will not work well for 533 /* Note: just "getopt() <= 0" will not work well for
diff --git a/libbb/lineedit.c b/libbb/lineedit.c
index 1f21866ca..2388b3721 100644
--- a/libbb/lineedit.c
+++ b/libbb/lineedit.c
@@ -1415,8 +1415,10 @@ int FAST_FUNC read_line_input(const char *prompt, char *command, int maxsize, li
1415 if ((state->flags & SAVE_HISTORY) && state->hist_file) 1415 if ((state->flags & SAVE_HISTORY) && state->hist_file)
1416 load_history(state->hist_file); 1416 load_history(state->hist_file);
1417#endif 1417#endif
1418#if MAX_HISTORY > 0
1418 if (state->flags & DO_HISTORY) 1419 if (state->flags & DO_HISTORY)
1419 state->cur_history = state->cnt_history; 1420 state->cur_history = state->cnt_history;
1421#endif
1420 1422
1421 /* prepare before init handlers */ 1423 /* prepare before init handlers */
1422 cmdedit_y = 0; /* quasireal y, not true if line > xt*yt */ 1424 cmdedit_y = 0; /* quasireal y, not true if line > xt*yt */