musl - an implementation of the standard library for Linux-based systems
Go to file
Rich Felker 2b4fcfdacf fix failure of ungetc and ungetwc to work on files in eof status
these functions were written to handle clearing eof status, but failed
to account for the __toread function's handling of eof. with this
patch applied, __toread still returns EOF when the file is in eof
status, so that read operations will fail, but it also sets up valid
buffer pointers for read mode, which are set to the end of the buffer
rather than the beginning in order to make the whole buffer available
to ungetc/ungetwc.

minor changes to __uflow were needed since it's now possible to have
non-zero buffer pointers while in eof status. as made, these changes
remove a 'fast path' bypassing the function call to __toread, which
could be reintroduced with slightly different logic, but since
ordinary files have a syscall in f->read, optimizing the code path
does not seem worthwhile.

the __stdio_read function is also updated not to zero the read buffer
pointers on eof/error. while not necessary for correctness, this
change avoids the overhead of calling __toread in ungetc after
reaching eof, and it also reduces code size and increases consistency
with the fmemopen read operation which does not zero the pointers.
2015-05-29 00:04:36 -04:00
arch fix stack alignment code in mips crt_arch.h 2015-05-24 23:03:47 -04:00
crt add rcrt1 start file for fully static-linked PIE 2015-05-26 03:37:41 -04:00
dist add another example option to dist/config.mak 2012-04-24 16:49:11 -04:00
include add missing legacy LFS64 macros in sys/resource.h 2015-05-28 15:37:23 -04:00
lib new solution for empty lib dir (old one had some problems) 2011-02-17 17:12:52 -05:00
src fix failure of ungetc and ungetwc to work on files in eof status 2015-05-29 00:04:36 -04:00
tools fix system breakage window during make install due to permissions 2014-01-15 22:29:13 -05:00
.gitignore add version.h to .gitignore; it is a generated file 2014-01-21 01:06:42 -05:00
COPYRIGHT update authors/contributors list 2015-03-16 18:43:54 -04:00
INSTALL update notice on broken gcc versions in INSTALL file 2014-07-31 19:02:54 -04:00
Makefile add rcrt1 start file for fully static-linked PIE 2015-05-26 03:37:41 -04:00
README update version reference in the README file 2014-06-25 14:16:53 -04:00
VERSION release 1.1.9 2015-05-12 19:19:08 -04:00
WHATSNEW release 1.1.9 2015-05-12 19:19:08 -04:00
configure configure: work around compilers that merely warn for unknown options 2015-05-28 00:08:13 -04:00

README

    musl libc

musl, pronounced like the word "mussel", is an MIT-licensed
implementation of the standard C library targetting the Linux syscall
API, suitable for use in a wide range of deployment environments. musl
offers efficient static and dynamic linking support, lightweight code
and low runtime overhead, strong fail-safe guarantees under correct
usage, and correctness in the sense of standards conformance and
safety. musl is built on the principle that these goals are best
achieved through simple code that is easy to understand and maintain.

The 1.1 release series for musl features coverage for all interfaces
defined in ISO C99 and POSIX 2008 base, along with a number of
non-standardized interfaces for compatibility with Linux, BSD, and
glibc functionality.

For basic installation instructions, see the included INSTALL file.
Information on full musl-targeted compiler toolchains, system
bootstrapping, and Linux distributions built on musl can be found on
the project website:

    http://www.musl-libc.org/