[BusyBox] a few uClibc bugfixes
Manuel Novoa III
mnovoa3 at bellsouth.net
Fri Nov 17 15:57:49 UTC 2000
Here are fixes for a few bugs in uClibc (current cvs version).
1) Fix a macro side effect bug in scanf.c. (busybox ps now parses /proc
correctly for PID and STATE fields).
2) Add a missing Inline_init in stdio.c. (I can get ash to build/run now.)
3) Fix extensions in CSRC list in sysdeps/linux/common/Makefile.
<-------------------- diff starts here -------------------------->
Index: stdio/scanf.c
===================================================================
RCS file: /home/mjn3/cvsroot/uClibc/stdio/scanf.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 scanf.c
--- stdio/scanf.c 2000/11/17 03:48:44 1.1.1.1
+++ stdio/scanf.c 2000/11/17 03:59:32
@@ -201,15 +201,16 @@
strcpy(delim, "\011\012\013\014\015 ");
strcpy(digits, "0123456789ABCDEF");
- if (fmt[1] == '*') {
+ if (*++fmt == '*') {
endnull = store = 0;
++fmt;
}
- while (isdigit(*++fmt)) { /* width digit(s) */
+ while (isdigit(*fmt)) { /* width digit(s) */
if (width == -1)
width = 0;
wide1 = width = (width * 10) + (*fmt - '0');
+ ++fmt;
}
--fmt;
fmtnxt:
Index: stdio/stdio.c
===================================================================
RCS file: /home/mjn3/cvsroot/uClibc/stdio/stdio.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 stdio.c
--- stdio/stdio.c 2000/11/17 03:48:44 1.1.1.1
+++ stdio/stdio.c 2000/11/17 04:00:27
@@ -609,6 +609,8 @@
int fopen_mode = 0;
FILE *nfp = 0;
+ Inline_init;
+
/* If we've got an fp close the old one (freopen) */
if (fp) {
/* Careful, don't de-allocate it */
Index: sysdeps/linux/common/Makefile
===================================================================
RCS file: /home/mjn3/cvsroot/uClibc/sysdeps/linux/common/Makefile,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 Makefile
--- sysdeps/linux/common/Makefile 2000/11/17 03:48:44 1.1.1.1
+++ sysdeps/linux/common/Makefile 2000/11/17 04:01:27
@@ -26,10 +26,10 @@
LIBC=$(TOPDIR)libc.a
-CSRC =closedir.o dirfd.o getdents.o getdnnm.o gethstnm.o getpagesize.o \
- isatty.o kernel_version.o mkfifo.o opendir.o readdir.o rewinddir.o \
- seekdir.o setegid.o seteuid.o setpgrp.o statfix.o tell.o telldir.o \
- wait.o wait3.o _xmknod.o _fxstat.o _lxstat.o _xstat.o libc_init.o tcgetatr.o
+CSRC =closedir.c dirfd.c getdents.c getdnnm.c gethstnm.c getpagesize.c \
+ isatty.c kernel_version.c mkfifo.c opendir.c readdir.c rewinddir.c \
+ seekdir.c setegid.c seteuid.c setpgrp.c statfix.c tell.c telldir.c \
+ wait.c wait3.c _xmknod.c _fxstat.c _lxstat.c _xstat.c libc_init.c tcgetatr.c
COBJS=$(patsubst %.c,%.o, $(CSRC))
More information about the busybox
mailing list