Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign uprfc 1291: Add libutil to scope of libc crate on Linux #1529
Conversation
kamalmarhubi
referenced this pull request
Mar 4, 2016
Merged
apple: Add openpty(3) and forkpty(3) #202
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
It would be helpful to also provide some rationale as to why this new library should be picked up by default. For example it would be nice to see how compatible this is across platforms (not just Linux), across various C libraries on Linux (like MUSL), etc. It would also be useful to know whether this is available throughout various distributions of Linux. |
kamalmarhubi
force-pushed the
kamalmarhubi:libc-libutil
branch
from
66df245
to
b547ddb
Mar 5, 2016
This comment has been minimized.
This comment has been minimized.
|
Ah yes I meant to do that. I've updated the commit message with a bunch of detail regarding |
kamalmarhubi
force-pushed the
kamalmarhubi:libc-libutil
branch
from
b547ddb
to
504fc53
Mar 5, 2016
alexcrichton
self-assigned this
Mar 7, 2016
alexcrichton
added
the
T-libs
label
Mar 7, 2016
This comment has been minimized.
This comment has been minimized.
|
Thanks @kamalmarhubi! These seem like they're widely available enough and somewhat standard enough that it appears reasonable to me to include them. |
This comment has been minimized.
This comment has been minimized.
|
@alexcrichton what's the process on an RFC change like this? |
This comment has been minimized.
This comment has been minimized.
|
This falls under the purview of the libs team, so we'll move this into FCP when we get a chance to get around to this (our triage meeting is on Wednesdays) |
This comment has been minimized.
This comment has been minimized.
|
|
alexcrichton
added
the
I-nominated
label
Mar 22, 2016
This comment has been minimized.
This comment has been minimized.
|
I have some reservations about this. Right now the things libc links to can reasonably be described as part of the C runtime - they are all things that a C compiler will link you to by default in some scenario - crt, compiler-rt, m, dl, pthreads. I don't know that libutil is in this same category. |
This comment has been minimized.
This comment has been minimized.
jmesmon
commented
Mar 24, 2016
|
@brson what do you mean "will link you to by default"? IIRC, |
This comment has been minimized.
This comment has been minimized.
This is only true for glibc-based platforms. System.dylib, libmusl and many other saner runtimes link to everything by default. |
This comment has been minimized.
This comment has been minimized.
jmesmon
commented
Mar 24, 2016
This comment has been minimized.
This comment has been minimized.
|
|
alexcrichton
added
final-comment-period
and removed
I-nominated
labels
Mar 24, 2016
This comment has been minimized.
This comment has been minimized.
|
The symbols in |
This comment has been minimized.
This comment has been minimized.
|
The libs team discussed this RFC during triage today and the decision was to merge. The libutil.a library seems ubiquitous enough to add and the functions are common enough too. Thanks again for the RFC @kamalmarhubi! |
alexcrichton
merged commit 504fc53
into
rust-lang:master
Mar 31, 2016
This comment has been minimized.
This comment has been minimized.
|
yay! |
kamalmarhubi commentedMar 4, 2016
The initial motivation for adding this library is to get access to
openpty(3)andforkpty(3). These simplify opening a pseudoterminalmaster / slave pair. The functions are defined on Linux, OSX, FreeBSD,
NetBSD, and OpenBSD. On OS X, they are available without linking to any
additionaly libraries; on the other platforms they require linking with
-lutil.On Linux, libutil is part of glibc, and defines 6 symbols:
libutil is available in the base installs of Debian-, Fedora-, and
Arch-derived distributions, as well as openSUSE and Android, though on
Android the
pty.hheader that declares the functions seems not to beavailable. Together, these cover the DistroWatch 0 top 10
distributions.
In musl libc,
openpty(3)andforkpty(3)are included inlibc.a.On NetBSD and OpenBSD, these functions are included in libutil, which
defines about 100 functions.
On FreeBSD, these functions are included in libutil, which defines about
200 functions.