summaryrefslogtreecommitdiff
path: root/libphobos/libdruntime
diff options
context:
space:
mode:
Diffstat (limited to 'libphobos/libdruntime')
-rw-r--r--libphobos/libdruntime/MERGE2
-rw-r--r--libphobos/libdruntime/core/exception.d13
-rw-r--r--libphobos/libdruntime/core/sys/linux/ifaddrs.d11
-rw-r--r--libphobos/libdruntime/core/sys/posix/sys/select.d44
4 files changed, 47 insertions, 23 deletions
diff --git a/libphobos/libdruntime/MERGE b/libphobos/libdruntime/MERGE
index f11c5fbfb0b..4c0a0bc2aac 100644
--- a/libphobos/libdruntime/MERGE
+++ b/libphobos/libdruntime/MERGE
@@ -1,4 +1,4 @@
-ceff48bf7db05503117f54fdc0cefcb89b711136
+f8bae0455851a1dfc8113d69323415f6de549e39
The first line of this file holds the git revision number of the last
merge done from the dlang/dmd repository.
diff --git a/libphobos/libdruntime/core/exception.d b/libphobos/libdruntime/core/exception.d
index 959ce83f02e..c7b302c4520 100644
--- a/libphobos/libdruntime/core/exception.d
+++ b/libphobos/libdruntime/core/exception.d
@@ -19,6 +19,19 @@ void __switch_errorT()(string file = __FILE__, size_t line = __LINE__) @trusted
assert(0, "No appropriate switch clause found");
}
+/*
+ * Make sure template __switch_errorT is always instantiated when building
+ * druntime. This works around https://issues.dlang.org/show_bug.cgi?id=20802.
+ * When druntime and phobos are compiled with -release, the instance for
+ * __switch_errorT is not needed. An application compiled with -release
+ * could need the instance for __switch_errorT, but the compiler would
+ * not generate code for it, because it assumes, that it was already
+ * generated for druntime. Always including the instance in a compiled
+ * druntime allows to use an application without -release with druntime
+ * with -release.
+ */
+private alias dummy__switch_errorT = __switch_errorT!();
+
/**
* Thrown on a range error.
*/
diff --git a/libphobos/libdruntime/core/sys/linux/ifaddrs.d b/libphobos/libdruntime/core/sys/linux/ifaddrs.d
index 479dfa8d39b..d8c52c148e5 100644
--- a/libphobos/libdruntime/core/sys/linux/ifaddrs.d
+++ b/libphobos/libdruntime/core/sys/linux/ifaddrs.d
@@ -39,11 +39,18 @@ struct ifaddrs
union
{
/// Broadcast address of the interface
- sockaddr* ifu_broadaddr;
+ sockaddr* ifa_broadaddr;
+
/// Point-to-point destination addresss
- sockaddr* if_dstaddr;
+ sockaddr* ifa_dstaddr;
}
+ deprecated("druntime declared this incorrectly before. The correct name is ifa_broadaddr.")
+ alias ifu_broadaddr = ifa_broadaddr;
+
+ deprecated("druntime declared this incorrectly before. The correct name is ifa_dstaddr.")
+ alias if_dstaddr = ifa_dstaddr;
+
/// Address specific data
void* ifa_data;
}
diff --git a/libphobos/libdruntime/core/sys/posix/sys/select.d b/libphobos/libdruntime/core/sys/posix/sys/select.d
index dd05d08dde6..bd342503252 100644
--- a/libphobos/libdruntime/core/sys/posix/sys/select.d
+++ b/libphobos/libdruntime/core/sys/posix/sys/select.d
@@ -183,7 +183,8 @@ else version (FreeBSD)
struct fd_set
{
- __fd_mask[(FD_SETSIZE + (_NFDBITS - 1)) / _NFDBITS] __fds_bits;
+ __fd_mask[(FD_SETSIZE + (_NFDBITS - 1)) / _NFDBITS] fds_bits;
+ deprecated("druntime incorrectly named fds_bits __fds_bits") alias __fds_bits = fds_bits;
}
extern (D) __fd_mask __fdset_mask(uint n) pure
@@ -193,17 +194,17 @@ else version (FreeBSD)
extern (D) void FD_CLR( int n, fd_set* p ) pure
{
- p.__fds_bits[n / _NFDBITS] &= ~__fdset_mask(n);
+ p.fds_bits[n / _NFDBITS] &= ~__fdset_mask(n);
}
extern (D) bool FD_ISSET( int n, const(fd_set)* p ) pure
{
- return (p.__fds_bits[n / _NFDBITS] & __fdset_mask(n)) != 0;
+ return (p.fds_bits[n / _NFDBITS] & __fdset_mask(n)) != 0;
}
extern (D) void FD_SET( int n, fd_set* p ) pure
{
- p.__fds_bits[n / _NFDBITS] |= __fdset_mask(n);
+ p.fds_bits[n / _NFDBITS] |= __fdset_mask(n);
}
extern (D) void FD_ZERO( fd_set* p ) pure
@@ -214,7 +215,7 @@ else version (FreeBSD)
_p = p;
_n = (FD_SETSIZE + (_NFDBITS - 1)) / _NFDBITS;
while (_n > 0)
- _p.__fds_bits[--_n] = 0;
+ _p.fds_bits[--_n] = 0;
}
int pselect(int, fd_set*, fd_set*, fd_set*, const scope timespec*, const scope sigset_t*);
@@ -232,7 +233,8 @@ else version (NetBSD)
struct fd_set
{
- __fd_mask[(FD_SETSIZE + (_NFDBITS - 1)) / _NFDBITS] __fds_bits;
+ __fd_mask[(FD_SETSIZE + (_NFDBITS - 1)) / _NFDBITS] fds_bits;
+ deprecated("druntime incorrectly named fds_bits __fds_bits") alias __fds_bits = fds_bits;
}
extern (D) __fd_mask __fdset_mask(uint n) pure
@@ -242,17 +244,17 @@ else version (NetBSD)
extern (D) void FD_CLR( int n, fd_set* p ) pure
{
- p.__fds_bits[n / _NFDBITS] &= ~__fdset_mask(n);
+ p.fds_bits[n / _NFDBITS] &= ~__fdset_mask(n);
}
extern (D) bool FD_ISSET( int n, const(fd_set)* p ) pure
{
- return (p.__fds_bits[n / _NFDBITS] & __fdset_mask(n)) != 0;
+ return (p.fds_bits[n / _NFDBITS] & __fdset_mask(n)) != 0;
}
extern (D) void FD_SET( int n, fd_set* p ) pure
{
- p.__fds_bits[n / _NFDBITS] |= __fdset_mask(n);
+ p.fds_bits[n / _NFDBITS] |= __fdset_mask(n);
}
extern (D) void FD_ZERO( fd_set* p ) pure
@@ -263,7 +265,7 @@ else version (NetBSD)
_p = p;
_n = (FD_SETSIZE + (_NFDBITS - 1)) / _NFDBITS;
while (_n > 0)
- _p.__fds_bits[--_n] = 0;
+ _p.fds_bits[--_n] = 0;
}
int pselect(int, fd_set*, fd_set*, fd_set*, const scope timespec*, const scope sigset_t*);
@@ -281,7 +283,8 @@ else version (OpenBSD)
struct fd_set
{
- __fd_mask[(FD_SETSIZE + (_NFDBITS - 1)) / _NFDBITS] __fds_bits;
+ __fd_mask[(FD_SETSIZE + (_NFDBITS - 1)) / _NFDBITS] fds_bits;
+ deprecated("druntime incorrectly named fds_bits __fds_bits") alias __fds_bits = fds_bits;
}
extern (D) __fd_mask __fdset_mask(uint n) pure
@@ -291,17 +294,17 @@ else version (OpenBSD)
extern (D) void FD_CLR(int n, fd_set* p) pure
{
- p.__fds_bits[n / _NFDBITS] &= ~__fdset_mask(n);
+ p.fds_bits[n / _NFDBITS] &= ~__fdset_mask(n);
}
extern (D) bool FD_ISSET(int n, const(fd_set)* p) pure
{
- return (p.__fds_bits[n / _NFDBITS] & __fdset_mask(n)) != 0;
+ return (p.fds_bits[n / _NFDBITS] & __fdset_mask(n)) != 0;
}
extern (D) void FD_SET(int n, fd_set* p) pure
{
- p.__fds_bits[n / _NFDBITS] |= __fdset_mask(n);
+ p.fds_bits[n / _NFDBITS] |= __fdset_mask(n);
}
extern (D) void FD_ZERO(fd_set* p) pure
@@ -310,7 +313,7 @@ else version (OpenBSD)
size_t _n = (FD_SETSIZE + (_NFDBITS - 1)) / _NFDBITS;
while (_n > 0)
- _p.__fds_bits[--_n] = 0;
+ _p.fds_bits[--_n] = 0;
}
int pselect(int, fd_set*, fd_set*, fd_set*, const scope timespec*, const scope sigset_t*);
@@ -328,7 +331,8 @@ else version (DragonFlyBSD)
struct fd_set
{
- __fd_mask[(FD_SETSIZE + (_NFDBITS - 1)) / _NFDBITS] __fds_bits;
+ __fd_mask[(FD_SETSIZE + (_NFDBITS - 1)) / _NFDBITS] fds_bits;
+ deprecated("druntime incorrectly named fds_bits __fds_bits") alias __fds_bits = fds_bits;
}
extern (D) __fd_mask __fdset_mask(uint n) pure
@@ -338,17 +342,17 @@ else version (DragonFlyBSD)
extern (D) void FD_CLR( int n, fd_set* p ) pure
{
- p.__fds_bits[n / _NFDBITS] &= ~__fdset_mask(n);
+ p.fds_bits[n / _NFDBITS] &= ~__fdset_mask(n);
}
extern (D) bool FD_ISSET( int n, const(fd_set)* p ) pure
{
- return (p.__fds_bits[n / _NFDBITS] & __fdset_mask(n)) != 0;
+ return (p.fds_bits[n / _NFDBITS] & __fdset_mask(n)) != 0;
}
extern (D) void FD_SET( int n, fd_set* p ) pure
{
- p.__fds_bits[n / _NFDBITS] |= __fdset_mask(n);
+ p.fds_bits[n / _NFDBITS] |= __fdset_mask(n);
}
extern (D) void FD_ZERO( fd_set* p ) pure
@@ -359,7 +363,7 @@ else version (DragonFlyBSD)
_p = p;
_n = (FD_SETSIZE + (_NFDBITS - 1)) / _NFDBITS;
while (_n > 0)
- _p.__fds_bits[--_n] = 0;
+ _p.fds_bits[--_n] = 0;
}
int pselect(int, fd_set*, fd_set*, fd_set*, const scope timespec*, const scope sigset_t*);