mirror of
https://github.com/dlang/phobos.git
synced 2025-04-29 22:50:38 +03:00
Merge pull request #2330 from joakim-noah/strerror_move
Deprecate std.c.string and move its contents to druntime
This commit is contained in:
commit
3cd7afcb1b
9 changed files with 17 additions and 38 deletions
|
@ -3505,16 +3505,16 @@ Initialize with a message and an error code. */
|
|||
errno = e;
|
||||
version (Posix)
|
||||
{
|
||||
import std.c.string : strerror_r;
|
||||
import core.stdc.string : strerror_r;
|
||||
|
||||
char[256] buf = void;
|
||||
version (linux)
|
||||
{
|
||||
auto s = std.c.string.strerror_r(errno, buf.ptr, buf.length);
|
||||
auto s = core.stdc.string.strerror_r(errno, buf.ptr, buf.length);
|
||||
}
|
||||
else
|
||||
{
|
||||
std.c.string.strerror_r(errno, buf.ptr, buf.length);
|
||||
core.stdc.string.strerror_r(errno, buf.ptr, buf.length);
|
||||
auto s = buf.ptr;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue