Skip to content
Snippets Groups Projects
  1. Feb 12, 2019
  2. Feb 11, 2019
    • Jason King's avatar
      Rename solaris dir to solarish to indicate it's including both Solaris · 9638d0de
      Jason King authored
      and Solaris-derived distributions (i.e. illumos).  In addition, a number
      of missing definitions (and compatability functions) that have been
      found necessary to run a number of rust binaries on illumos have been
      added.
      
      Portions were contributed by Mike Zeller <mike@mikezeller.net>
      9638d0de
  3. Feb 07, 2019
    • gnzlbg's avatar
      Fix build on all platforms · a17a91cd
      gnzlbg authored
      This PR fixes the build on all platforms and all Rust version down to the
      minimum Rust version supported by libc: Rust 1.13.0.
      
      The `build.rs` is extended with logic to detect the newer Rust features used by
      `libc` since Rust 1.13.0:
      
      * Rust 1.19.0: `untagged_unions`. APIs using untagged unions are gated on
        `cfg(libc_unions)` and not available on older Rust versions.
      
      * Rust 1.25.0: `repr(align)`. Because `repr(align)` cannot be parsed by older
        Rust versions, all uses of `repr(align)` are split into `align.rs` and
        `no_align.rs` modules, which are gated on the `cfg(libc_align)` at the top
        level. These modules sometimes contain macros that are expanded at the top
        level to avoid privacy issues (`pub(crate)` is not available in older Rust
        versions). Closes #1242 .
      
      * Rust : `const` `mem::size_of`. These uses are worked around with hardcoded
        constants on older Rust versions.
      
      Also, `repr(packed)` structs cannot automatically `derive()` some traits like
      `Debug`. These have been moved into `s_no_extra_traits!` and the lint of missing
      `Debug` implementations on public items is silenced for these. We can manually
      implement the `extra_traits` for these in a follow up PR. This is tracked
      in #1243. Also, `extra_traits` does not enable `align` manually anymore.
      
      Since `f64::to_bits` is not available in older Rust versions, its usage
      has been replaced with a `transmute` to an `u64` which is what that method
      does under the hood.
      
      Closes #1232 .
      a17a91cd
  4. Feb 03, 2019
  5. Jan 03, 2019
    • Alan Somers's avatar
      Fix uname on FreeBSD · 36baf932
      Alan Somers authored
      On FreeBSD, uname is an inline function.  The uname that is present in
      libc.so is for FreeBSD 1.0 compatibility.  It expects a buffer of a
      different size.
      
      Fixes #1190
      Reported-by: Alex Zepeda
      36baf932
  6. Dec 15, 2018
  7. Dec 14, 2018
  8. Dec 05, 2018
  9. Nov 27, 2018
  10. Nov 21, 2018
  11. Nov 20, 2018
  12. Oct 17, 2018
  13. Aug 01, 2018
  14. Jul 31, 2018
  15. Jul 30, 2018
  16. Jul 29, 2018
  17. Jul 21, 2018
  18. Jul 12, 2018
  19. Jul 10, 2018
  20. Jul 08, 2018
  21. Jun 08, 2018
    • Scott Lamb's avatar
      add fdopendir on macOS · 322ba046
      Scott Lamb authored
      Fixes #1017
      
      I moved it up to src/unix/mod.rs, as it's specified in POSIX.1-2008 and
      appears to be implemented on every Unix-like system.
      
      The symbol names on macOS appear similar to those for opendir; I found
      them via the commands below. I tested the x86_64 version;
      fdopendir$INODE64 worked as expected.
      
      $ nm -arch x86_64 /usr/lib/system/libsystem_c.dylib | grep fdopendir
      000000000007ea6d T _fdopendir
      000000000002ba97 T _fdopendir$INODE64
      $ nm -arch i386 /usr/lib/system/libsystem_c.dylib | grep fdopendir
      00082d1e T _fdopendir
      0002b528 T _fdopendir$INODE64$UNIX2003
      00082d1e T _fdopendir$UNIX2003
      322ba046
  22. Jun 04, 2018
  23. Jun 01, 2018
  24. Mar 18, 2018
    • Francis Gagné's avatar
      Rename the dox configuration option to cross_platform_docs · 18341fd2
      Francis Gagné authored
      The libc crate is used as a dependency of the Rust compiler. Its build
      system passes `--cfg dox` to all crates when generating their
      documentation. libc's documentation is generated when the build system
      is asked to generate the compiler documentation because `cargo doc`
      automatically documents all dependencies.
      
      When the dox configuration option is enabled, libc disables its
      dependency on the core crate and provides the necessary definitions
      itself. The dox configuration option is meant for generating
      documentation for a multitude of targets even if the core crate for that
      target is not installed. However, when documenting the compiler, it's
      not necessary to do that; we can just use core or std as usual.
      
      This change is motivated by the changes made to the compiler in
      rust-lang/rust#48171. With these changes, it's necessary to provide
      implementations of the Clone and Copy traits for some primitive types in
      the library that defines these traits (previously, these implementations
      were provided by the compiler). Normally, these traits (and thus the
      implementations) are provided by core, so any crate that uses
      `#![no_core]` must now provide its own copy of the implementations.
      
      Because libc doesn't provide its own copy of the implementations yet,
      and because the compiler's build system passes `--cfg dox` to libc,
      generating the documentation for the compiler fails when generating
      documentation for libc. By renaming the configuration option, libc will
      use core or std and will thus have the necessary definitions for the
      documentation to be generated successfully.
      18341fd2
  25. Mar 01, 2018
  26. Feb 28, 2018
  27. Feb 27, 2018
  28. Jan 22, 2018
  29. Jan 19, 2018
    • Bill Fraser's avatar
      add DT_UNKNOWN · 1ada396b
      Bill Fraser authored
      The `d_type` field of `struct dirent` can be `DT_UNKNOWN` if a
      filesystem doesn't support returning the file type in directory entries.
      Linux's readdir(3) man page, for example, says: "Currently, only some
      filesystems [...] have full support for returning the file type in
      d_type. All applications must properly handle a return of DT_UNKNOWN."
      1ada396b
Loading