| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
Wide chars are unsigned when normal chars are
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Headers I used:
Oh, for reference, here are the headers I used while working on this:
- musl: https://git.musl-libc.org/cgit/musl/tree/include/regex.h?id=8327ae0cb23b799bc55a45e0d4bd95f5a2b1cdf1
- glibc: https://sourceware.org/git/?p=glibc.git;a=blob;f=posix/regex.h;h=87cce7f5cb8cc3b678467329b479bd511e250e61;hb=HEAD
- macOS: https://opensource.apple.com/source/Libc/Libc-997.90.3/include/regex.h.auto.html
- FreeBSD: https://github.com/freebsd/freebsd/blob/8103b0ddb041617b7cd161528f0ff93ff32970a2/include/regex.h
- NetBSD: https://github.com/NetBSD/src/blob/61c8f6fbb7e38b20e862d5cb3ed2203312963283/include/regex.h
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
References:
* NetBSD (became available with 8.0):
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/sys/socket.h?annotate=1.129&only_with_tag=MAIN
http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/sys/accept4.c?annotate=1.2&only_with_tag=MAIN
* Illumos:
https://illumos.org/man/3socket/accept
https://github.com/illumos/illumos-gate/blob/master/usr/src/uts/common/sys/socket.h
https://github.com/illumos/illumos-gate/blob/master/usr/src/lib/libsocket/socket/weaks.c
* Solaris:
https://docs.oracle.com/cd/E88353_01/html/E37843/accept-3c.html
|
| |
|
|
|
|
|
|
| |
memmem is a non-standard extension, first added in GNU libc and later
ported to other systems. Support for it is non-uniform, thus it was only
added to platforms that seem to support it.
|
|
|
|
|
| |
This triggers a warning on a recent nightly, which in turn breaks CI due to
`#![deny(warnings)]` in libc-test/build.rs
|
|\
| |
| |
| |
| |
| | |
Implement utmp for NetBSD
Followed this: https://github.com/NetBSD/src/blob/trunk/include/utmp.h
|
| | |
|
|\ \
| |/
|/|
| | |
use *const pointer for NetBSD's pthread_setname_np
|
| | |
|
|\ \
| |/
|/|
| |
| |
| |
| |
| | |
Implement utmpx.h itens for NetBSD
This PR partially closes #1534
If add the constants, structs and and extra traid implmentation
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |\ |
|
| | | |
|
|\ \ \
| |_|/
|/| |
| | |
| | |
| | | |
Add two missing pthread calls to the OpenBSD support.
These are shamelessly copied from the NetBSD support, whose prototypes in this regard are identical to OpenBSD's.
|
| |/ |
|
|/
|
|
|
|
| |
initial work from @landryb for OpenBSD, various fixes and NetBSD support from me.
Fixes #1585
|
|\
| |
| |
| |
| |
| |
| |
| | |
NetBSD pthread_attr_get_np
This patch adds a signature for the [`pthread_attr_get_np`](https://netbsd.gw.com/cgi-bin/man-cgi?pthread_attr_get_np+3+NetBSD-current) function for all architectures on NetBSD.
Closes #1538
|
| | |
|
| | |
|
| | |
|
|/ |
|
| |
|
|
|
|
| |
It's *msg_prio* in both manpages and posix.
|
| |
|
|
|
|
|
|
|
|
| |
This constant is not stable across OS versions, so it cannot be used in
any backwards- or forwards- compatible way. It's typically used to size
arrays in the kernel and in debugging utilities that are closely tied to
the OS version. Since libc is ignorant about OS versions, we shouldn't
even be defining it.
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Adding UTIME_NOW and UTIME_OMIT to OSes which support utimensat
I've managed to verify a handful of these:
- [FreeBSD](https://github.com/freebsd/freebsd/blob/1d6e4247415d264485ee94b59fdbc12e0c566fd0/tools/build/stat.h#L35)
- [NetBSD](https://github.com/NetBSD/src/blob/64b8a48e1288eb3902ed73113d157af50b2ec596/sys/sys/stat.h#L235)
- [Apple](https://opensource.apple.com/source/xnu/xnu-4903.221.2/bsd/sys/stat.h.auto.html)
I'm less confident in these:
- [Haiku](https://github.com/haiku/haiku/blob/abb59d7351c7ddb50c63c40430a82d94fa61917a/headers/posix/sys/stat.h#L105)
- I could be wrong on this one: https://github.com/haiku/haiku/search?q=UTIME_NOW&unscoped_q=UTIME_NOW
- [WASI](https://github.com/CraneStation/wasi-libc/blob/24792713d7e31cf593d7e19b943ef0c3aa26ef63/libc-top-half/musl/include/sys/stat.h#L71)
- I could be wrong on this one: https://github.com/CraneStation/wasi-libc/search?q=UTIME_NOW&unscoped_q=UTIME_NOW
- [Solarish](https://github.com/illumos/illumos-gate/blob/4e0c5eff9af325c80994e9527b7cb8b3a1ffd1d4/usr/src/uts/common/sys/stat.h#L478)
|
| |
| |
| |
| | |
https://github.com/openbsd/src/blob/master/sys/sys/stat.h#L188
|
| | |
|
|/ |
|
| |
|
|
|
|
| |
MINSIGSTKSZ, and SIGSTKSZ
|
| |
|
|
|
|
| |
Exposes value for most unix like platforms
|
|
|
|
|
|
|
| |
These constants have already been deprecated for a few releases with
a deprecation notice, so they can finally be removed.
Closes rust-lang/libc#665
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add FIONCLEX and other FIO* constants for Linux, DragonFly and OpenBSD
[OpenBSD header](https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sys/sys/filio.h?annotate=1.5) | [DragonFly header](http://gitweb.dragonflybsd.org/dragonfly.git/blame/refs/heads/master:/sys/sys/filio.h) | [Linux search](https://github.com/torvalds/linux/search?q=FIONCLEX+FIOQSIZE&unscoped_q=FIONCLEX+FIOQSIZE&type=Code)
For Linux I've used [godbolt compiler explorer](https://godbolt.org/z/h-C7qM) to get final values where possible.
Wile this crate has FIOCLEX for Fuchsia, Emscripten and Redox, I've not added FIONCLEX for them because those targets appear to support neither.
I started adding FIOASYNC, FIOSETOWN and FIOGETOWN for all the Linux architectures, but gave up when I realized FIOASYNC is kind of deprecated and the other two useless without more symbols. If anybody is interested I have a [branch with how far I got](https://github.com/tormol/rust-libc/tree/sigio).
|
| |
| |
| |
| |
| |
| | |
* Change the type of FIONCLEX on apple platforms from c_uint to c_ulong
* Add FIONCLEX, FIONREAD, FIOASYNC, FIOSETOWN and FIOGETOWN
for DragonFly and OpenBSD
|
|/
|
|
|
|
| |
sigevent structs on most platforms have padding or unused fields. Rather
than display those in the Debug impl by deriving it, manually implement
all extra_traits instead ignoring those fields.
|
|\
| |
| |
| |
| |
| |
| |
| | |
Deprecate fixed width integer type aliases
cc @emilio - I think it makes sense to ensure that the latest released version of bindgen works properly with this change. That is, that even when asked to use C types from, e.g., `libc::`, it does not use aliases for the fixed-width integer C types (e.g. `libc::int64_t`) but uses Rust primitive types instead (e.g. `u64`).
Closes #1304 .
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commits adds a second FreeBSD 12 build job,
and splits the implementation of the FreeBSD module
into two modules, one for FreeBSD 11, and one for FreeBSD 12.
The FreeBSD 11 module is compiled always by default, and is
mostly forward compatible with FreeBSD 12 systems.
The FreeBSD 12 module is only built for now in libc's CI,
and uses FreeBSD 12 data types and APIs, linking to symbols
that are only available in FreeBSD 12.
Basically, when LIBC_CI env variable is defined, and the host
system is a FreeBSD 12 system, then the FreeBSD 12 module is
automatically built and tested. Conditional compilation is done
using a `cfg(freebsd12)` flag.
This commit also re-enables many tests, and documents why
some remain disabled.
|
| |
|