ObjFW  Check-in [e8005a3cc2]

Overview
Comment:OFFileManager: Set errno to 0 before readdir()

glibc documents this as being required, as does POSIX. However, none of
the BSDs document this, and don't seem to require it.

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | 0.90
Files: files | file ages | folders
SHA3-256: e8005a3cc2ef0d34a3d4b0640850a869abcdcee7e742ed259e9084f40d4eb212
User & Date: js on 2017-08-03 19:17:44
Other Links: branch diff | manifest | tags
Context
2017-08-05
10:04
OFDate: Add -[localMinute] check-in: a420340467 user: js tags: 0.90
2017-08-03
19:17
OFFileManager: Set errno to 0 before readdir() check-in: e8005a3cc2 user: js tags: 0.90
2017-08-02
20:24
OFFile: Remove the b modes from MorphOS check-in: 37b6ed2a2a user: js tags: 0.90
Changes

Modified src/OFFileManager.m from [7bb3d63d81] to [f7096a9a7b].

569
570
571
572
573
574
575

576
577
578
579
580
581
582
				    exceptionWithObject: self
					requestedLength: 0
						  errNo: errno];

			if (dirent == NULL)
				break;
# else

			if ((dirent = readdir(dir)) == NULL) {
				if (errno == 0)
					break;
				else
					@throw [OFReadFailedException
					    exceptionWithObject: self
						requestedLength: 0







>







569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
				    exceptionWithObject: self
					requestedLength: 0
						  errNo: errno];

			if (dirent == NULL)
				break;
# else
			errno = 0;
			if ((dirent = readdir(dir)) == NULL) {
				if (errno == 0)
					break;
				else
					@throw [OFReadFailedException
					    exceptionWithObject: self
						requestedLength: 0