about summary refs log tree commit diff
path: root/src/liblibc
AgeCommit message (Collapse)AuthorLines
2016-02-21std: Use Android LFS off64_t, ftruncate64, and lseek64Josh Stone-0/+0
Android should use 64-bit LFS symbols for `lseek` and `ftruncate`, lest those offset parameters suffer a lossy cast down to a 32-bit `off_t`. Unlike GNU/Linux, Android's `stat`, `dirent`, and related functions are always 64-bit LFS compatible, and `open` already implies `O_LARGEFILE`, so all those don't need to follow Linux. It might be nice to unify them anyway, but those other LFS symbols aren't present in API 18 bionic. r? @alexcrichton
2016-02-18Remove alternate stack with sigaltstack before unmapping it.Tomasz Miąsko-0/+0
Also reuse existing signal stack if already set, this is especially useful when working with sanitizers that configure alternate stack themselves.
2016-02-05std: Add a helper for symbols that may not existAlex Crichton-0/+0
Right now we only attempt to call one symbol which my not exist everywhere, __pthread_get_minstack, but this pattern will come up more often as we start to bind newer functionality of systems like Linux. Take a similar strategy as the Windows implementation where we use `dlopen` to lookup whether a symbol exists or not.
2016-01-31update libc submoduleJorge Aparicio-0/+0
fixes failed test (std::os::raw::tests::unix) in x86_64-musl target
2016-01-30revert changes used for local testingJorge Aparicio-0/+0
2016-01-29add support for mips(el)-unknown-linux-muslJorge Aparicio-0/+0
This target covers MIPS devices that run the trunk version of OpenWRT. The x86_64-unknown-linux-musl target always links statically to C libraries. For the mips(el)-unknown-linux-musl target, we opt for dynamic linking (like most of other targets do) to keep binary size down. As for the C compiler flags used in the build system, we use the same flags used for the mips(el)-unknown-linux-gnu target.
2016-01-28std: Fix rumprun buildAlex Crichton-0/+0
Looks like the rumprun build has bitrotted over time, so this includes some libc fixes and some various libstd fixes which gets it back to bootstrapping.
2016-01-21updating the libc dependency to pull in build breaker fixesDave Huseby-0/+0
2016-01-15Update libcAnton Blanchard-0/+0
This brings in powerpc64 and powerpc64le support recently added.
2016-01-12android has `posix_memalign` for API 16+ since NDK r10dTamir Duberstein-0/+0
See: http://developer.android.com/ndk/downloads/revision_history.html Also, use `libc`'s `posix_memalign`.
2015-12-21unbreak openbsd codeSébastien Marie-0/+0
- upgrades libc to version with si_addr support in openbsd - declares libc use for getentropy
2015-12-18Pull newer version of libc for NR_GETENTROPYMichael McConville-0/+0
2015-12-18Update liblibc to current masterFlorian Hahn-0/+0
2015-11-26Update libc. Fixes netbsd.Brian Anderson-0/+0
2015-11-25Update liblibcVadim Petrochenkov-0/+0
2015-11-22libc: Update to masterAlex Crichton-0/+0
Includes rust-lang-nursery/libc#66 which should: Closes #29956
2015-11-17Add changes to liblibcDevon Hollowood-0/+0
2015-11-09libc: Replace liblibc with crates.io libcAlex Crichton-7184/+0
2015-10-23Unsafety -> Safety in doc headingsSteve Klabnik-1/+1
Follow https://doc.rust-lang.org/book/documentation.html#special-sections
2015-10-23Auto merge of #29216 - steveklabnik:fix_libc, r=alexcrichtonbors-1/+1
This is needed to release a new version of libc r? @alexcrichton
2015-10-22Fix build of libc on stableSteve Klabnik-1/+1
This is needed to release a new version of libc
2015-10-21rustfmt liblibcMarcello Seri-2584/+2726
2015-09-27Add PATH_MAX to liblibc's Linux bindings.Utkarsh Kukreti-0/+4
2015-09-26Add support for the rumprun unikernelSebastian Wicki-1/+5
For most parts, rumprun currently looks like NetBSD, as they share the same libc and drivers. However, being a unikernel, rumprun does not support process management, signals or virtual memory, so related functions might fail at runtime. Stack guards are disabled exactly for this reason. Code for rumprun is always cross-compiled, it uses always static linking and needs a custom linker.
2015-09-23unbreak openbsd after netbsd integrationSébastien Marie-1/+3
separate use code between openbsd/netbsd. netbsd use c_int and c_uint, but openbsd not, resulting a unused_import error.
2015-09-21Various fixes for NetBSD/amd64Sebastian Wicki-50/+488
2015-08-30Atomically set CLOEXEC on duplicated socketsTobias Bucher-1/+6
For Bitrig, NetBSD and OpenBSD the constant was incorrectly in posix01, when it's actually posix08, so we move it. This is a [breaking-change], but we already had one in #27930. Fix NetBSD's F_DUPFD_CLOEXEC constant. For a similar feature detection, see this musl thread: http://comments.gmane.org/gmane.linux.lib.musl.general/2963 This assumes that an int literal has type `c_int` for varidic functions.
2015-08-28libc: Fix constants used by `libc::pathconf`Barosl Lee-2/+17
`_PC_NAME_MAX` is necessary to use `libc::pathconf`. Its value is fixed to 3 currently, but actually it varies with the platform. * _PC_NAME_MAX == 3 Linux (glibc): https://sourceware.org/git/?p=glibc.git;a=blob;f=bits/confname.h;h=1c714dfbf9398b8a600f9b69426a7ad8c7e89ab4;hb=HEAD#l32 NaCl (newlib): https://chromium.googlesource.com/native_client/nacl-newlib/+/373135ec5241d09138aa56603742b94b3b64ea1d/newlib/libc/include/sys/unistd.h#430 * _PC_NAME_MAX == 4 Android (Bionic): https://github.com/android/platform_bionic/blob/7e919daeaad62515ebbbf7b06badc77625a14d90/libc/include/unistd.h#L59 FreeBSD: https://svnweb.freebsd.org/base/head/sys/sys/unistd.h?revision=239347&view=markup#l127 NetBSD: http://ftp.netbsd.org/pub/NetBSD/NetBSD-current/src/sys/sys/unistd.h OS X: http://opensource.apple.com/source/xnu/xnu-2782.10.72/bsd/sys/unistd.h This commit fixes this, and also addes the `_PC_PATH_MAX` constant needed by further commits.
2015-08-25Auto merge of #27971 - tbu-:pr_cloexec, r=alexcrichtonbors-0/+21
On Linux the flag is just ignored if it is not supported: https://lwn.net/Articles/588444/ Still needs the values of O_CLOEXEC on the BSDs. Touches #24237.
2015-08-25Auto merge of #27957 - overminder:aug23-i686-android, r=alexcrichtonbors-9/+12
- All the libstd tests are passing in the optimized build against a Zenfone2 and the x86 Android emulator. I haven't tested the other libraries though.
2015-08-24Atomically open files with O_CLOEXEC where possibleTobias Bucher-0/+21
On Linux the flag is just ignored if it is not supported: https://lwn.net/Articles/588444/ Touches #24237.
2015-08-24i686-linux-android: Removing useless cfgs.Overmind JIANG-5/+0
That line is in a `#[cfg(target_os = "macos")]` block..
2015-08-23Auto merge of #27931 - tbu-:pr_liblibc_void, r=alexcrichtonbors-5/+6
2015-08-23New cross target: i686-linux-androidTim JIANG-9/+17
- All the libstd tests are now passing in the optimized build against a Zenfone2 and the x86 Android simulator.
2015-08-21Remove outdated comment and hide variants of `c_void`Tobias Bucher-5/+6
2015-08-16rustdoc: Added issue_tracker_base_url annotations to cratesMartin Wernstål-1/+2
2015-08-15libc,rand: Add issues for all unstable featuresAlex Crichton-2/+3
2015-08-12libc: Fix backcompat with crates.io versionAlex Crichton-1/+12
The corrected signature of `ioctl` broke some crates on crates.io, and it's not currently worth the major version bump of libc, so for now keep the old signature around for crates.io builds only with a comment to remove it at a future date. This should allow libc on crates.io to update to the master version in-tree. I've verified that this was the only breakage of substance between the version libc is currently built with and today's master branch.
2015-08-11rollup merge of #27678: alexcrichton/snapshotsAlex Crichton-2/+0
* Lots of core prelude imports removed * Makefile support for MSVC env vars and Rust crates removed * Makefile support for morestack removed
2015-08-11Register new snapshotsAlex Crichton-2/+0
* Lots of core prelude imports removed * Makefile support for MSVC env vars and Rust crates removed * Makefile support for morestack removed
2015-08-09Use https URLs to refer to rust-lang.org where appropriate.Eli Friedman-3/+3
Also fixes a few outdated links.
2015-08-03syntax: Implement #![no_core]Alex Crichton-2/+3
This commit is an implementation of [RFC 1184][rfc] which tweaks the behavior of the `#![no_std]` attribute and adds a new `#![no_core]` attribute. The `#![no_std]` attribute now injects `extern crate core` at the top of the crate as well as the libcore prelude into all modules (in the same manner as the standard library's prelude). The `#![no_core]` attribute disables both std and core injection. [rfc]: https://github.com/rust-lang/rfcs/pull/1184
2015-07-31fixes unused import compile failureDave Huseby-2/+2
2015-07-28Fixes #25155 and fixes #27359 by fixing the stat defines for both freebsd ↵Dave Huseby-4/+3
10.1 x86_64 and i686
2015-07-20Register new snapshotsAlex Crichton-4/+0
These new snapshots contain the knowledge of how to build the new triples of 32-bit MSVC and 32-bit FreeBSD, both of which should soon start having nightlies/auto builders! This does not currently register bitrig/freebsd snapshots but I believe those will be retroactively added in the near future.
2015-07-11adding support for i686-unknown-freebsd targetDave Huseby-0/+94
2015-07-10Show file name and access mode in Debug instance for File on OS XFlorian Hartwig-0/+5
2015-07-09Add FileTypeUnix trait to add unix special file typesJesús Espino-0/+6
2015-07-08trans: Link rlibs to dylibs with --whole-archiveAlex Crichton-0/+1
This commit starts passing the `--whole-archive` flag (`-force_load` on OSX) to the linker when linking rlibs into dylibs. The primary purpose of this commit is to ensure that the linker doesn't strip out objects from an archive when creating a dynamic library. Information on how this can go wrong can be found in issues #14344 and #25185. The unfortunate part about passing this flag to the linker is that we have to preprocess the rlib to remove the metadata and compressed bytecode found within. This means that creating a dylib will now take longer to link as we've got to copy around the input rlibs to a temporary location, modify them, and then invoke the linker. This isn't done for executables, however, so the "hello world" compile time is not affected. This fix was instigated because of the previous commit where rlibs may not contain multiple object files instead of one due to codegen units being greater than one. That change prevented the main distribution from being compiled with more than one codegen-unit and this commit fixes that. Closes #14344 Closes #25185
2015-07-06Rollup merge of #26809 - cmr:libc-ioctl, r=alexcrichtonSteve Klabnik-3/+3
None