wasi-libc/libc-top-half
Dan Gohman cf366c06d1 Optimize lseek in the tell case.
`lseek(x, 0, SEEK_CUR)` has no effect other than to return the current
file offset. The patch here uses a macro with `__builtin_constant_p` to
recognize this case and rewrite it to a library call that uses `fd_tell`
rather than `fd_seek`, so that programs that don't need actual seeking
don't end up importing `fd_seek`.

This is also the first usage of `__wasi_fd_tell` in WASI libc, so this
adds it to undefined-symbols.txt.
2019-04-30 16:19:05 -07:00
..
headers Fix floatscan no long double usage (#21) 2019-04-22 14:37:03 -07:00
musl Optimize lseek in the tell case. 2019-04-30 16:19:05 -07:00
sources Fix miscellaneous lint warnings. 2019-04-15 09:47:16 -07:00
README.md Update to musl 1.1.22. 2019-04-15 09:48:03 -07:00

Code in the musl directory is based on musl revision e97681d6f2c44bf5fa9ecdd30607cb63c780062e, which is v1.1.22, from git://git.musl-libc.org/musl.

Whole files which are unused are omitted. Changes to upstream code are wrapped in preprocessor directives controlled by the macro __wasilibc_unmodified_upstream.

Some major known missing areas include:

  • threads
  • aio
  • setjmp
  • signals
  • ipc
  • termios
  • nss
  • environment variables
  • timezones
  • non-builtin locales
  • TIOCGWINSZ (because cloudabi lacks it; affects isatty, line buffering for stdout)
  • O_CLOEXEC, O_NOCTTY (because cloudabi lacks them)