| 1 |
/** |
| 2 |
* Portable routines for functions that have different implementations on different platforms. |
| 3 |
* |
| 4 |
* Copyright: Copyright (C) 1999-2025 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/compiler/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/compiler/src/dmd/root/port.d |
| 10 |
*/ |
| 11 |
|
| 12 |
module dmd.root.port; |
| 13 |
|
| 14 |
import core.stdc.stdint; |
| 15 |
|
| 16 |
nothrow @nogc: |
| 17 |
|
| 18 |
extern (C++) struct Port |
| 19 |
{ |
| 20 |
nothrow @nogc: |
| 21 |
|
| 22 |
static int memicmp(scope const char* s1, scope const char* s2, size_t n) pure; |
| 23 |
|
| 24 |
static char* strupr(char* s) pure; |
| 25 |
|
| 26 |
static bool isFloat32LiteralOutOfRange(scope const(char)* s); |
| 27 |
|
| 28 |
static bool isFloat64LiteralOutOfRange(scope const(char)* s); |
| 29 |
|
| 30 |
// Little endian |
| 31 |
static void writelongLE(uint value, scope void* buffer) pure; |
| 32 |
|
| 33 |
// Little endian |
| 34 |
static uint readlongLE(scope const void* buffer) pure; |
| 35 |
|
| 36 |
// Big endian |
| 37 |
static void writelongBE(uint value, scope void* buffer) pure; |
| 38 |
|
| 39 |
// Big endian |
| 40 |
static uint readlongBE(scope const void* buffer) pure; |
| 41 |
|
| 42 |
// Little endian |
| 43 |
static uint readwordLE(scope const void* buffer) pure; |
| 44 |
|
| 45 |
// Big endian |
| 46 |
static uint readwordBE(scope const void* buffer) pure; |
| 47 |
|
| 48 |
static void valcpy(scope void *dst, uint64_t val, size_t size) pure; |
| 49 |
} |