Skip to content

Add missing wide character types #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
description = "The parts of OpenBSD libc that make sense on wasm32-unknown-unknown."
edition = "2018"
edition = "2021"
keywords = ["libc"]
license = "BSD-3-Clause AND ISC AND MIT"
links = "wasm32-unknown-unknown-openbsd-libc"
Expand Down
4 changes: 2 additions & 2 deletions build.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::env;

fn main() {
if !env::var("TARGET").map_or(false, |t| t.starts_with("wasm")) {
if !env::var("TARGET").is_ok_and(|t| t.starts_with("wasm")) {
return;
}

Expand Down Expand Up @@ -117,7 +117,7 @@ fn main() {
.compile("wasm32-unknown-unknown-openbsd-libc");

println!(
"cargo:include={}/include",
"cargo::metadata=include={}/include",
env::var("CARGO_MANIFEST_DIR").unwrap()
);
}
6 changes: 6 additions & 0 deletions include/machine/_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ typedef unsigned long __paddr_t;
typedef unsigned long __vsize_t;
typedef unsigned long __psize_t;

/* Standard system types */
typedef unsigned long __size_t;
typedef long __ssize_t;

Expand All @@ -30,3 +31,8 @@ typedef double __double_t;

struct __va_list_tag;
typedef struct __va_list_tag *__va_list;

/* Wide character support types */
typedef int __rune_t;
typedef void * __wctrans_t;
typedef void * __wctype_t;