Home | History | Annotate | Line # | Download | only in root
      1      1.1  mrg 
      2  1.1.1.2  mrg /* Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved
      3  1.1.1.2  mrg  * written by Walter Bright
      4  1.1.1.2  mrg  * https://www.digitalmars.com
      5      1.1  mrg  * Distributed under the Boost Software License, Version 1.0.
      6  1.1.1.2  mrg  * https://www.boost.org/LICENSE_1_0.txt
      7      1.1  mrg  * https://github.com/dlang/dmd/blob/master/src/dmd/root/port.h
      8      1.1  mrg  */
      9      1.1  mrg 
     10      1.1  mrg #pragma once
     11      1.1  mrg 
     12      1.1  mrg // Portable wrapper around compiler/system specific things.
     13      1.1  mrg // The idea is to minimize #ifdef's in the app code.
     14      1.1  mrg 
     15  1.1.1.2  mrg #include "dsystem.h"
     16  1.1.1.2  mrg #include "dcompat.h"
     17      1.1  mrg 
     18      1.1  mrg typedef unsigned char utf8_t;
     19      1.1  mrg 
     20      1.1  mrg struct Port
     21      1.1  mrg {
     22  1.1.1.2  mrg     static int memicmp(const char *s1, const char *s2, d_size_t n);
     23      1.1  mrg     static char *strupr(char *s);
     24      1.1  mrg 
     25      1.1  mrg     static bool isFloat32LiteralOutOfRange(const char *s);
     26      1.1  mrg     static bool isFloat64LiteralOutOfRange(const char *s);
     27      1.1  mrg 
     28      1.1  mrg     static void writelongLE(unsigned value, void *buffer);
     29  1.1.1.2  mrg     static unsigned readlongLE(const void *buffer);
     30      1.1  mrg     static void writelongBE(unsigned value, void *buffer);
     31  1.1.1.2  mrg     static unsigned readlongBE(const void *buffer);
     32  1.1.1.2  mrg     static unsigned readwordLE(const void *buffer);
     33  1.1.1.2  mrg     static unsigned readwordBE(const void *buffer);
     34  1.1.1.2  mrg     static void valcpy(void *dst, uint64_t val, d_size_t size);
     35      1.1  mrg };
     36