ObjFW  Check-in [7d381048fb]

Overview
Comment:OFDate: Use _mktime64() on Windows
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 7d381048fbd3fff54f5ad5d845663601c4b1e9cea77857689d9480d5e492c8c3
User & Date: js on 2016-05-21 22:19:59
Other Links: manifest | tags
Context
2016-05-22
10:03
MIPS64 lookup: That addiu should have been daddiu check-in: 34fe2d87f2 user: js tags: trunk
2016-05-21
22:19
OFDate: Use _mktime64() on Windows check-in: 7d381048fb user: js tags: trunk
21:53
configure: Remove check for GCC bug objc/27438 check-in: 3f704f13c4 user: js tags: trunk
Changes

Modified src/OFDate.m from [d7cb394675] to [7b98bd3de0].

285
286
287
288
289
290
291

292
293




294
295
296
297
298
299
300

		tm.tm_isdst = -1;

		if (of_strptime([string UTF8String], [format UTF8String],
		    &tm) == NULL)
			@throw [OFInvalidFormatException exception];


		if ((_seconds = mktime(&tm)) == -1)
			@throw [OFInvalidFormatException exception];




	} @catch (id e) {
		[self release];
		@throw e;
	}

	return self;
}







>


>
>
>
>







285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305

		tm.tm_isdst = -1;

		if (of_strptime([string UTF8String], [format UTF8String],
		    &tm) == NULL)
			@throw [OFInvalidFormatException exception];

#ifndef OF_WINDOWS
		if ((_seconds = mktime(&tm)) == -1)
			@throw [OFInvalidFormatException exception];
#else
		if ((_seconds = _mktime64(&tm)) == -1)
			@throw [OFInvalidFormatException exception];
#endif
	} @catch (id e) {
		[self release];
		@throw e;
	}

	return self;
}