Mercurial > projects > ldc
annotate dmd/root/port.h @ 1608:679d101395e8
Merge DMD r262: bugzilla 3381 ([tdpl] Incorrect assessment of ...)
The full bug title is: [tdpl] Incorrect assessment of overriding in
triangular-shaped hierarchy.
---
dmd/class.c | 2 +-
dmd/func.c | 2 ++
2 files changed, 3 insertions(+), 1 deletions(-)
author | Leandro Lucarella <llucax@gmail.com> |
---|---|
date | Wed, 06 Jan 2010 15:18:20 -0300 |
parents | 8026319762be |
children |
rev | line source |
---|---|
1 | 1 |
1195
e961851fb8be
Merged DMD 1.042.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1194
diff
changeset
|
2 // Copyright (c) 1999-2009 by Digital Mars |
1 | 3 // All Rights Reserved |
4 // written by Walter Bright | |
1195
e961851fb8be
Merged DMD 1.042.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1194
diff
changeset
|
5 // http://www.digitalmars.com |
1 | 6 |
7 #ifndef PORT_H | |
8 #define PORT_H | |
9 | |
10 // Portable wrapper around compiler/system specific things. | |
11 // The idea is to minimize #ifdef's in the app code. | |
12 | |
13 #ifndef TYPEDEFS | |
14 #define TYPEDEFS | |
15 | |
16 #include <wchar.h> | |
17 | |
18 #if _MSC_VER | |
19 typedef __int64 longlong; | |
20 typedef unsigned __int64 ulonglong; | |
1367
8026319762be
Merged DMD 1.045 !!!
Tomas Lindquist Olsen <tomas.l.olsen gmail com>
parents:
1195
diff
changeset
|
21 |
8026319762be
Merged DMD 1.045 !!!
Tomas Lindquist Olsen <tomas.l.olsen gmail com>
parents:
1195
diff
changeset
|
22 // According to VC 8.0 docs, long double is the same as double |
8026319762be
Merged DMD 1.045 !!!
Tomas Lindquist Olsen <tomas.l.olsen gmail com>
parents:
1195
diff
changeset
|
23 #define strtold strtod |
8026319762be
Merged DMD 1.045 !!!
Tomas Lindquist Olsen <tomas.l.olsen gmail com>
parents:
1195
diff
changeset
|
24 #define strtof strtod |
8026319762be
Merged DMD 1.045 !!!
Tomas Lindquist Olsen <tomas.l.olsen gmail com>
parents:
1195
diff
changeset
|
25 |
1 | 26 #else |
27 typedef long long longlong; | |
28 typedef unsigned long long ulonglong; | |
29 #endif | |
30 | |
31 #endif | |
32 | |
33 typedef double d_time; | |
34 | |
35 struct Port | |
36 { | |
37 static double nan; | |
38 static double infinity; | |
39 static double dbl_max; | |
40 static double dbl_min; | |
1367
8026319762be
Merged DMD 1.045 !!!
Tomas Lindquist Olsen <tomas.l.olsen gmail com>
parents:
1195
diff
changeset
|
41 static long double ldbl_max; |
1 | 42 |
43 #if __GNUC__ | |
44 // These conflict with macros in math.h, should rename them | |
45 #undef isnan | |
46 #undef isfinite | |
47 #undef isinfinity | |
48 #undef signbit | |
49 #endif | |
50 static int isNan(double); | |
1195
e961851fb8be
Merged DMD 1.042.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1194
diff
changeset
|
51 static int isNan(long double); |
e961851fb8be
Merged DMD 1.042.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1194
diff
changeset
|
52 |
e961851fb8be
Merged DMD 1.042.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1194
diff
changeset
|
53 static int isSignallingNan(double); |
e961851fb8be
Merged DMD 1.042.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1194
diff
changeset
|
54 static int isSignallingNan(long double); |
e961851fb8be
Merged DMD 1.042.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1194
diff
changeset
|
55 |
1 | 56 static int isFinite(double); |
57 static int isInfinity(double); | |
58 static int Signbit(double); | |
59 | |
60 static double floor(double); | |
61 static double pow(double x, double y); | |
62 | |
63 static ulonglong strtoull(const char *p, char **pend, int base); | |
64 | |
65 static char *ull_to_string(char *buffer, ulonglong ull); | |
66 static wchar_t *ull_to_string(wchar_t *buffer, ulonglong ull); | |
67 | |
68 // Convert ulonglong to double | |
69 static double ull_to_double(ulonglong ull); | |
70 | |
71 // Get locale-dependent list separator | |
1195
e961851fb8be
Merged DMD 1.042.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1194
diff
changeset
|
72 static const char *list_separator(); |
e961851fb8be
Merged DMD 1.042.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1194
diff
changeset
|
73 static const wchar_t *wlist_separator(); |
e961851fb8be
Merged DMD 1.042.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1194
diff
changeset
|
74 |
e961851fb8be
Merged DMD 1.042.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1194
diff
changeset
|
75 static char *strupr(char *); |
1 | 76 }; |
77 | |
78 #endif |