d: Merge upstream dmd, druntime 4c18eed967, phobos d945686a4.
[official-gcc.git] / gcc / d / dmd / root / port.d
blob290280f619c990444724a08dd44e17529ecd1350
1 /**
2 * Portable routines for functions that have different implementations on different platforms.
4 * Copyright: Copyright (C) 1999-2023 by The D Language Foundation, All Rights Reserved
5 * Authors: Walter Bright, https://www.digitalmars.com
6 * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
7 * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/root/port.d, root/_port.d)
8 * Documentation: https://dlang.org/phobos/dmd_root_port.html
9 * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/port.d
12 module dmd.root.port;
14 import core.stdc.stdint;
16 nothrow @nogc:
18 extern (C++) struct Port
20 nothrow @nogc:
22 static int memicmp(scope const char* s1, scope const char* s2, size_t n) pure;
24 static char* strupr(char* s) pure;
26 static bool isFloat32LiteralOutOfRange(scope const(char)* s);
28 static bool isFloat64LiteralOutOfRange(scope const(char)* s);
30 // Little endian
31 static void writelongLE(uint value, scope void* buffer) pure;
33 // Little endian
34 static uint readlongLE(scope const void* buffer) pure;
36 // Big endian
37 static void writelongBE(uint value, scope void* buffer) pure;
39 // Big endian
40 static uint readlongBE(scope const void* buffer) pure;
42 // Little endian
43 static uint readwordLE(scope const void* buffer) pure;
45 // Big endian
46 static uint readwordBE(scope const void* buffer) pure;
48 static void valcpy(scope void *dst, uint64_t val, size_t size) pure;