Annotation of dietlibc/CHANGES, revision 1.68
1.65 fefe 1: 0.8.1:
2: fixed initgroups (oops)
1.66 fefe 3: Cleanup appending file open for stdio (thanks, James Antill)
4: imported vfprintf fix from James Antill.
1.67 fefe 5: add fnmatch
6: change index, rindex and bcmp as weak ELF symbols (were #defined before)
1.68 ! fefe 7: Olaf added character classes to *scanf.
1.65 fefe 8:
1.64 fefe 9: 0.8:
1.34 fefe 10: vsnprintf(0,...) estimated the length of strings with a padding width
11: incorrectly.
1.35 fefe 12: new reboot() from Olaf.
1.36 fefe 13: added prototypes for getsockopt and setsockopt.
1.39 fefe 14: added experimental sem* and shm*
1.38 fefe 15: define EXIT_SUCCESS and EXIT_FAILURE
1.40 fefe 16: added setvbuf (only changes mode, not buffer)
1.41 fefe 17: added dietwarning.h (woohoo, linker warnings!) and used it to warn of
18: insecurity (system, sprintf) or bloat (printf and stdio).
1.42 fefe 19: added qsort() and bsearch(). Benchmark on 1000 random ints:
20: glibc: 679414 cycles qsort and 3352 cycles bsearch
21: diet libc: 300010 cycles qsort, 553 cycles bsearch
22: I have no idea why glibc is so slow.
1.43 fefe 23: added __isnan (references by libm.a from glibc).
24: added popen() and pclose(). Now the diet libc can link slsh (from
25: S-Lang!)
1.44 fefe 26: corrected usleep. It was more of an msleep until now.
1.45 fefe 27: corrected __dtostr (it looped when trying to format "0.0").
28: several fixes to stdio (thanks to S-Lang's excellent test suite!)
1.46 fefe 29: added ungetc (does it work?)
1.47 fefe 30: added inet_aton (yuck!)
1.50 fefe 31: added gethostbyname, gethostbyaddr, gethostbyname_r and gethostbyaddr_r
1.48 fefe 32: added h_errno and __h_errno_location
33: added inet_ntoa
1.49 fefe 34: added setpgrp and getpgrp, strsignal and execv (thanks, Olaf)
1.51 fefe 35: add bcopy, index, rindex macros
36: add isgraph and isxdigit
1.52 fefe 37: add strftime (ugh!!!)
1.53 olaf 38: Olaf fixed strftime, gmtime_r leap year bug.
1.54 fefe 39: Jeff Garzik contributed a spec file. I put it in contrib and hope
40: everbody knows what to do with it...
41: Olaf checked in a ton of libpthread stuff.
1.55 fefe 42: added mkstemp using /dev/urandom (harder to guess than getpid()).
1.56 fefe 43: add large file backwards compatibility support (so gzip will run on
44: kernel 2.2 and 2.0)
1.57 fefe 45: added shutdown
1.58 fefe 46: added nice
47: added pseudo-locale support for is* (they are now weak aliases,
48: isupper -> __isupper_ascii etc). So, for example, liblatin1 can
49: overwrite the default is* functions.
1.59 fefe 50: added liblatin1.a
1.60 fefe 51: added tzfile implementation (does it work for anyone else?)
1.61 fefe 52: added syslog(3) (thanks to Rene Müller!)
1.62 fefe 53: Jeff Garzik contributed getgr*, getpw* and getsp* in one tiny package.
54: Thanks!
1.63 fefe 55: merged duplicate code in execv and execvp into exec_lib.o
1.34 fefe 56:
1.21 fefe 57: 0.7.2:
58: added several prototypes to already implemented functions and
59: <sys/reboot.h>. Thanks for Abraham for pointing this out.
1.22 fefe 60: added prototypes for process group and dup syscalls. Thanks to
61: Abraham again. He also contributed an implementation for daemon(),
62: an ugly BSD hack. I decided to diversify the lib/ directory a
63: little and now created a libugly/ directory for stuff like system()
64: and daemon() ;-)
65: added libstdio and moved all that stdio crap from lib/ there. The
66: idea is to start separating now what we will separate for shared
67: libraries anyway.
1.26 fefe 68: optimized x86 unified-syscall by Olaf.
1.27 fefe 69: added limits.h, removed __ARCHBITS from endian.h (use __WORDSIZE from
70: limits.h instead)
71: added remove.c and enough cruft to limits.h to make it compile lzo,
72: lzop and bzip2.
1.28 fefe 73: added mktime, asctime_r, asctime and ctime (needed for gzip).
74: Someone will need to implement a reader for the glibc localtime file
1.31 fefe 75: format some day (man tzfile, ugh!) :-(
1.29 fefe 76: added unlink prototype to unistd.h.
77: added gmtime and gmtime_r.
1.31 fefe 78: fixed sparc unified syscall error handling (please upgrade!).
1.30 fefe 79: removed readdir glibc compatibility cruft.
1.31 fefe 80: removed stat glibc compatibility cruft.
1.32 fefe 81: oops, my fread was broken for pipes.
1.33 fefe 82: Olaf found a bug in pipe() for sparc, too.
1.21 fefe 83:
1.9 fefe 84: 0.7.1:
1.11 fefe 85: optimized away the static arrays from __ltostr and __lltostr.
86: optimized away the static arrays (and more!) from strtoul and strtoull.
87: added system (by Olaf).
1.12 fefe 88: added tolower and toupper
1.13 fefe 89: added getopt from Olaf (~600 bytes on x86!)
1.14 fefe 90: added clone for mips (by Olaf).
91: fixed longjmp and setjmp on sparc not to require glibc include files.
1.15 olaf 92: added pause for all (by Olaf).
1.17 fefe 93: added __attribute__ ((__const__)) to ctype.h
1.16 fefe 94: added isupper and islower.
95: added putc and putchar as macros.
1.17 fefe 96: added strcasecmp and strncasecmp (thanks to Abraham vd Merwe for
97: insightful discussions and patches I partially used for the last three)
1.18 fefe 98: added getpriority and setpriority (also by Abraham)
1.19 fefe 99: oops, I broke strtoul in a recent optimization attempt.
1.20 fefe 100: oi, setjmp and longjmp were broken on other platforms, too!
101: Thanks to Sébastien Côté for reporting this.
1.9 fefe 102:
103: 0.7:
1.6 olaf 104: clone support for i386,alpha,arm and sparc by Olaf.
1.1 cvs 105: Initial dynamic loading glue for i386, also by Olaf.
106: We don't have a dynamic loader yet, so this is not yet usable.
107: added readv, sigdelset, sigaltstack, sigfillset, sigismember, usleep,
108: vsprintf, writev, all by Olaf.
1.2 fefe 109: imported readdir fix from Guillaume. Mhh, can the kernel interface
110: really be this broken?
1.3 fefe 111: Found a kludgy way to detect whether the kernel includes define struct
112: stat64 (they also define STAT64_HAS_BROKEN_ST_INO). If this does
113: not work for you, please tell me!
1.4 fefe 114: Removed bogus __seek_types enum, it's a bunch of #defines now.
1.7 fefe 115: Fixed stdio line buffering. The code was already there but I forgot
116: to mark stdio and stdout as line buffered. This should really be
117: done dynamically using isatty, though.
1.8 fefe 118: Removed superfluous "if (1)" in execvp.c
1.1 cvs 119:
120: 0.6.14:
121: *scanf did not append the 0 byte for %s.
122: added creat and changed creat to call open directly instead of open64.
123: did for fread what 0.6.10 did for fwrite.
124: repaired buffered stdio a little (line buffering is still not
125: supported).
126: [All of these bugs have been reported by Guillaume. Thanks!]
127: added __pure__ to strchr and strrchr in <string.h>
128:
129: 0.6.13:
130: included COPYING to make clear that the diet libc is covered by the
131: GNU General Public License (and _not_ the LGPL). That means that
132: you need to obtain a license from me if you want to use the diet
133: libc in a proprietary program that you want to distribute.
134: The x86 unified syscall swapped arguments #4 and #5 and noone
135: noticed until now! Thanks to Guillaume Cottenceau for reporting
136: this!
137: The malloc had a subtle bug with small allocations that could cause
138: segfault. Guillaume reported it, Olaf fixed it.
139:
140: 0.6.12:
141: added assert, statfs and fstatfs
142: added include/net/if.h so fget compiles again.
143:
144: 0.6.11:
145: added putenv.
146:
147: 0.6.10:
148: fixed fwrite. It returned the number of bytes written, not the number
149: of records. Thanks to Albert D. Cahalan for pointing this out.
150: fixed fgets. It returned EOF on empty lines. Thanks, Erik Frey.
151: added brk and sbrk. harold@nb.com.sg made me do it.
152:
153: 0.6.9:
154: fixed execvp not to return on ENOENT
155: did for {open|read|close|seek|tell}dir what I did for stat before.
156: The glibc compatibility part is currently non-functional.
157: fixed white space handling in sscanf " (" would not match " (".
158: fixed printf to accept 'l' flag.
159: fixed getpwuid (ignored last line)
160:
161: 0.6.8:
162: Olaf contributed initial thread-safe syscalls for i386, alpha, sparc,
163: mips and arm. I did the one for ppc. They can be enabled in dietfeatures.h.
164: added strlcpy and strlcat from OpenBSD.
165: added stat64, fstat64 and lstat64.
166: added endian.h and made ending of strlen.c endianness-aware
167: added string routines size tweak to dietfeatures.h. Most of the
168: string routines have been unrolled. This is up to three times as
169: fast but creates up to three times larger code. Now you can disable
170: the unrolling.
171: added sendfile.
172: I also added pread. It works on x86 and sparc but not on ppc and mips.
173: I have no idea what's going on. strace disagrees with the kernel.
174: Can anyone help? I asked the Linux kernel mailing list for help, too.
175: added a few aliases of the type __libc_open for open. nm on
176: libpthreads.so indicates that we will need them.
177:
178: 0.6.7:
179: the sources now compile without warnings with -Wall.
180: printf now prints "(null)" when %s is passed NULL. This can be
181: removed with WANT_NULL_PRINTF in dietfeatures.h
182: added vfprintf, execl, ttyname.
183: stat, lstat and fstat are now #defined to __dietstat, __dietlstat and
184: __dietfstat so they can use the normal kernel struct stat.
185: stat, lstat and fstat are now C wrappers that convert to the glibc
186: struct stat. So we can avoid that overhead for programs that use
187: dietlibc headers.
188:
189: 0.6.6:
190: changed the Makefiles so you can now set CFLAGS on the command line
191: added memccmp (analogous to memccpy) and strncmp.
192: Olaf fixed another bug in the sparc unified syscall.
193: Paul Clifford contributed a C version of his strlen.S that is much
194: more efficient than the previous strlen on all platforms! It also
195: looks like technology from Roswell. ;-}
196: added a "real" stdio. Well, almost. Please contribute!
197: added dietfeatures.h so you can remove features you don't need.
198: removed debug code from vsnprintf that changed \0 to ' ' (argh!).
199: stdio now works with simple programs and minigzip from libz.
200: stdio uses some major trickery to avoid linking the stdio, stderr and
201: stdout (and reserving space for them) when they are not used.
202:
203: 0.6.5:
204: Red Plait <redplait@ixcelerator.com> found several bugs in diet libc,
205: most of them bugs in the new header files, but also missing sigset
206: functions.
207: Paul Clifford contributed an assembly strlen.S for ARM and fixed
208: several bugs.
209: Fixed ppc/setjmp and mips/pipe.
210: Olaf contributed a new sparc unified syscall.
211:
212: 0.6.4:
213: declared is* static inline in getservent.
214: added assert_fail, strtoul, isalpha, isdigit, isalnum, isascii.
215: changed strlen to return 0 when passed NULL.
216: new, much smaller unified syscall for MIPS. Thanks to Olaf the Mad
217: Scientist who actually implemented this without access to a MIPS
218: box, just from reading the architecture manual. And it worked out
219: of the box.
220: started a set of system includes, mainly so that I can use lcc and
221: my alpha-linux cross compiler (which is unable to cross-compile
222: glibc). diet libc can now be compiled without any include files
223: from a normal libc. The includes do declare more than diet libc
224: currently delivers and they are still far from complete for real
225: applications.
226: I will only add assembly versions that are smaller _and_ faster than
227: the C version. Larger routines are only accepted if they are called
228: very often and are substantially faster.
229: added i386 assembly strchr, which is smaller and faster than the old
230: version. It is, however, larger than the version contributed by
231: proton (thanks, anyway).
232: added i386 strlen (31% faster, 14% smaller)
233: "make t" will now create a map file called "mapfile".
234:
235: 0.6.3:
236: added sys_errlist, strerror and perror
237: added isblank
238: added atol
239:
240: 0.6.2:
241: mmap for ARM didn't compile. Thanks, Paul!
242:
243: 0.6.1:
244: split mmap into the architecture specific subdirectories.
245: getenv now copes with environ==NULL, thanks Paul Clifford.
246: Paul also contributed a smaller ARM startup code.
247:
248: 0.6:
249: strcat returned the wrong result. Thanks, Dietz Pröpper.
250: strtod now understands a negative exponent (oops, thanks Bertram Barth)
251: Port to arm-linux-gnu, but on the Netwinder I use for testing the
252: __dtostr does not work (I have no idea why!)
253: The MIPS port now uses (much smaller) non-PIC code. That means that
254: the applications you link against diet libc also have to be compiled
255: non-PIC. I suggest copying the CFLAGS from the diet libc Makefile.
256: Thanks to Ralf Bächle for helping me with this!
257: I made subdirectories for the architectures and use VPATH to override
258: VPATH so that make finds the source file automatically. That should
259: simplify the sources greatly.
260: Olaf Dreesen contributed Alpha support including setjmp and longjmp!
261: ARM and MIPS now also have setjmp and longjmp
262: "compile" and "load" are now make targets. Use them for djb programs.
263: added contrib/elftrunc.c which will remove unnecessary ELF headers.
264: Again, contributed from Olaf. Great work!
265:
266: 0.5.12:
267: printf also does signed numbers.
268: If you don't use atexit, dietlibc now does not link exit, only _exit.
269: *printf now correctly returns the number of bytes written.
270: Olaf contributed experimental sscanf and vsscanf implementations.
271: If passed NULL as buffer, snprintf will not write anything but still
272: return the number of bytes it would have written.
273: Initial MIPS port! (Oh, the agony!)
274: No setjmp and longjmp support yet! Please contribute!
275: I even implemented unified syscalls for MIPS. Still, MIPS code is
276: almost twice the size of SPARC code. If anyone knows why: please
277: tell me!
278:
279: 0.5.11:
280: I implemented new unified syscalls for x86, sparc and ppc, this time based
281: on .s files and not .c files, and I moved the syscalls into
282: subdirectores to clean the dietlibc sources up a little.
283: A binary consisting of printf("%s is %d\n","olaf",23) is now
284: 2864 bytes on sparc
285: 2488 bytes on intel
286: I kludgily implemented fprintf(stdout,... and fprintf(stderr,...
287: to make a few more applications work.
288: Olaf Dreesen also implemented some unified syscall stuff for x86.
289: He discovered that with our unified syscall interface it actually
290: costs <10 bytes total to make all system calls thread safe!
291: I implemented atexit() (can register up to 4 callbacks).
292: I implemented strtod and __dtostr (the opposite). Now we can add
293: floating point support to vsnprintf and sscanf!
294:
295: 0.5.10:
296: I actually saw that I can not only merge the errno handling code of
297: the system calls on x86, I can also merge the rest (including the
298: arguments) except for setting the system call number. All those
299: system calls are now just a jump to a unified system call handler.
300: I got rid of x86openclose again. The savings are substantial:
301: chown from embutils went from 7664 to 7184 bytes!
302: If I'd move the system call wrappers to assembly language, I could
303: even reduce the alignment (does not matter since it's just a jump
304: anyway) and get rid of the "ret" behind each jump (one byte per
305: system call!)
306:
307: 0.5.9:
308: added memchr, strpbrk, strstr, strtol, isspace (hehe)
309: fixed strdup
310: fixed return values for strcpy and strcat (thanks to Norbert Berzen)
311: Olaf Dreesen contributed a strtol and initial {sn|vsn|}printf implementation
312: (no signed integers, only strings and unsigned integers (but
313: supporting octal, hex and decimal). Thanks, Olaf! (by the way:
314: that code must be wonderful, I don't understand it at all *bg*)
315: Olaf's printf does understand padding like in "%08d" and "%8d" and
316: automatically pads pointers with '0'.
317: Rewrote the x86 start code, old: 22 instructions, new: 12 instructions.
318: Thanks to proton for inspiration on this.
319: The new x86 start code also does not reference exit any more, thus saving
320: 64 bytes for executables that don't call exit explicitly.
321: [insert maniacal laughter] EVERY BYTE COUNTS!1!! ;-)
322: Moved errno and environ to start.S, saving no byte binary size but
323: speeding up compilation and slightly shortening dietlibc.a ;-)
324: For x86: joined open and close into one assembler file, sharing the
325: errno handling. This is a feasibility test and it actually saves a
326: few bytes. I think I will reimplement the _syscall[1-6] macros on
327: all platforms now to share the errno handling code for them.
328:
329: 0.5.8:
330: fixed strchr to be able to look for 0.
331:
332: added _llseek, ftruncate, getpgid, getresgid, getresuid, getsid,
333: memccpy, memmove, mprotect, setregid, setresgid, setresuid, setreuid,
334: strncpy, swapon, truncate, strtok, strtok_r, strspn, strcspn (all
335: contributed by Olaf Dreesen)
336:
337: added execvp, getcwd
338:
339: fixed __xmknod
340:
341: Note: can it be that the ftw interface really is so broken that I
342: cannot implement it without having to implement some searching data
343: structure? I included an experimental ftw implementation that will
344: not follow symlinks.
345:
346: 0.5.7:
347: oops, if_nametoindex was broken!
348:
349: 0.5.6:
350: ported to ppc-linux.
351: fixed i386 sigsetjmp (I mistyped the function name)
352: included sigjmp.c
353:
354: 0.5.5:
355: added wait, sys_siglist, longjmp/setjmp/sigsetjmp for i386 and sparc
356: actually, it wasn't fork that wasn't working for sparc, it was pipe.
357: I fixed it now.
358: dietlibc/SPARC assumes -msupersparc (does not provide div, mul, etc)
359: fixed readdir to use getdents and not the intel inline asm
360:
361: 0.5.4:
362: ported to sparclinux (sparc32 only). Beware: does not work yet.
363: added raise, abort, readlink, strcat, geteuid, geteuid, wait3, access
364:
365: 0.5.3:
366: added tcsetattr and getenv to compile e3
367:
368: 0.5.2:
369: added vhangup, tcgetattr, isatty and memcmp for fgetty
370: (http://www.fefe.de/fgetty/)
371: added localtime from uC-libc.
372:
373: 0.5.1:
374: stat and friends actually work now. Yuck! Another case of
375: translation between kernel and userland. Why can't the kernel
376: people and the libc people simply agree on a standard?
377: removed many unnecessary includes to speed up compilation.
378: added -fomit-frame-pointer and i386 compilation target to reduce code size.
379: inlined socketcall to reduce code size.
380: "load" and "compile" are examples for djb code.
381:
382: 0.5:
383: Olaf Dreesen contributed a much smaller implementation of malloc and friends.
384: each object file is now treated with "strip -x -R .note -R .comment"
385: split each system call into a separate object file
386: added ntohs, htons, alarm, if_indextoname and if_nametoindex
387:
388: 0.4.1:
389: oops, the strchr implementation was wrong. Thanks Jens Laas!
390:
391: 0.4:
392: copied opendir and friends from uC-libc.
393: added getservent and getservby* in gerservent.c
394:
395: 0.3:
396: remove readdir system call
397: added getdents system call
398: added getpwnam/getpwuid implementation in getpwnam.c
399: added a few string functions (in str*.c)
400:
LinuxTV legacy CVS <linuxtv.org/cvs>