Skip to content

Commit 63fdb28

Browse files
authored
Replace internal getEnvironPtr with its equivalent from druntime (#10614)
* Replace internal `getEnvironPtr` with its equivalent from druntime * Further simplify
1 parent 955c6e3 commit 63fdb28

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

std/process.d

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -146,23 +146,7 @@ private
146146
// POSIX API declarations.
147147
version (Posix)
148148
{
149-
version (Darwin)
150-
{
151-
extern(C) char*** _NSGetEnviron() nothrow;
152-
const(char**) getEnvironPtr() @trusted
153-
{
154-
return *_NSGetEnviron;
155-
}
156-
}
157-
else
158-
{
159-
// Made available by the C runtime:
160-
extern(C) extern __gshared const char** environ;
161-
const(char**) getEnvironPtr() @trusted
162-
{
163-
return environ;
164-
}
165-
}
149+
import core.sys.posix.unistd : getEnvironPtr = environ;
166150

167151
@system unittest
168152
{

0 commit comments

Comments
 (0)