]> gcc.gnu.org Git - gcc.git/blob - gcc/d/dmd/root/port.h
Add D front-end, libphobos library, and D2 testsuite.
[gcc.git] / gcc / d / dmd / root / port.h
1
2 /* Copyright (C) 1999-2018 by The D Language Foundation, All Rights Reserved
3 * http://www.digitalmars.com
4 * Distributed under the Boost Software License, Version 1.0.
5 * http://www.boost.org/LICENSE_1_0.txt
6 * https://github.com/dlang/dmd/blob/master/src/dmd/root/port.h
7 */
8
9 #pragma once
10
11 // Portable wrapper around compiler/system specific things.
12 // The idea is to minimize #ifdef's in the app code.
13
14 #include <stdlib.h> // for alloca
15 #include <stdint.h>
16
17 #if _MSC_VER
18 #include <alloca.h>
19 typedef __int64 longlong;
20 typedef unsigned __int64 ulonglong;
21 #else
22 typedef long long longlong;
23 typedef unsigned long long ulonglong;
24 #endif
25
26 typedef unsigned char utf8_t;
27
28 struct Port
29 {
30 static int memicmp(const char *s1, const char *s2, size_t n);
31 static char *strupr(char *s);
32
33 static bool isFloat32LiteralOutOfRange(const char *s);
34 static bool isFloat64LiteralOutOfRange(const char *s);
35
36 static void writelongLE(unsigned value, void *buffer);
37 static unsigned readlongLE(void *buffer);
38 static void writelongBE(unsigned value, void *buffer);
39 static unsigned readlongBE(void *buffer);
40 static unsigned readwordLE(void *buffer);
41 static unsigned readwordBE(void *buffer);
42 static void valcpy(void *dst, uint64_t val, size_t size);
43 };
This page took 0.035853 seconds and 5 git commands to generate.