<div dir="ltr"><div><div>Hello All,<br><br>I have ported the code of inttypes library and i
 have tested methods related to inttypes.h in hello world test. It is 
working. Then i made a separate test for psxinttypes01 in samples directory and it's also working. I made this test within the psxtests directory then how would i check whether test is working or not ? The location of 
psxinttypes01 is : /development/rtems4.12-1/<wbr>testsuits/psxtests/<wbr>psxinttypes01.<br><br>Just
 for learning purpose, if i put psxtests instead of samples in this 
command : ../rtems4.12-1/configure --target=sparc-rtems4.12 
--enable-rtemsbsp=erc32  --enable-tests=samples --disable-posix <br><br>and after make command, Will it generate .exe files related to psxtests ?<br>do i  have to send the ported code or can i submit the ported code to my github repository.. ? Any suggestion ? <br>Please find the attached patch and review the tested methods.<br><br></div>patch1 is for methods tested within the hello world file.<br>diff --git a/cpukit/Makefile.am b/cpukit/Makefile.am<br>index 1987586..5c4dc15 100644<br>--- a/cpukit/Makefile.am<br>+++ b/cpukit/Makefile.am<br>@@ -7,6 +7,7 @@ include $(top_srcdir)/automake/<a href="http://multilib.am">multilib.am</a><br> SUBDIRS = . score rtems sapi posix<br> SUBDIRS += dev<br> SUBDIRS += dtc/libfdt<br>+SUBDIRS += inttypes<br> SUBDIRS += libcrypt<br> SUBDIRS += libcsupport libblock libfs<br> SUBDIRS += libdrvmgr<br>diff --git a/cpukit/<a href="http://configure.ac">configure.ac</a> b/cpukit/<a href="http://configure.ac">configure.ac</a><br>index 67237e9..5110c07 100644<br>--- a/cpukit/<a href="http://configure.ac">configure.ac</a><br>+++ b/cpukit/<a href="http://configure.ac">configure.ac</a><br>@@ -479,6 +479,7 @@ libstdthreads/Makefile<br> libdebugger/Makefile<br> zlib/Makefile<br> ftpd/Makefile<br>+inttypes/Makefile<br> telnetd/Makefile<br> pppd/Makefile<br> mghttpd/Makefile<br>diff --git a/cpukit/include/rtems/inttypes.h b/cpukit/include/rtems/inttypes.h<br>index 2e23c8c..d2f9f55 100644<br>--- a/cpukit/include/rtems/inttypes.h<br>+++ b/cpukit/include/rtems/inttypes.h<br>@@ -153,3 +153,4 @@ extern "C" {<br> #endif<br> <br> #endif<br><br>diff --git a/testsuites/psxtests/Makefile.am b/testsuites/psxtests/Makefile.am<br>index 7bcea46..65325da 100644<br>--- a/testsuites/psxtests/Makefile.am<br>+++ b/testsuites/psxtests/Makefile.am<br>@@ -58,6 +58,7 @@ _SUBDIRS += psxhdrs<br> _SUBDIRS += psxintrcritical01<br> _SUBDIRS += psxitimer<br> endif<br>+_SUBDIRS += psxinttypes01<br> _SUBDIRS += psxkey01<br> _SUBDIRS += psxkey02<br> _SUBDIRS += psxkey03<br>diff --git a/testsuites/psxtests/<a href="http://configure.ac">configure.ac</a> b/testsuites/psxtests/<a href="http://configure.ac">configure.ac</a><br>index 1de1312..227bda9 100644<br>--- a/testsuites/psxtests/<a href="http://configure.ac">configure.ac</a><br>+++ b/testsuites/psxtests/<a href="http://configure.ac">configure.ac</a><br>@@ -163,6 +163,7 @@ psximfs01/Makefile<br> psximfs02/Makefile<br> psxintrcritical01/Makefile<br> psxitimer/Makefile<br>+psxinttypes01/Makefile<br> psxkey01/Makefile<br> psxkey02/Makefile<br> psxkey03/Makefile<br>diff --git a/testsuites/samples/hello/Makefile.am b/testsuites/samples/hello/Makefile.am<br>index 234a27e..c7f7e2a 100644<br>--- a/testsuites/samples/hello/Makefile.am<br>+++ b/testsuites/samples/hello/Makefile.am<br>@@ -9,9 +9,10 @@ include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg<br> include $(top_srcdir)/../automake/<a href="http://compile.am">compile.am</a><br> include $(top_srcdir)/../automake/<a href="http://leaf.am">leaf.am</a><br> <br>+AM_CPPFLAGS += -I$(top_srcdir)/../support/include<br> <br>-LINK_OBJS = $(hello_OBJECTS)<br>-LINK_LIBS = $(hello_LDLIBS)<br>+LINK_OBJS = $(hello_OBJECTS) $(hello_LDADD) <br>+LINK_LIBS = $(hello_LDLIBS)  /home/aditya/development/b-sparc/sparc-rtems4.12/c/erc32/cpukit/inttypes/libinttypes.a<br> <br> hello$(EXEEXT): $(hello_OBJECTS) $(hello_DEPENDENCIES)<br>     @rm -f hello$(EXEEXT)<br>diff --git a/testsuites/samples/hello/init.c b/testsuites/samples/hello/init.c<br>index a2d6c30..51f4451 100644<br>--- a/testsuites/samples/hello/init.c<br>+++ b/testsuites/samples/hello/init.c<br>@@ -18,6 +18,7 @@<br> <br> #include <stdio.h><br> #include <stdlib.h><br>+#include <rtems/inttypes.h><br> <br> /* forward declarations to avoid warnings */<br> rtems_task Init(rtems_task_argument argument);<br>@@ -31,7 +32,34 @@ rtems_task Init(<br> {<br>   rtems_print_printer_printf(&rtems_test_printer);<br>   rtems_test_begin();<br>+  char* endptr;<br>+  uintmax_t j,k;                                       <br>+  int base = 10;                                     <br>+  char *nptr;<br>+  wchar_t *nptr1, *endptr1;<br>+  intmax_t m;<br>+  nptr1 = L"10110134932";                               <br>+  nptr = "20690239864abc";<br>+  m = wcstoimax(nptr1, &endptr1, base);                                     <br>+  printf("string = %s\n", nptr);                     <br>+  j = strtoumax(nptr, &endptr, base); <br>+  printf("wcstoimax = %jd\n", m);<br>+  k = wcstoumax(nptr1, &endptr1, base);<br>+  printf("wcstoumax = %ju\n", k);                       <br>+  printf("strtoumax = %ju (base %d)\n", j, base);<br>+  printf("Stopped scan at %s\n\n", endptr);     <br>+  imaxdiv_t retrival = imaxdiv(27, 4);<br>   printf( "Hello World\n" );<br>+  printf(" Strtoimax values \n");<br>+  printf("%jd\n", strtoimax(" -123junk",&endptr,10)); /* base 10                    */<br>+  printf("%jd\n", strtoimax("11111111",&endptr,2));   /* base 2                     */<br>+  printf("%jd\n", strtoimax("XyZ",&endptr,36));       /* base 36                    */<br>+  printf("%jd\n", strtoimax("010",&endptr,0));        /* octal auto-detection       */<br>+  printf("%jd\n", strtoimax("10",&endptr,0));         /* decimal auto-detection     */<br>+  printf("%jd\n", strtoimax("0x10",&endptr,0));       /* hexadecimal auto-detection */<br>+  printf( "imaxabs_value = %jd\n", imaxabs(-1234));<br>+  printf("strtoimax value = %jd\n", strtoimax("11111111",&endptr,2));<br>+  printf( "imax div value = %jd\n", retrival.rem); <br>   rtems_test_end();<br>   exit( 0 );<br> }<br><br></div>patch2 is for separate test psxinttypes01 within the samples directory. <br><div><div><br>diff --git a/cpukit/Makefile.am b/cpukit/Makefile.am<br>index 1987586..5c4dc15 100644<br>--- a/cpukit/Makefile.am<br>+++ b/cpukit/Makefile.am<br>@@ -7,6 +7,7 @@ include $(top_srcdir)/automake/<a href="http://multilib.am">multilib.am</a><br> SUBDIRS = . score rtems sapi posix<br> SUBDIRS += dev<br> SUBDIRS += dtc/libfdt<br>+SUBDIRS += inttypes<br> SUBDIRS += libcrypt<br> SUBDIRS += libcsupport libblock libfs<br> SUBDIRS += libdrvmgr<br>diff --git a/cpukit/<a href="http://configure.ac">configure.ac</a> b/cpukit/<a href="http://configure.ac">configure.ac</a><br>index 67237e9..5110c07 100644<br>--- a/cpukit/<a href="http://configure.ac">configure.ac</a><br>+++ b/cpukit/<a href="http://configure.ac">configure.ac</a><br>@@ -479,6 +479,7 @@ libstdthreads/Makefile<br> libdebugger/Makefile<br> zlib/Makefile<br> ftpd/Makefile<br>+inttypes/Makefile<br> telnetd/Makefile<br> pppd/Makefile<br> mghttpd/Makefile<br>diff --git a/cpukit/include/rtems/inttypes.h b/cpukit/include/rtems/inttypes.h<br>index 2e23c8c..d2f9f55 100644<br>--- a/cpukit/include/rtems/inttypes.h<br>+++ b/cpukit/include/rtems/inttypes.h<br>@@ -153,3 +153,4 @@ extern "C" {<br> #endif<br> <br> #endif<br>+<br>diff --git a/cpukit/rtems/src/ratemonreportstatistics.c b/cpukit/rtems/src/ratemonreportstatistics.c<br>index 0ea7790..76f032e 100644<br>--- a/cpukit/rtems/src/ratemonreportstatistics.c<br>+++ b/cpukit/rtems/src/ratemonreportstatistics.c<br>@@ -156,3 +156,4 @@ void rtems_rate_monotonic_report_statistics( void )<br>   rtems_print_printer_printk( &printer );<br>   rtems_rate_monotonic_report_statistics_with_plugin( &printer );<br> }<br>+<br>diff --git a/testsuites/samples/Makefile.am b/testsuites/samples/Makefile.am<br>index 85e89a5..f710aab 100644<br>--- a/testsuites/samples/Makefile.am<br>+++ b/testsuites/samples/Makefile.am<br>@@ -9,6 +9,7 @@ _SUBDIRS += minimum<br> _SUBDIRS += nsecs<br> _SUBDIRS += paranoia<br> _SUBDIRS += ticker<br>+_SUBDIRS += psxinttypes01<br> _SUBDIRS += unlimited<br> <br> if MPTESTS<br>diff --git a/testsuites/samples/<a href="http://configure.ac">configure.ac</a> b/testsuites/samples/<a href="http://configure.ac">configure.ac</a><br>index ffe1bad..95ff87a 100644<br>--- a/testsuites/samples/<a href="http://configure.ac">configure.ac</a><br>+++ b/testsuites/samples/<a href="http://configure.ac">configure.ac</a><br>@@ -75,6 +75,7 @@ nsecs/Makefile<br> paranoia/Makefile<br> pppd/Makefile<br> ticker/Makefile<br>+psxinttypes01/Makefile<br> unlimited/Makefile<br> ])<br> AC_OUTPUT<br>diff --git a/testsuites/samples/hello/Makefile.am b/testsuites/samples/hello/Makefile.am<br>index 234a27e..3a05a39 100644<br>--- a/testsuites/samples/hello/Makefile.am<br>+++ b/testsuites/samples/hello/Makefile.am<br>@@ -1,6 +1,6 @@<br> <br> rtems_tests_PROGRAMS = hello<br>-hello_SOURCES = init.c<br>+hello_SOURCES = init.c libinttypes.a<br> <br> dist_rtems_tests_DATA = hello.scn<br> dist_rtems_tests_DATA += hello.doc<br>@@ -9,9 +9,10 @@ include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg<br> include $(top_srcdir)/../automake/<a href="http://compile.am">compile.am</a><br> include $(top_srcdir)/../automake/<a href="http://leaf.am">leaf.am</a><br> <br>+AM_CPPFLAGS += -I$(top_srcdir)/../support/include<br> <br>-LINK_OBJS = $(hello_OBJECTS)<br>-LINK_LIBS = $(hello_LDLIBS)<br>+LINK_OBJS = $(hello_OBJECTS) $(hello_LDADD) <br>+LINK_LIBS = $(hello_LDLIBS)  /home/aditya/development/b-sparc/sparc-rtems4.12/c/erc32/cpukit/inttypes/libinttypes.a<br> <br> hello$(EXEEXT): $(hello_OBJECTS) $(hello_DEPENDENCIES)<br>        @rm -f hello$(EXEEXT)<br>diff --git a/testsuites/samples/hello/init.c b/testsuites/samples/hello/init.c<br>index a2d6c30..d1fd577 100644<br>--- a/testsuites/samples/hello/init.c<br>+++ b/testsuites/samples/hello/init.c<br>@@ -18,6 +18,7 @@<br> <br> #include <stdio.h><br> #include <stdlib.h><br>+#include <rtems/inttypes.h><br> <br> /* forward declarations to avoid warnings */<br> rtems_task Init(rtems_task_argument argument);<br><br><div>Thanks & Regards,<br></div>Aditya</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 15, 2017 at 9:55 PM, Joel Sherrill <span dir="ltr"><<a href="mailto:joel@rtems.org" target="_blank">joel@rtems.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">I am not in a good position to review this today but patches should go to the community for review. Also this one has a ticket.<span class="HOEnZb"><font color="#888888"><div dir="auto"><br></div><div dir="auto">--joel</div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On May 14, 2017 11:33 PM, "aditya upadhyay" <<a href="mailto:aadit0402@gmail.com" target="_blank">aadit0402@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div>Hello Joel, Gedare,<br><br></div>I have ported the code of inttypes library and i have tested methods related to inttypes.h in hello world test. It is working. I have made a test related to inttypes methods named as psxinttype01. where i have tested these method. The location of psxinttypes01 is : /development/rtems4.12-1/tests<wbr>uits/psxtests/psxinttypes01.<br></div></div><br></div>Just for learning purpose, if i put psxtests instead of samples in this command : ../rtems4.12-1/configure --target=sparc-rtems4.12 --enable-rtemsbsp=erc32  --enable-tests=samples --disable-posix <br><br></div>and after make command, Will it generate .exe files related to psxtests ?<br>do i  have to send the ported code or can i submit the ported code to my github repository.. ? Any suggestion ? <br>I am sending you the patch of tested code. please review the tested methods. <br><br></div><div>Thanks & Regards,<br></div><div>Aditya<br></div><div><br></div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 12, 2017 at 9:41 PM, aditya upadhyay <span dir="ltr"><<a href="mailto:aadit0402@gmail.com" target="_blank">aadit0402@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hello Joe, Gedare,<br><br></div><div> I was busy with my end semester project. I will introduce myself there. Apart from that now i am trying to make a test for inttypes library as You have told me in previous mail. I will do it by tonight.<br><br></div><div>Thanks & Regards,<br></div><div>Aditya<br></div></div><div class="m_-8710624350693882077m_-8885408612139765500HOEnZb"><div class="m_-8710624350693882077m_-8885408612139765500h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 12, 2017 at 9:33 PM, Joel Sherrill <span dir="ltr"><<a href="mailto:joel@rtems.org" target="_blank">joel@rtems.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">Hi<div dir="auto"><br></div><div dir="auto">Gedare sent an email asking all students to introduce themselves and their project to the community. You haven't done it yet.</div><div dir="auto"><br></div><div dir="auto">Thanks</div><span class="m_-8710624350693882077m_-8885408612139765500m_-5523069056251077630HOEnZb"><font color="#888888"><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto">--joel</div></font></span></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</blockquote></div></div>
</div></div></blockquote></div><br></div>