Annotation of dietlibc/CHANGES, revision 1.14

1.9       fefe        1: 0.7.1:
1.11      fefe        2:   optimized away the static arrays from __ltostr and __lltostr.
                      3:   optimized away the static arrays (and more!) from strtoul and strtoull.
                      4:   added system (by Olaf).
1.12      fefe        5:   added tolower and toupper
1.13      fefe        6:   added getopt from Olaf (~600 bytes on x86!)
1.14    ! fefe        7:   added clone for mips (by Olaf).
        !             8:   fixed longjmp and setjmp on sparc not to require glibc include files.
1.9       fefe        9: 
                     10: 0.7:
1.6       olaf       11:   clone support for i386,alpha,arm and sparc by Olaf.
1.1       cvs        12:   Initial dynamic loading glue for i386, also by Olaf.
                     13:   We don't have a dynamic loader yet, so this is not yet usable.
                     14:   added readv, sigdelset, sigaltstack, sigfillset, sigismember, usleep,
                     15:     vsprintf, writev, all by Olaf.
1.2       fefe       16:   imported readdir fix from Guillaume.  Mhh, can the kernel interface
                     17:     really be this broken?
1.3       fefe       18:   Found a kludgy way to detect whether the kernel includes define struct
                     19:     stat64 (they also define STAT64_HAS_BROKEN_ST_INO).  If this does
                     20:     not work for you, please tell me!
1.4       fefe       21:   Removed bogus __seek_types enum, it's a bunch of #defines now.
1.7       fefe       22:   Fixed stdio line buffering.  The code was already there but I forgot
                     23:     to mark stdio and stdout as line buffered.  This should really be
                     24:     done dynamically using isatty, though.
