Add more fixes for new cosmocc toolchain

We now have an `#include <cxxabi.h>` header which defines all the APIs
Cosmopolitan's implemented so far. The `cosmocc` README.md file is now
greatly expanded with documentation.
This commit is contained in:
Justine Tunney 2023-11-11 22:32:12 -08:00
parent 95124cacbe
commit c6d3802d3a
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
32 changed files with 256 additions and 69 deletions

View file

@ -16,22 +16,16 @@
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
*/
#include "libc/assert.h"
#include "libc/calls/calls.h"
#include "libc/calls/struct/iovec.h"
#include "libc/dce.h"
#include "libc/errno.h"
#include "libc/mem/gc.internal.h"
#include "libc/mem/mem.h"
#include "libc/sock/sock.h"
#include "libc/sock/struct/msghdr.h"
#include "libc/sock/struct/sockaddr.h"
#include "libc/str/str.h"
#include "libc/sysv/consts/af.h"
#include "libc/sysv/consts/ipproto.h"
#include "libc/sysv/consts/o.h"
#include "libc/sysv/consts/sock.h"
#include "libc/testlib/testlib.h"
#include "libc/x/x.h"
TEST(sendrecvmsg, testPingPong) {
int fd[2];
@ -55,7 +49,7 @@ TEST(sendrecvmsg, testPingPong) {
ASSERT_NE(-1, socketpair(AF_UNIX, SOCK_STREAM, 0, fd));
ASSERT_EQ(hwLen, sendmsg(fd[0], &msg, 0));
data[0].iov_base = gc(xcalloc(20, 1));
data[0].iov_base = gc(calloc(20, 1));
data[0].iov_len = 20;
msg.msg_iovlen = 1;
ASSERT_EQ(hwLen, recvmsg(fd[1], &msg, 0));