Allow returning something of type void in a function that returns void
[delight/core.git] / dmd2 / port.h
blob02d0738773587648784504f1070c61faeba668ba
2 // Copyright (c) 1999-2002 by Digital Mars
3 // All Rights Reserved
4 // written by Walter Bright
5 // www.digitalmars.com
7 #ifndef PORT_H
8 #define PORT_H
10 // Portable wrapper around compiler/system specific things.
11 // The idea is to minimize #ifdef's in the app code.
13 #ifndef TYPEDEFS
14 #define TYPEDEFS
16 //#include <wchar.h>
18 #if _MSC_VER
19 typedef __int64 longlong;
20 typedef unsigned __int64 ulonglong;
21 #else
22 typedef long long longlong;
23 typedef unsigned long long ulonglong;
24 #endif
26 #endif
28 typedef double d_time;
30 struct Port
32 static double nan;
33 static double infinity;
34 static double dbl_max;
35 static double dbl_min;
37 #if __GNUC__
38 // These conflict with macros in math.h, should rename them
39 #undef isnan
40 #undef isfinite
41 #undef isinfinity
42 #undef signbit
43 #endif
44 static int isNan(double);
45 static int isFinite(double);
46 static int isInfinity(double);
47 static int Signbit(double);
49 static double floor(double);
50 static double pow(double x, double y);
52 static ulonglong strtoull(const char *p, char **pend, int base);
54 static char *ull_to_string(char *buffer, ulonglong ull);
55 // static wchar_t *ull_to_string(wchar_t *buffer, ulonglong ull);
57 // Convert ulonglong to double
58 static double ull_to_double(ulonglong ull);
60 // Get locale-dependent list separator
61 static char *list_separator();
62 // static wchar_t *wlist_separator();
65 #endif