1.8       fefe       25:   Removed superfluous "if (1)" in execvp.c
1.1       cvs        26: 
                     27: 0.6.14:
                     28:   *scanf did not append the 0 byte for %s.
                     29:   added creat and changed creat to call open directly instead of open64.
                     30:   did for fread what 0.6.10 did for fwrite.
                     31:   repaired buffered stdio a little (line buffering is still not
                     32:     supported).
                     33:   [All of these bugs have been reported by Guillaume.  Thanks!]
                     34:   added __pure__ to strchr and strrchr in <string.h>
                     35: 
                     36: 0.6.13:
                     37:   included COPYING to make clear that the diet libc is covered by the
                     38:     GNU General Public License (and _not_ the LGPL).  That means that
                     39:     you need to obtain a license from me if you want to use the diet
                     40:     libc in a proprietary program that you want to distribute.
                     41:   The x86 unified syscall swapped arguments #4 and #5 and noone
                     42:     noticed until now!  Thanks to Guillaume Cottenceau for reporting
                     43:     this!
                     44:   The malloc had a subtle bug with small allocations that could cause
                     45:     segfault.  Guillaume reported it, Olaf fixed it.
                     46: 
                     47: 0.6.12:
                     48:   added assert, statfs and fstatfs
                     49:   added include/net/if.h so fget compiles again.
                     50: 
                     51: 0.6.11:
                     52:   added putenv.
                     53: 
                     54: 0.6.10:
                     55:   fixed fwrite.  It returned the number of bytes written, not the number
                     56:     of records.  Thanks to Albert D. Cahalan for pointing this out.
                     57:   fixed fgets.  It returned EOF on empty lines.  Thanks, Erik Frey.
                     58:   added brk and sbrk.  harold@nb.com.sg made me do it.
                     59: 
                     60: 0.6.9:
                     61:   fixed execvp not to return on ENOENT
                     62:   did for {open|read|close|seek|tell}dir what I did for stat before.
                     63:     The glibc compatibility part is currently non-functional.
                     64:   fixed white space handling in sscanf " (" would not match " (".
                     65:   fixed printf to accept 'l' flag.
                     66:   fixed getpwuid (ignored last line)
                     67: 
                     68: 0.6.8:
                     69:   Olaf contributed initial thread-safe syscalls for i386, alpha, sparc,
                     70:     mips and arm.  I did the one for ppc.  They can be enabled in dietfeatures.h.
                     71:   added strlcpy and strlcat from OpenBSD.
                     72:   added stat64, fstat64 and lstat64.
                     73:   added endian.h and made ending of strlen.c endianness-aware
                     74:   added string routines size tweak to dietfeatures.h.  Most of the
                     75:     string routines have been unrolled.  This is up to three times as
                     76:     fast but creates up to three times larger code.  Now you can disable
                     77:     the unrolling.
                     78:   added sendfile.
                     79:   I also added pread.  It works on x86 and sparc but not on ppc and mips.
                     80:     I have no idea what's going on.  strace disagrees with the kernel.
                     81:     Can anyone help?  I asked the Linux kernel mailing list for help, too.
                     82:   added a few aliases of the type __libc_open for open.  nm on
                     83:     libpthreads.so indicates that we will need them.
                     84: 
                     85: 0.6.7:
                     86:   the sources now compile without warnings with -Wall.
                     87:   printf now prints "(null)" when %s is passed NULL.  This can be
                     88:     removed with WANT_NULL_PRINTF in dietfeatures.h
                     89:   added vfprintf, execl, ttyname.
                     90:   stat, lstat and fstat are now #defined to __dietstat, __dietlstat and
                     91:     __dietfstat so they can use the normal kernel struct stat.
                     92:     stat, lstat and fstat are now C wrappers that convert to the glibc
                     93:     struct stat.  So we can avoid that overhead for programs that use
                     94:     dietlibc headers.
                     95: 
                     96: 0.6.6:
                     97:   changed the Makefiles so you can now set CFLAGS on the command line
                     98:   added memccmp (analogous to memccpy) and strncmp.
                     99:   Olaf fixed another bug in the sparc unified syscall.
                    100:   Paul Clifford contributed a C version of his strlen.S that is much
                    101:     more efficient than the previous strlen on all platforms!  It also
                    102:     looks like technology from Roswell. ;-}
                    103:   added a "real" stdio.  Well, almost.  Please contribute!
                    104:   added dietfeatures.h so you can remove features you don't need.
                    105:   removed debug code from vsnprintf that changed \0 to ' ' (argh!).
                    106:   stdio now works with simple programs and minigzip from libz.
                    107:   stdio uses some major trickery to avoid linking the stdio, stderr and
                    108:     stdout (and reserving space for them) when they are not used.
                    109: 
                    110: 0.6.5:
                    111:   Red Plait <redplait@ixcelerator.com> found several bugs in diet libc,
                    112:     most of them bugs in the new header files, but also missing sigset
                    113:     functions.
                    114:   Paul Clifford contributed an assembly strlen.S for ARM and fixed
                    115:     several bugs.
                    116:   Fixed ppc/setjmp and mips/pipe.
                    117:   Olaf contributed a new sparc unified syscall.
                    118: 
                    119: 0.6.4:
                    120:   declared is* static inline in getservent.
                    121:   added assert_fail, strtoul, isalpha, isdigit, isalnum, isascii.
                    122:   changed strlen to return 0 when passed NULL.
                    123:   new, much smaller unified syscall for MIPS.  Thanks to Olaf the Mad
                    124:     Scientist who actually implemented this without access to a MIPS
                    125:     box, just from reading the architecture manual.  And it worked out
                    126:     of the box.
                    127:   started a set of system includes, mainly so that I can use lcc and
                    128:     my alpha-linux cross compiler (which is unable to cross-compile
                    129:     glibc).  diet libc can now be compiled without any include files
                    130:     from a normal libc.  The includes do declare more than diet libc
                    131:     currently delivers and they are still far from complete for real
                    132:     applications.
                    133:   I will only add assembly versions that are smaller _and_ faster than
                    134:     the C version.  Larger routines are only accepted if they are called
                    135:     very often and are substantially faster.
                    136:   added i386 assembly strchr, which is smaller and faster than the old
                    137:     version.  It is, however, larger than the version contributed by
                    138:     proton (thanks, anyway).
                    139:   added i386 strlen (31% faster, 14% smaller)
                    140:   "make t" will now create a map file called "mapfile".
                    141: 
                    142: 0.6.3:
                    143:   added sys_errlist, strerror and perror
                    144:   added isblank
                    145:   added atol
                    146: 
                    147: 0.6.2:
                    148:   mmap for ARM didn't compile.  Thanks, Paul!
                    149: 
                    150: 0.6.1:
                    151:   split mmap into the architecture specific subdirectories.
                    152:   getenv now copes with environ==NULL, thanks Paul Clifford.
                    153:   Paul also contributed a smaller ARM startup code.
                    154: 
                    155: 0.6:
                    156:   strcat returned the wrong result.  Thanks, Dietz Pröpper.
                    157:   strtod now understands a negative exponent (oops, thanks Bertram Barth)
                    158:   Port to arm-linux-gnu, but on the Netwinder I use for testing the
                    159:     __dtostr does not work (I have no idea why!)
                    160:   The MIPS port now uses (much smaller) non-PIC code.  That means that
                    161:     the applications you link against diet libc also have to be compiled
                    162:     non-PIC.  I suggest copying the CFLAGS from the diet libc Makefile.
                    163:     Thanks to Ralf Bächle for helping me with this!
                    164:   I made subdirectories for the architectures and use VPATH to override
                    165:     VPATH so that make finds the source file automatically.  That should
                    166:     simplify the sources greatly.
                    167:   Olaf Dreesen contributed Alpha support including setjmp and longjmp!
                    168:   ARM and MIPS now also have setjmp and longjmp
                    169:   "compile" and "load" are now make targets.  Use them for djb programs.
                    170:   added contrib/elftrunc.c which will remove unnecessary ELF headers.
                    171:     Again, contributed from Olaf.  Great work!
                    172: 
                    173: 0.5.12:
                    174:   printf also does signed numbers.
                    175:   If you don't use atexit, dietlibc now does not link exit, only _exit.
                    176:   *printf now correctly returns the number of bytes written.
                    177:   Olaf contributed experimental sscanf and vsscanf implementations.
                    178:   If passed NULL as buffer, snprintf will not write anything but still
                    179:     return the number of bytes it would have written.
                    180:   Initial MIPS port!   (Oh, the agony!)
                    181:     No setjmp and longjmp support yet!  Please contribute!
                    182:   I even implemented unified syscalls for MIPS.  Still, MIPS code is
                    183:     almost twice the size of SPARC code.  If anyone knows why: please
                    184:     tell me!
                    185: 
                    186: 0.5.11:
                    187:   I implemented new unified syscalls for x86, sparc and ppc, this time based
                    188:     on .s files and not .c files, and I moved the syscalls into
                    189:     subdirectores to clean the dietlibc sources up a little.
                    190:   A binary consisting of printf("%s is %d\n","olaf",23) is now
                    191:     2864 bytes on sparc
                    192:     2488 bytes on intel
                    193:   I kludgily implemented fprintf(stdout,... and fprintf(stderr,...
                    194:     to make a few more applications work.
                    195:   Olaf Dreesen also implemented some unified syscall stuff for x86.
                    196:   He discovered that with our unified syscall interface it actually
                    197:     costs <10 bytes total to make all system calls thread safe!
                    198:   I implemented atexit() (can register up to 4 callbacks).
                    199:   I implemented strtod and __dtostr (the opposite).  Now we can add
                    200:     floating point support to vsnprintf and sscanf!
                    201: 
                    202: 0.5.10:
                    203:   I actually saw that I can not only merge the errno handling code of
                    204:     the system calls on x86, I can also merge the rest (including the
                    205:     arguments) except for setting the system call number.  All those
                    206:     system calls are now just a jump to a unified system call handler.
                    207:     I got rid of x86openclose again.  The savings are substantial:
                    208:     chown from embutils went from 7664 to 7184 bytes!
                    209:     If I'd move the system call wrappers to assembly language, I could
                    210:     even reduce the alignment (does not matter since it's just a jump
                    211:     anyway) and get rid of the "ret" behind each jump (one byte per
                    212:     system call!)
                    213: 
                    214: 0.5.9:
                    215:   added memchr, strpbrk, strstr, strtol, isspace (hehe)
                    216:   fixed strdup
                    217:   fixed return values for strcpy and strcat (thanks to Norbert Berzen)
                    218:   Olaf Dreesen contributed a strtol and initial {sn|vsn|}printf implementation
                    219:     (no signed integers, only strings and unsigned integers (but
                    220:     supporting octal, hex and decimal).  Thanks, Olaf!  (by the way:
                    221:     that code must be wonderful, I don't understand it at all *bg*)
                    222:     Olaf's printf does understand padding like in "%08d" and "%8d" and
                    223:     automatically pads pointers with '0'.
                    224:   Rewrote the x86 start code, old: 22 instructions, new: 12 instructions.
                    225:   Thanks to proton for inspiration on this.
                    226:   The new x86 start code also does not reference exit any more, thus saving
                    227:   64 bytes for executables that don't call exit explicitly.
                    228:     [insert maniacal laughter] EVERY BYTE COUNTS!1!! ;-)
                    229:   Moved errno and environ to start.S, saving no byte binary size but
                    230:     speeding up compilation and slightly shortening dietlibc.a ;-)
                    231:   For x86: joined open and close into one assembler file, sharing the
                    232:     errno handling.  This is a feasibility test and it actually saves a
                    233:     few bytes.  I think I will reimplement the _syscall[1-6] macros on
                    234:     all platforms now to share the errno handling code for them.
                    235: 
                    236: 0.5.8:
                    237:   fixed strchr to be able to look for 0.
                    238: 
                    239:   added _llseek, ftruncate, getpgid, getresgid, getresuid, getsid,
                    240:   memccpy, memmove, mprotect, setregid, setresgid, setresuid, setreuid,
                    241:   strncpy, swapon, truncate, strtok, strtok_r, strspn, strcspn (all
                    242:   contributed by Olaf Dreesen)
                    243: 
                    244:   added execvp, getcwd
                    245: 
                    246:   fixed __xmknod
                    247: 
                    248:   Note: can it be that the ftw interface really is so broken that I
                    249:   cannot implement it without having to implement some searching data
                    250:   structure?  I included an experimental ftw implementation that will
                    251:   not follow symlinks.
                    252: 
                    253: 0.5.7:
                    254:   oops, if_nametoindex was broken!
                    255: 
                    256: 0.5.6:
                    257:   ported to ppc-linux.
                    258:   fixed i386 sigsetjmp (I mistyped the function name)
                    259:   included sigjmp.c
                    260: 
                    261: 0.5.5:
                    262:   added wait, sys_siglist, longjmp/setjmp/sigsetjmp for i386 and sparc
                    263:   actually, it wasn't fork that wasn't working for sparc, it was pipe.
                    264:   I fixed it now.
                    265:   dietlibc/SPARC assumes -msupersparc (does not provide div, mul, etc)
                    266:   fixed readdir to use getdents and not the intel inline asm
                    267: 
                    268: 0.5.4:
                    269:   ported to sparclinux (sparc32 only).  Beware: does not work yet.
                    270:   added raise, abort, readlink, strcat, geteuid, geteuid, wait3, access
                    271: 
                    272: 0.5.3:
                    273:   added tcsetattr and getenv to compile e3
                    274: 
                    275: 0.5.2:
                    276:   added vhangup, tcgetattr, isatty and memcmp for fgetty
                    277:     (http://www.fefe.de/fgetty/)
                    278:   added localtime from uC-libc.
                    279: 
                    280: 0.5.1:
                    281:   stat and friends actually work now.  Yuck!  Another case of
                    282:     translation between kernel and userland.  Why can't the kernel
                    283:     people and the libc people simply agree on a standard?
                    284:   removed many unnecessary includes to speed up compilation.
                    285:   added -fomit-frame-pointer and i386 compilation target to reduce code size.
                    286:   inlined socketcall to reduce code size.
                    287:   "load" and "compile" are examples for djb code.
                    288: 
                    289: 0.5:
                    290:   Olaf Dreesen contributed a much smaller implementation of malloc and friends.
                    291:   each object file is now treated with "strip -x -R .note -R .comment"
                    292:   split each system call into a separate object file
                    293:   added ntohs, htons, alarm, if_indextoname and if_nametoindex
                    294: 
                    295: 0.4.1:
                    296:   oops, the strchr implementation was wrong.  Thanks Jens Laas!
                    297: 
                    298: 0.4:
                    299:   copied opendir and friends from uC-libc.
                    300:   added getservent and getservby* in gerservent.c
                    301: 
                    302: 0.3:
                    303:   remove readdir system call
                    304:   added getdents system call
                    305:   added getpwnam/getpwuid implementation in getpwnam.c
                    306:   added a few string functions (in str*.c)
                    307: 

LinuxTV legacy CVS <linuxtv.org/cvs>