Menu

- Learn
- Documentation
  - Language Reference
  - Library Reference
  - Command-line Reference
  - Feature Overview
  - Articles
- Downloads
- Packages
- Community
  - Blog
  - Orgs using D
  - Twitter
  - Calendar
  - Forums
  - IRC
  - Wiki
  - GitHub
  - Issues
  - Get involved
  - Contributors
  - Foundation
  - Security Team
  - Donate
  - Sponsors
- Resources
  - Tour
  - Books
  - Tutorials
  - Tools
  - Editors
  - IDEs
  - run.dlang.io
  - Visual D
  - Acknowledgments
  - D Style
  - Glossary
  - Sitemap

Search
Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using a local clone.

# std.system

Information about the target operating system, environment, and CPU.
License:
Boost License 1.0.
Authors:
Walter Bright and Jonathan M Davis

Source std/system.d

enum `OS`: int;
  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 version(Windows), version(linux), etc.

  See Also:
  Predefined Versions
  `win32`
    Microsoft 32 bit Windows systems
  `win64`
    Microsoft 64 bit Windows systems
  `linux`
    All Linux Systems, except for Android
  `osx`
    Mac OS X
  `freeBSD`
    FreeBSD
  `netBSD`
    NetBSD
  `dragonFlyBSD`
    DragonFlyBSD
  `solaris`
    Solaris
  `android`
    Android
  `otherPosix`
    Other Posix Systems
immutable OS `os`;
  The OS that the program was compiled for.
enum `Endian`: int;
  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 version(BigEndian) and version(LittleEndian).

  See Also:
  Predefined Versions
  `bigEndian`
    Big endian byte order
  `littleEndian`
    Little endian byte order
immutable Endian `endian`;
  The endianness that the program was compiled for.

Copyright © 1999-2018 by the D Language Foundation | Page generated by Ddoc on Sat Sep 1 19:49:42 2018