]> git.proxmox.com Git - wasi-libc.git/log
wasi-libc.git
5 years agoFix floatscan no long double usage (#21)
vms [Mon, 22 Apr 2019 21:37:03 +0000 (00:37 +0300)]
Fix floatscan no long double usage (#21)

* fix long double using in floatscan

* define separate macroses for copysignl, fmodl, and scalbnl instead of #ifndef

5 years agoRemove the Linux-specific <sys/signalfd.h> header.
Dan Gohman [Sat, 20 Apr 2019 00:19:07 +0000 (17:19 -0700)]
Remove the Linux-specific <sys/signalfd.h> header.

5 years agoDeclare getrusage.
Dan Gohman [Sat, 20 Apr 2019 00:19:55 +0000 (17:19 -0700)]
Declare getrusage.

It's defined publicly in libc, so publicly declare it too.

5 years agoFormat changes to musl code to fit musl's style.
Dan Gohman [Mon, 15 Apr 2019 17:51:44 +0000 (10:51 -0700)]
Format changes to musl code to fit musl's style.

The whitespace diffs are converting from spaces to tabs.

5 years agoFixes #20
Jakub Konka [Sun, 21 Apr 2019 19:24:20 +0000 (21:24 +0200)]
Fixes #20

Adds missing localtime.c source file to Makefile and to expected
defined symbols list.

5 years agogitignore build
Pat Hickey [Fri, 19 Apr 2019 18:15:48 +0000 (11:15 -0700)]
gitignore build

5 years agobuild: use LC_ALL=C for sorting
Pat Hickey [Fri, 19 Apr 2019 00:17:35 +0000 (17:17 -0700)]
build: use LC_ALL=C for sorting

LC_COLLATE doesn't seem to work with all `sort`s

5 years agoUpdate to cloudlibc 8835639f27fc42d32096d59d294a0bbb857dc368.
Dan Gohman [Mon, 15 Apr 2019 13:12:13 +0000 (06:12 -0700)]
Update to cloudlibc 8835639f27fc42d32096d59d294a0bbb857dc368.

There's no functional change here; the only change is the patch I
submitted upstream, so we can remove some local changes.

5 years agoUpdate to musl 1.1.22.
Dan Gohman [Mon, 15 Apr 2019 13:11:29 +0000 (06:11 -0700)]
Update to musl 1.1.22.

Most of the changes are in threads, TLS, dynamic linking, and other
features wasi doesn't yet use, but there are some bug fixes in code
wasi does use.

atanl.c - local changes no longer needed as they've now landed upstream.

include/alltypes.h.in - Upstream now makes FILE a complete type in
pre-C11 mode. For WASI, this level of pre-C11 strictness isn't as
important, and having multiple incompatible definitions of _IO_FILE
that are kept separate only by clever use of translation unit
boundaries can confuse some tools, so stick with the incomplete type.

5 years agoRename README to README.md.
Dan Gohman [Fri, 12 Apr 2019 16:25:29 +0000 (09:25 -0700)]
Rename README to README.md.

5 years agoRemove socket.c, which was a stub that always failed with ENOSYS.
Dan Gohman [Fri, 12 Apr 2019 16:20:20 +0000 (09:20 -0700)]
Remove socket.c, which was a stub that always failed with ENOSYS.

5 years agoUse the same indentation style as surrounding code.
Dan Gohman [Fri, 12 Apr 2019 15:53:41 +0000 (08:53 -0700)]
Use the same indentation style as surrounding code.

5 years agoFix miscellaneous lint warnings.
Dan Gohman [Thu, 11 Apr 2019 22:39:30 +0000 (15:39 -0700)]
Fix miscellaneous lint warnings.

5 years agoMake basics include guard names more consistent.
Dan Gohman [Thu, 11 Apr 2019 18:26:54 +0000 (11:26 -0700)]
Make basics include guard names more consistent.

5 years agoAdd a basics implementation of <inttypes.h>.
Dan Gohman [Mon, 15 Apr 2019 12:00:57 +0000 (05:00 -0700)]
Add a basics implementation of <inttypes.h>.

Musl's generic definitions for PRIxPTR and several others in
<inttypes.h> are incorrect for wasm, so introduce a new <inttypes.h>
and <__header_inttypes.h> in the basics module using compiler-provided
definitions.

Fixes #13.

5 years agoDefine _ALL_SOURCE when generating predefined-macros.txt.
Dan Gohman [Fri, 5 Apr 2019 23:10:38 +0000 (16:10 -0700)]
Define _ALL_SOURCE when generating predefined-macros.txt.

And clean up various stale declarations and macros that this turned up.
In particular:
 - Don't install pthread.h or aio.h in THREAD_MODEL=single mode.
 - Don't define mkstemp and friends, since WASI currently has no support for
   temporary directories.

5 years agoDon't install <ucontext.h> or <sys/ucontext.h> for WASI.
Dan Gohman [Fri, 5 Apr 2019 22:48:36 +0000 (15:48 -0700)]
Don't install <ucontext.h> or <sys/ucontext.h> for WASI.

WASI doesn't support `getcontext`, `setcontext`, or related functions.

5 years agoFix uselocale to support non-default locales.
Dan Gohman [Wed, 3 Apr 2019 03:31:53 +0000 (20:31 -0700)]
Fix uselocale to support non-default locales.

Musl's locales implementation depends on pthreads. Since WASI libc
doesn't yet have pthreads, it currently has alternate code for
supporting locales. Previously, this code just assumed that it only had
to support the default locale, however libc++ uses uselocale with
non-default locals, so add support for that.

With this, the C++ <iostream>-style hello world now works, with
-fno-exceptions.

5 years agoFilter out __FLT16_* macros from predefined-macros.txt.
Dan Gohman [Wed, 3 Apr 2019 03:29:38 +0000 (20:29 -0700)]
Filter out __FLT16_* macros from predefined-macros.txt.

Whether these are defined or not depends on the version of clang in use,
and they're not that important at this time, so for now just ignore them
for the purposes of this testing output.

5 years agoAdd comments explaining changes to upstream source files.
Dan Gohman [Wed, 3 Apr 2019 20:50:27 +0000 (13:50 -0700)]
Add comments explaining changes to upstream source files.

Add at least a one-line comment on every
`#ifdef __wasilibc_unmodified_upstream` briefly indicating what its
purpose is.

While here, reenable some of the code that was previously disabled when
getenv wasn't supported, as getenv is now supported.

5 years agoProvide a public interface to preopened directory lookups. (#10)
Dan Gohman [Fri, 5 Apr 2019 13:30:30 +0000 (06:30 -0700)]
Provide a public interface to preopened directory lookups. (#10)

* Provide a public interface to preopened directory lookups.

For users of especially non-C compilers, provide an API for looking up
preopened directories. This is used internally in WASI libc to translate
from eg. `open` to `openat`, but it can now also be used by user code.

5 years agoWASI libc prototype implementation.
Dan Gohman [Wed, 27 Mar 2019 15:00:00 +0000 (08:00 -0700)]
WASI libc prototype implementation.

This incoporates pieces from musl-libc, cloudlibc, cloudabi, libpreopen,
and dlmalloc, as well as a significant amount of new code.

5 years agoFix ssize_t redefinition mismatch. (#10)
eliasbenali [Thu, 21 Mar 2019 02:24:58 +0000 (22:24 -0400)]
Fix ssize_t redefinition mismatch. (#10)

* Fix ssize_t redefinition mismatch.

Align definition with comment and previous define in __typedef_ssize_t.h

* Fix __typedef_ssize_t.h, redundancy in sys/types.h

5 years agoMerge pull request #9 from WebAssembly/dlmalloc
Dan Gohman [Tue, 15 Jan 2019 20:41:50 +0000 (12:41 -0800)]
Merge pull request #9 from WebAssembly/dlmalloc

Add a malloc implementation using dlmalloc.

5 years agoAdd a malloc implementation using dlmalloc.
Dan Gohman [Wed, 9 Jan 2019 00:55:11 +0000 (16:55 -0800)]
Add a malloc implementation using dlmalloc.

5 years agoMerge pull request #8 from WebAssembly/suseconds_t_and_nlink_t
Dan Gohman [Wed, 9 Jan 2019 03:41:55 +0000 (19:41 -0800)]
Merge pull request #8 from WebAssembly/suseconds_t_and_nlink_t

Add more typedefs and struct stat

5 years agoAdd a definition of `struct stat` and supporting types.
Dan Gohman [Thu, 3 Jan 2019 04:37:21 +0000 (20:37 -0800)]
Add a definition of `struct stat` and supporting types.

This `struct stat` matches the x32 and x86-64 definitions.

5 years agoAdd typedefs for suseconds_t and nlink_t.
Dan Gohman [Thu, 3 Jan 2019 00:01:05 +0000 (16:01 -0800)]
Add typedefs for suseconds_t and nlink_t.

5 years agoMerge pull request #5 from penzn/master
Dan Gohman [Tue, 27 Nov 2018 07:24:19 +0000 (23:24 -0800)]
Merge pull request #5 from penzn/master

Enable overriding 'ar'

5 years agoEnable overriding 'ar'
Petr Penzin [Wed, 7 Nov 2018 17:23:37 +0000 (09:23 -0800)]
Enable overriding 'ar'

Make has a stanard variable for 'ar', it is better to use it to enable
overriding the standard name in non-standard builds (i.e. MinGW).

5 years agoMerge pull request #1 from WebAssembly/add-initial-files
Dan Gohman [Mon, 8 Oct 2018 20:38:12 +0000 (13:38 -0700)]
Merge pull request #1 from WebAssembly/add-initial-files

Add initial files.

5 years agoExplain why this doesn't have a full libc.
Dan Gohman [Wed, 3 Oct 2018 05:04:49 +0000 (22:04 -0700)]
Explain why this doesn't have a full libc.

5 years agoFix typos.
Dan Gohman [Wed, 3 Oct 2018 05:04:41 +0000 (22:04 -0700)]
Fix typos.

5 years agoFix missing quote.
Dan Gohman [Wed, 3 Oct 2018 02:16:19 +0000 (19:16 -0700)]
Fix missing quote.

5 years agoAdd initial files.
Dan Gohman [Wed, 3 Oct 2018 00:28:58 +0000 (17:28 -0700)]
Add initial files.

This populates the repo with a very minimal set of files. This is just
enough to set out a basic outline. Hopefully as we move forward we'll
be replacing many of these parts, but this is just something basic to
get things started.

This tree isn't really usable yet, as it doesn't yet have an easy way
to obtain a compiler-rt/libgcc build.

5 years agoStart with nothing, so that we can add the initial files with a PR.
Dan Gohman [Tue, 2 Oct 2018 20:21:41 +0000 (13:21 -0700)]
Start with nothing, so that we can add the initial files with a PR.