/
__fileinit.d
40 lines (35 loc) · 1.11 KB
/
__fileinit.d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Written in the D programming language.
/**
* The only purpose of this module is to do the static construction for
* std.file, to eliminate cyclic construction errors.
*
* Copyright: Copyright Digital Mars 2008 - 2009.
* License: <a href="http://www.boost.org/LICENSE_1_0.txt">Boost License 1.0</a>.
* Authors: $(WEB digitalmars.com, Walter Bright)
* Source: $(PHOBOSSRC std/___fileinit.d)
*/
/* Copyright Digital Mars 2008 - 2009.
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt)
*/
module std.__fileinit;
version (Windows)
{
version (Win32)
{
private import std.c.windows.windows;
//This really should be immutable, but std.windows.registry messes with
//it in its unit tests.
shared bool useWfuncs = true;
shared static this()
{
// Win 95, 98, ME do not implement the W functions
useWfuncs = (GetVersion() < 0x80000000);
}
}
else version (Win64)
{
enum useWfuncs = true;
}
}