<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>change log for rtems (2011-09-28)</title>
</head>
<body text='#000000' bgcolor='#ffffff'>
<a name='cs1'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
 <font color='#bb2222'><strong>sh</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2011-09-28 Sebastian Huber <sebastian.huber@embedded-brains.de>

        * rtems/include/rtems/rtems/clock.h, rtems/src/clockset.c: Added const
        qualifier in rtems_clock_set().
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/ChangeLog.diff?r1=text&tr1=1.2927&r2=text&tr2=1.2928&diff_format=h">M</a></td><td width='1%'>1.2928</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/rtems/include/rtems/rtems/clock.h.diff?r1=text&tr1=1.25&r2=text&tr2=1.26&diff_format=h">M</a></td><td width='1%'>1.26</td><td width='100%'>cpukit/rtems/include/rtems/rtems/clock.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/rtems/src/clockset.c.diff?r1=text&tr1=1.9&r2=text&tr2=1.10&diff_format=h">M</a></td><td width='1%'>1.10</td><td width='100%'>cpukit/rtems/src/clockset.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2927 rtems/cpukit/ChangeLog:1.2928
--- rtems/cpukit/ChangeLog:1.2927       Wed Sep 28 09:42:11 2011
+++ rtems/cpukit/ChangeLog      Wed Sep 28 10:46:12 2011
</font><font color='#997700'>@@ -1,5 +1,10 @@
</font> 2011-09-28        Sebastian Huber <sebastian.huber@embedded-brains.de>
 
<font color='#000088'>+   * rtems/include/rtems/rtems/clock.h, rtems/src/clockset.c: Added const
+       qualifier in rtems_clock_set().
+
+2011-09-28     Sebastian Huber <sebastian.huber@embedded-brains.de>
+
</font>   PR 1914/cpukit
        * score/src/timespecgreaterthan.c, score/src/ts64greaterthan.c:
        Removed files.

