ObjFW  Check-in [0db06dfe03]

Overview
Comment:Remove dead code.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 0db06dfe03e7ab93412be669a47c2fa5f834e6dae0d3f91a141cc4d41f514168
User & Date: js on 2012-03-01 14:52:00
Other Links: manifest | tags
Context
2012-03-01
15:03
Fix OFDate documentation. check-in: 3b2d8b81ed user: js tags: trunk
14:52
Remove dead code. check-in: 0db06dfe03 user: js tags: trunk
2012-02-29
21:12
\cond internal is not needed anymore. check-in: 96469dff3b user: js tags: trunk
Changes

Modified configure.ac from [4b03df89d2] to [be20c9c7db].

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 */