ObjFW  Check-in [20fff11144]

Overview
Comment:Remove dead code.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | 0.6
Files: files | file ages | folders
SHA3-256: 20fff1114475abf6e0587eaad327e3d43c638a26a960f8d9079b3857daf98b6e
User & Date: js on 2012-03-01 14:52:00
Other Links: branch diff | manifest | tags
Context
2012-03-01
15:03
Fix OFDate documentation. check-in: 3a88ce0e8f user: js tags: 0.6
14:52
Remove dead code. check-in: 20fff11144 user: js tags: 0.6
2012-02-29
21:12
\cond internal is not needed anymore. check-in: 95db0335d8 user: js tags: 0.6
Changes

Modified configure.ac from [9c0fb75b7f] to [5de95df3b4].

473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
473
474
475
476
477
478
479














480
481
482
483
484
485
486







-
-
-
-
-
-
-
-
-
-
-
-
-
-







AC_CHECK_FUNC(gmtime_r, [
	AC_DEFINE(HAVE_GMTIME_R, 1, [Whether we have gmtime_r])
])
AC_CHECK_FUNC(localtime_r, [
	AC_DEFINE(HAVE_LOCALTIME_R, 1, [Whether we have localtime_r])
])

AC_MSG_CHECKING(for tm_gmtoff in struct tm)
AC_TRY_COMPILE([
	#define _GNU_SOURCE
	#include <time.h>
], [
	struct tm tm;
	tm.tm_gmtoff = 0;
], [
	AC_DEFINE(STRUCT_TM_HAS_TM_GMTOFF, 1, [Whether struct tm has tm_gmtoff])
	AC_MSG_RESULT(yes)
], [
	AC_MSG_RESULT(no)
])

AC_CHECK_FUNC(kqueue, [
	AC_DEFINE(HAVE_KQUEUE, 1, [Whether we have kqueue])
	AC_SUBST(OFSTREAMOBSERVER_KQUEUE_M, "OFStreamObserver_kqueue.m")
])
AC_CHECK_HEADER(poll.h, [
	AC_DEFINE(HAVE_POLL_H, 1, [Whether we have poll.h])
	AC_SUBST(OFSTREAMOBSERVER_POLL_M, "OFStreamObserver_poll.m")

Modified src/OFDate.m from [683d9127f2] to [eecbbd56be].

246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
246
247
248
249
250
251
252






253
254
255
256
257
258
259







-
-
-
-
-
-







		tm.tm_isdst = -1;

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

#ifdef STRUCT_TM_HAS_TM_GMTOFF
		if (tm.tm_gmtoff != 0)
			@throw [OFInvalidFormatException
			    exceptionWithClass: isa];
#endif

		/* Years */
		seconds = (int64_t)(tm.tm_year - 70) * 31536000;
		/* Days of leap years, excluding the year to look at */
		seconds += (((tm.tm_year + 1899) / 4) - 492) * 86400;
		seconds -= (((tm.tm_year + 1899) / 100) - 19) * 86400;
		seconds += (((tm.tm_year + 1899) / 400) - 4) * 86400;
		/* Leap day */