<font color='#006600'>diff -u rtems/cpukit/rtems/include/rtems/rtems/clock.h:1.25 rtems/cpukit/rtems/include/rtems/rtems/clock.h:1.26
--- rtems/cpukit/rtems/include/rtems/rtems/clock.h:1.25 Thu Dec 17 14:27:28 2009
+++ rtems/cpukit/rtems/include/rtems/rtems/clock.h      Wed Sep 28 10:46:13 2011
</font><font color='#997700'>@@ -181,7 +181,7 @@
</font>  *        may be executed immediately if the time is moved forward.
  */
 rtems_status_code rtems_clock_set(
<font color='#880000'>-  rtems_time_of_day *time_buffer
</font><font color='#000088'>+  const rtems_time_of_day *time_buffer
</font> );
 
 /**

<font color='#006600'>diff -u rtems/cpukit/rtems/src/clockset.c:1.9 rtems/cpukit/rtems/src/clockset.c:1.10
--- rtems/cpukit/rtems/src/clockset.c:1.9       Sun Jul 24 18:55:09 2011
+++ rtems/cpukit/rtems/src/clockset.c   Wed Sep 28 10:46:13 2011
</font><font color='#997700'>@@ -38,7 +38,7 @@
</font>  */
 
 rtems_status_code rtems_clock_set(
<font color='#880000'>-  rtems_time_of_day *time_buffer
</font><font color='#000088'>+  const rtems_time_of_day *time_buffer
</font> )
 {
   struct timespec  newtime;
</pre>
<p> </p>
<a name='cs2'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
 <font color='#bb2222'><strong>sh</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2011-09-28 Sebastian Huber <sebastian.huber@embedded-brains.de>

        * sp2038/Makefile.am, sp2038/init.c, sp2038/sp2038.doc,
        sp2038/sp2038.scn: New files.
        * Makefile.am, configure.ac: Reflect changes above.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/ChangeLog.diff?r1=text&tr1=1.489&r2=text&tr2=1.490&diff_format=h">M</a></td><td width='1%'>1.490</td><td width='100%'>testsuites/sptests/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/Makefile.am.diff?r1=text&tr1=1.116&r2=text&tr2=1.117&diff_format=h">M</a></td><td width='1%'>1.117</td><td width='100%'>testsuites/sptests/Makefile.am</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/configure.ac.diff?r1=text&tr1=1.122&r2=text&tr2=1.123&diff_format=h">M</a></td><td width='1%'>1.123</td><td width='100%'>testsuites/sptests/configure.ac</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/sp2038/Makefile.am?rev=1.1&content-type=text/vnd.viewcvs-markup">A</a></td><td width='1%'><font color="#000088">1.1</font></td><td width='100%'><font color="#000088">testsuites/sptests/sp2038/Makefile.am</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/sp2038/init.c?rev=1.1&content-type=text/vnd.viewcvs-markup">A</a></td><td width='1%'><font color="#000088">1.1</font></td><td width='100%'><font color="#000088">testsuites/sptests/sp2038/init.c</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/sp2038/sp2038.doc?rev=1.1&content-type=text/vnd.viewcvs-markup">A</a></td><td width='1%'><font color="#000088">1.1</font></td><td width='100%'><font color="#000088">testsuites/sptests/sp2038/sp2038.doc</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/sp2038/sp2038.scn?rev=1.1&content-type=text/vnd.viewcvs-markup">A</a></td><td width='1%'><font color="#000088">1.1</font></td><td width='100%'><font color="#000088">testsuites/sptests/sp2038/sp2038.scn</font></td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/testsuites/sptests/ChangeLog:1.489 rtems/testsuites/sptests/ChangeLog:1.490
--- rtems/testsuites/sptests/ChangeLog:1.489    Tue Sep 27 08:22:32 2011
+++ rtems/testsuites/sptests/ChangeLog  Wed Sep 28 11:01:53 2011
</font><font color='#997700'>@@ -1,3 +1,9 @@
</font><font color='#000088'>+2011-09-28    Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+       * sp2038/Makefile.am, sp2038/init.c, sp2038/sp2038.doc,
+       sp2038/sp2038.scn: New files.
+       * Makefile.am, configure.ac: Reflect changes above.
+
</font> 2011-09-27        Sebastian Huber <sebastian.huber@embedded-brains.de>
 
        * spfatal07/testcase.h: Print end of test if test is not applicable.

<font color='#006600'>diff -u rtems/testsuites/sptests/Makefile.am:1.116 rtems/testsuites/sptests/Makefile.am:1.117
--- rtems/testsuites/sptests/Makefile.am:1.116  Thu Sep 15 10:56:01 2011
+++ rtems/testsuites/sptests/Makefile.am        Wed Sep 28 11:01:53 2011
</font><font color='#997700'>@@ -14,7 +14,7 @@
</font>     sp40 sp41 sp42 sp43 sp44 sp45 sp46 sp47 sp48 sp49 \
     sp50 sp51 sp52 sp53 sp54 sp55 sp56 sp57 sp58 sp59 \
     sp60      sp62 sp63 sp64 sp65 sp66 sp67 sp68 sp69 \
<font color='#880000'>-    sp70 sp71 sp72 sp73 sp74 sp75 sp76 \
</font><font color='#000088'>+    sp70 sp71 sp72 sp73 sp74 sp75 sp76 sp2038 \
</font>     spassoc01 spchain spclockget spcoverage spobjgetnext \
     spnotepad01 spprintk spprivenv01 sprbtree01 spsize spstkalloc \
                spthreadq01 spwatchdog spwkspace \

<font color='#006600'>diff -u rtems/testsuites/sptests/configure.ac:1.122 rtems/testsuites/sptests/configure.ac:1.123
--- rtems/testsuites/sptests/configure.ac:1.122 Thu Sep 15 10:56:01 2011
+++ rtems/testsuites/sptests/configure.ac       Wed Sep 28 11:01:53 2011
</font><font color='#997700'>@@ -102,6 +102,7 @@
</font> sp74/Makefile
 sp75/Makefile
 sp76/Makefile
<font color='#000088'>+sp2038/Makefile
</font> spassoc01/Makefile
 spcbssched01/Makefile
 spcbssched02/Makefile

<font color='#006600'>diff -u /dev/null rtems/testsuites/sptests/sp2038/Makefile.am:1.1
--- /dev/null   Wed Sep 28 11:10:52 2011
+++ rtems/testsuites/sptests/sp2038/Makefile.am Wed Sep 28 11:01:53 2011
</font><font color='#997700'>@@ -0,0 +1,28 @@
</font><font color='#000088'>+##
+## $Id$
+##
+
+MANAGERS = all
+
+rtems_tests_PROGRAMS = sp2038
+sp2038_SOURCES = init.c
+
+dist_rtems_tests_DATA = sp2038.scn
+dist_rtems_tests_DATA += sp2038.doc
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(top_srcdir)/../automake/compile.am
+include $(top_srcdir)/../automake/leaf.am
+
+sp2038_LDADD = $(MANAGERS_NOT_WANTED:%=$(PROJECT_LIB)/no-%.rel)
+
+AM_CPPFLAGS += -I$(top_srcdir)/../support/include
+
+LINK_OBJS = $(sp2038_OBJECTS) $(sp2038_LDADD)
+LINK_LIBS = $(sp2038_LDLIBS)
+
+sp2038$(EXEEXT): $(sp2038_OBJECTS) $(sp2038_DEPENDENCIES)
+       @rm -f sp2038$(EXEEXT)
+       $(make-exe)
+
+include $(top_srcdir)/../automake/local.am
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/sptests/sp2038/init.c:1.1
--- /dev/null   Wed Sep 28 11:10:52 2011
+++ rtems/testsuites/sptests/sp2038/init.c      Wed Sep 28 11:01:53 2011
</font><font color='#997700'>@@ -0,0 +1,127 @@
</font><font color='#000088'>+/*
+ * Copyright (c) 2011 embedded brains GmbH.  All rights reserved.
+ *
+ *  embedded brains GmbH
+ *  Obere Lagerstr. 30
+ *  82178 Puchheim
+ *  Germany
+ *  <rtems@embedded-brains.de>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ *
+ * $Id$
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <tmacros.h>
+
+#include <time.h>
+#include <string.h>
+
+#include <rtems.h>
+
+#define TEST_APPLICABLE \
+  (CPU_TIMESTAMP_USE_INT64 == TRUE || CPU_TIMESTAMP_USE_INT64_INLINE == TRUE)
+
+#define ASSERT_SC(sc) rtems_test_assert((sc) == RTEMS_SUCCESSFUL)
+
+static const rtems_time_of_day nearly_problem_2038 = {
+  .year = 2038,
+  .month = 1,
+  .day = 19,
+  .hour = 3,
+  .minute = 14,
+  .second = 7
+};
+
+static const rtems_time_of_day problem_2038 = {
+  .year = 2038,
+  .month = 1,
+  .day = 19,
+  .hour = 3,
+  .minute = 14,
+  .second = 8
+};
+
+static const rtems_time_of_day nearly_problem_2106 = {
+  .year = 2106,
+  .month = 2,
+  .day = 7,
+  .hour = 6,
+  .minute = 28,
+  .second = 15
+};
+
+static const rtems_time_of_day problem_2106 = {
+  .year = 2106,
+  .month = 2,
+  .day = 7,
+  .hour = 6,
+  .minute = 28,
+  .second = 16
+};
+
+static void test_case(void)
+{
+#if TEST_APPLICABLE
+  rtems_status_code sc = RTEMS_SUCCESSFUL;
+  int64_t one = 1;
+  int64_t large = one << 32;
+  time_t time_t_large = (time_t) large;
+  bool time_t_is_32_bit = time_t_large != large;
+  bool time_t_is_signed = (((time_t) 0) - ((time_t) 1)) < 0;
+
+  if (time_t_is_32_bit) {
+    const rtems_time_of_day *nearly_problem = NULL;
+    const rtems_time_of_day *problem = NULL;
+    rtems_time_of_day now;
+
+    if (time_t_is_signed) {
+      nearly_problem = &nearly_problem_2038;
+      problem = &problem_2038;
+    } else {
+      nearly_problem = &nearly_problem_2106;
+      problem = &problem_2106;
+    }
+
+    sc = rtems_clock_set(nearly_problem);
+    ASSERT_SC(sc);
+    sc = rtems_clock_get_tod(&now);
+    ASSERT_SC(sc);
+    rtems_test_assert(memcmp(&now, nearly_problem, sizeof(now)) == 0);
+
+    sc = rtems_clock_set(problem);
+    ASSERT_SC(sc);
+    sc = rtems_clock_get_tod(&now);
+    ASSERT_SC(sc);
+    rtems_test_assert(memcmp(&now, problem, sizeof(now)) == 0);
+  }
+#endif /* TEST_APPLICABLE */
+}
+
+rtems_task Init(rtems_task_argument argument)
+{
+  puts("\n\n*** TEST 2038 ***");
+
+  test_case();
+
+  puts("*** END OF TEST 2038 ***");
+
+  rtems_test_exit(0);
+}
+
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
+
+#define CONFIGURE_MAXIMUM_TASKS 1
+
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#define CONFIGURE_INIT
+
+#include <rtems/confdefs.h>
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/sptests/sp2038/sp2038.doc:1.1
--- /dev/null   Wed Sep 28 11:10:52 2011
+++ rtems/testsuites/sptests/sp2038/sp2038.doc  Wed Sep 28 11:01:53 2011
</font><font color='#997700'>@@ -0,0 +1,23 @@
</font><font color='#000088'>+#
+#  $Id$
+#
+#  Copyright (c) 2011 embedded brains GmbH.  All rights reserved.
+#
+#  The license and distribution terms for this file may be
+#  found in the file LICENSE in this distribution or at
+#  http://www.rtems.com/license/LICENSE.
+#
+
+This file describes the directives and concepts tested by this test set.
+
+test set name:  sp2038
+
+directives:
+
+  rtems_clock_set
+  rtems_clock_get
+  time
+
+concepts:
+
++ Ensure that special time values lead to the expected result
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/sptests/sp2038/sp2038.scn:1.1
--- /dev/null   Wed Sep 28 11:10:52 2011
+++ rtems/testsuites/sptests/sp2038/sp2038.scn  Wed Sep 28 11:01:53 2011
</font><font color='#997700'>@@ -0,0 +1,2 @@
</font><font color='#000088'>+*** TEST 2038 ***
+*** END OF TEST 2038 ***
</font></pre>
<p> </p>

<p>--<br />
<small>Generated by <a href="http://www.codewiz.org/projects/index.html#loginfo">Deluxe Loginfo</a> 2.122 by Bernardo Innocenti <bernie@develer.com></small></p>
</body>
</html>