/usr/include/d/std/system.d is in libphobos2-ldc-dev 1:0.17.1-1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | // Written in the D programming language.
/**
* Information about the target operating system, environment, and CPU.
*
* Macros:
* WIKI = Phobos/StdSystem
*
* Copyright: Copyright Digital Mars 2000 - 2011
* License: $(WEB www.boost.org/LICENSE_1_0.txt, Boost License 1.0).
* Authors: $(WEB digitalmars.com, Walter Bright) and Jonathan M Davis
* Source: $(PHOBOSSRC std/_system.d)
*/
module std.system;
immutable
{
/++
Operating system.
Note:
This is for cases where you need a value representing the OS at
runtime. If you're doing something which should compile differently
on different OSes, then please use $(D version(Windows)),
$(D version(linux)), etc.
See_Also:
<a href="../version.html#PredefinedVersions">Predefined Versions</a>
+/
enum OS
{
win32 = 1, /// Microsoft 32 bit Windows systems
win64, /// Microsoft 64 bit Windows systems
linux, /// All Linux Systems
osx, /// Mac OS X
freeBSD, /// FreeBSD
solaris, /// Solaris
android, /// Android
otherPosix /// Other Posix Systems
}
/// The OS that the program was compiled for.
version(Win32) OS os = OS.win32;
else version(Win64) OS os = OS.win64;
else version(Android) OS os = OS.android;
else version(linux) OS os = OS.linux;
else version(OSX) OS os = OS.osx;
else version(FreeBSD) OS os = OS.freeBSD;
else version(Posix) OS os = OS.otherPosix;
else static assert(0, "Unknown OS.");
/++
Byte order endianness.
Note:
This is intended for cases where you need to deal with endianness at
runtime. If you're doing something which should compile differently
depending on whether you're compiling on a big endian or little
endian machine, then please use $(D version(BigEndian)) and
$(D version(LittleEndian)).
See_Also:
<a href="../version.html#PredefinedVersions">Predefined Versions</a>
+/
enum Endian
{
bigEndian, /// Big endian byte order
littleEndian /// Little endian byte order
}
/// The endianness that the program was compiled for.
version(LittleEndian) Endian endian = Endian.littleEndian;
else Endian endian = Endian.bigEndian;
}
|