Skip to content

Commit

Permalink
Adjust private
Browse files Browse the repository at this point in the history
  • Loading branch information
andralex committed Jun 11, 2017
1 parent 9c0437b commit 1c23ab8
Showing 1 changed file with 29 additions and 32 deletions.
61 changes: 29 additions & 32 deletions std/process.d
Original file line number Diff line number Diff line change
Expand Up @@ -111,50 +111,47 @@ version (Win32) version (CRuntime_DigitalMars) version = DMC_RUNTIME;
// Some of the following should be moved to druntime.
private
{

// Microsoft Visual C Runtime (MSVCRT) declarations.
version (Windows)
{
version (DMC_RUNTIME) { } else
// Microsoft Visual C Runtime (MSVCRT) declarations.
version (Windows)
{
import core.stdc.stdint;
enum
version (DMC_RUNTIME) { } else
{
STDIN_FILENO = 0,
STDOUT_FILENO = 1,
STDERR_FILENO = 2,
import core.stdc.stdint;
enum
{
STDIN_FILENO = 0,
STDOUT_FILENO = 1,
STDERR_FILENO = 2,
}
}
}
}

// POSIX API declarations.
version (Posix)
{
version (OSX)
// POSIX API declarations.
version (Posix)
{
private extern(C) char*** _NSGetEnviron() nothrow;
private const(char**) getEnvironPtr() @property @trusted
version (OSX)
{
return *_NSGetEnviron;
extern(C) char*** _NSGetEnviron() nothrow;
const(char**) getEnvironPtr() @trusted
{
return *_NSGetEnviron;
}
}
}
else
{
// Made available by the C runtime:
private extern(C) extern __gshared const char** environ;
private const(char**) getEnvironPtr() @property @trusted
else
{
return environ;
// Made available by the C runtime:
extern(C) extern __gshared const char** environ;
const(char**) getEnvironPtr() @property @trusted
{
return environ;
}
}
}

@system unittest
{
new Thread({assert(getEnvironPtr !is null);}).start();
@system unittest
{
new Thread({assert(getEnvironPtr !is null);}).start();
}
}
}


} // private


Expand Down

0 comments on commit 1c23ab8

Please sign in to comment.