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
14 import core
.stdc
.stdint
;
18 extern (C
++) struct Port
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
);
31 static void writelongLE(uint value
, scope void* buffer
) pure;
34 static uint readlongLE(scope const void* buffer
) pure;
37 static void writelongBE(uint value
, scope void* buffer
) pure;
40 static uint readlongBE(scope const void* buffer
) pure;
43 static uint readwordLE(scope const void* buffer
) pure;
46 static uint readwordBE(scope const void* buffer
) pure;
48 static void valcpy(scope void *dst
, uint64_t val
, size_t size
) pure;