Skip to content

Defining libc::c_char, c_long, etc. #238

Open
@SimonSapin

Description

@SimonSapin

With thumbv6m_none_eabi and similar targets, the libc crate does not compile because c_char, c_long, c_ulong, and wchar_t are not defined. This is issue rust-lang/libc#375. We should fix this and add those definitions.

gcc + newlib obviously have definitions for those types, but it looks like the thumb* targets in rustc are designed to not assume newlib. (Some std an libc code use cfg(target_env = "newlib"), but target_env is the empty string in each src/librustc_target/spec/thumb*.rs file in rustc.)

Would cfg(target_arch = "arm", target_os = "none") be an appropriate filter to select targets that all have the same definition of these four types? What would that definition be?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions