Previously, std.socket code assumed that MSG_NOSIGNAL existed on all platforms, which is not the case – std.c.osx.socket actually has a comment saying »Not defined in OS X, but we'll use them anyway«. This lead to Socket.send() raising SIGPIPE on OS X if the peer had already closed the connection.
With this commit, std.socket sets the SO_NOSIGPIPE socket option on systems that support it for the same effect as MSG_NOSIGNAL on Linux.
Strictly speaking, removing the NOSIGNAL SocketFlag is a breaking API change, but I do not think there is any code actually using it, as it has always been set implicitly by std.socket anyway.
Actually, the timeval struct could be removed altogether as it isn't used anywhere in std.socket (I didn't realize that I wasn't using the C standard library one), but this would be still a breaking API change, so I refrained from it.
Fixed unlisted bug, there could be a race condition on linux with gethostbyname and gethostbyaddr, now synchronizing entire processing of hostent struct.
For some reason std.socket unittest fails with HostException on win32 AutoTester. It used to succeed before; it also succeeds on my environment (FreeBSD, Gentoo and Wine).
Thanks to Unknown W. Brackets and Alexey Ivanov for the patch!
sockaddr_in.sin_family is auto-initialized with AF_INET only on Windows
(compare std.c.windows.winsock & core.sys.posix.netinet.in_). TcpSocket
should explicitly set sin_family to AF_INET.
* Transformed std.c.linux.* into wrappers around core.sys.posix modules where appropriate.
* Added std.c.osx as the OSX equivalent of std.c.linux.
* Added std.c.osx.socket for OSX-specific socket declarations not covered by the Posix spec.
* Altered all makefiles to zip, etc, the new std.c.osx package.
* Removed gcstats. Garbage collector statistics will be avaialable in durintime's 'memory' module.
* Removed object.d. This module is replaced by the object.d provided by druntime.
* Removed std.array. To trap an array bounds error, import 'exception' from druntime and catch ArrayBoundsException.
* Removed std.asserterror. To trap an asertion failure, import 'exception' from druntime and catch AssertException.
* Removed std.gc. To interact with the garbage collector, import 'memory' from druntime.
* Removed std.hiddenfunc. No equivalent exception is currently exposed by druntime, but if one is exposed it will be called HiddenFuncException and be declared in 'exception'.
* Removed std.moduleinit. druntime declares ModuleInfo in object.d, so it is implicitly availble without importing.
* Removed std.outofmemory. To trap an out of memory error, import 'exception' from druntime and catch OutOfMemoryException.
* Removed std.switcherr. To trap a switch error, import 'exception' from druntime and catch SwitchException.
* Removed std.synchro. This functionality will exist within druintime.
* Removed std.thread. A Thread class is available within druntime's 'thread' module. An interface comparison will be provided separately.
* Removed std.typeinfo. The classes defined in this package are for runtime use and should not be visible to the user.
The prior version of Phobos has been archived in tags/phobos-2.019 if needed.
-- add std.getopt
-- add std.variant
-- switch strings over to be invariant rather than const
-- hopefully the last big linux makefile overhaul
-- fix for bug 1579: write[ln] fails for obj.toString()
-- fix negative precision handling in std.format
-- add some file and directory iterator helpers
-- among other little changes here and there...