ObjFW  Diff

Differences From Artifact [298e596b16]:

  • File src/OFStream.m — part of check-in [62e2de30b9] at 2015-02-16 08:39:17 on branch trunk — Explicitly pass errno to exceptions

    The old behaviour where the exception would access errno directly on
    creation of the exception was very fragile. The two main problems with
    it were that sometimes it would pick up an errno even though none had
    been set and in other cases that when the exception was created errno
    had already been overridden.

    This also greatly increases errno handling on Win32, especially in
    conjunction with sockets. It can still be improved further, though. (user: js, size: 30737) [annotate] [blame] [check-ins using]

To Artifact [6ab65dacbe]:


1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
- (bool)isBlocking
{
	return _blocking;
}

- (void)setBlocking: (bool)enable
{
#ifndef _WIN32
	bool readImplemented = false, writeImplemented = false;

	@try {
		int readFlags;

		readFlags = fcntl([self fileDescriptorForReading], F_GETFL);








|







1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
- (bool)isBlocking
{
	return _blocking;
}

- (void)setBlocking: (bool)enable
{
#ifdef HAVE_FCNTL
	bool readImplemented = false, writeImplemented = false;

	@try {
		int readFlags;

		readFlags = fcntl([self fileDescriptorForReading], F_GETFL);