[openrtm-commit:01341] r2523 - in trunk/OpenRTM-aist: examples/ExtTrigger examples/SimpleIO packages/pkgsrc/OpenRTM-aist110 packages/pkgsrc/OpenRTM-aist110/patches src/lib/coil/common src/lib/coil/posix/coil src/lib/coil/tests src/lib/coil/tests/Logger src/lib/coil/tests/OS src/lib/coil/tests/UUID src/lib/rtm src/lib/rtm/tests src/lib/rtm/tests/RingBuffer

openrtm @ openrtm.org openrtm @ openrtm.org
2014年 3月 14日 (金) 10:48:15 JST


Author: n-ando
Date: 2014-03-14 10:48:15 +0900 (Fri, 14 Mar 2014)
New Revision: 2523

Removed:
   trunk/OpenRTM-aist/packages/pkgsrc/OpenRTM-aist110/patches/patch-ac
Modified:
   trunk/OpenRTM-aist/examples/ExtTrigger/ConnectorComp.cpp
   trunk/OpenRTM-aist/examples/SimpleIO/ConnectorComp.cpp
   trunk/OpenRTM-aist/packages/pkgsrc/OpenRTM-aist110/distinfo
   trunk/OpenRTM-aist/src/lib/coil/common/Properties.cpp
   trunk/OpenRTM-aist/src/lib/coil/common/stringutil.cpp
   trunk/OpenRTM-aist/src/lib/coil/posix/coil/File.h
   trunk/OpenRTM-aist/src/lib/coil/posix/coil/OS.h
   trunk/OpenRTM-aist/src/lib/coil/posix/coil/Routing.cpp
   trunk/OpenRTM-aist/src/lib/coil/tests/Logger/LoggerTests.cpp
   trunk/OpenRTM-aist/src/lib/coil/tests/OS/OSTests.cpp
   trunk/OpenRTM-aist/src/lib/coil/tests/TestRunner.cpp
   trunk/OpenRTM-aist/src/lib/coil/tests/UUID/UUIDTests.cpp
   trunk/OpenRTM-aist/src/lib/rtm/CORBA_IORUtil.cpp
   trunk/OpenRTM-aist/src/lib/rtm/ManagerConfig.cpp
   trunk/OpenRTM-aist/src/lib/rtm/ModuleManager.cpp
   trunk/OpenRTM-aist/src/lib/rtm/RTObject.cpp
   trunk/OpenRTM-aist/src/lib/rtm/tests/RingBuffer/RingBufferTests.cpp
   trunk/OpenRTM-aist/src/lib/rtm/tests/TestRunner.cpp
Log:
[compat,->RELENG_1_1] QNX patch from Saito-san have been applied. refs #2672

Modified: trunk/OpenRTM-aist/examples/ExtTrigger/ConnectorComp.cpp
===================================================================
--- trunk/OpenRTM-aist/examples/ExtTrigger/ConnectorComp.cpp	2014-03-14 01:15:22 UTC (rev 2522)
+++ trunk/OpenRTM-aist/examples/ExtTrigger/ConnectorComp.cpp	2014-03-14 01:48:15 UTC (rev 2523)
@@ -28,6 +28,10 @@
 
 using namespace RTC;
 
+#ifdef __QNX__
+using std::exit;
+#endif
+
 void usage()
 {
   std::cout << std::endl;

Modified: trunk/OpenRTM-aist/examples/SimpleIO/ConnectorComp.cpp
===================================================================
--- trunk/OpenRTM-aist/examples/SimpleIO/ConnectorComp.cpp	2014-03-14 01:15:22 UTC (rev 2522)
+++ trunk/OpenRTM-aist/examples/SimpleIO/ConnectorComp.cpp	2014-03-14 01:48:15 UTC (rev 2523)
@@ -27,6 +27,10 @@
 
 using namespace RTC;
 
+#ifdef __QNX__
+using std::exit;
+#endif
+
 void usage()
 {
   std::cout << std::endl;

Modified: trunk/OpenRTM-aist/packages/pkgsrc/OpenRTM-aist110/distinfo
===================================================================
--- trunk/OpenRTM-aist/packages/pkgsrc/OpenRTM-aist110/distinfo	2014-03-14 01:15:22 UTC (rev 2522)
+++ trunk/OpenRTM-aist/packages/pkgsrc/OpenRTM-aist110/distinfo	2014-03-14 01:48:15 UTC (rev 2523)
@@ -5,4 +5,3 @@
 Size (OpenRTM-aist-1.1.0-RELEASE.tar.bz2) = 4391286 bytes
 SHA1 (patch-aa) = d414c6b5ae06dac7ac5ebf17b53da8cf6b217971
 SHA1 (patch-ab) = f1f882fc7bc3dcc00613126947a0535815e0cdad
-SHA1 (patch-ac) = e1cdce087b621aa3911be82c2b0bf0a4d75266cf

Deleted: trunk/OpenRTM-aist/packages/pkgsrc/OpenRTM-aist110/patches/patch-ac
===================================================================
--- trunk/OpenRTM-aist/packages/pkgsrc/OpenRTM-aist110/patches/patch-ac	2014-03-14 01:15:22 UTC (rev 2522)
+++ trunk/OpenRTM-aist/packages/pkgsrc/OpenRTM-aist110/patches/patch-ac	2014-03-14 01:48:15 UTC (rev 2523)
@@ -1,38 +0,0 @@
---- src/lib/coil/posix/coil/Routing.cpp.orig	2012-05-24 23:18:14.000000000 +0900
-+++ src/lib/coil/posix/coil/Routing.cpp	2012-07-16 18:50:00.000000000 +0900
-@@ -64,7 +64,7 @@
-     addr.sin_addr.s_addr = **(unsigned int **)(hostent->h_addr_list);
-     dest_addr = inet_ntoa(addr.sin_addr);
-     
--#if defined(COIL_OS_FREEBSD) || defined(COIL_OS_DARWIN) || defined(COIL_OS_CYGWIN)
-+#if defined(COIL_OS_FREEBSD) || defined(COIL_OS_DARWIN) || defined(COIL_OS_CYGWIN) || defined(COIL_OS_QNX)
-     std::string cmd("PATH=/bin:/sbin:/usr/bin:/usr/sbin "
-                     "route get ");
-     const char* match_str = "interface";
-@@ -72,7 +72,7 @@
-     size_t ifname_pos(1);
-     cmd += dest_addr;
-     cmd += " 2> /dev/null";
--#endif // COIL_OS_IS_FREEBSD || COIL_OS_DARWIN || COIL_OS_CYGWIN
-+#endif // COIL_OS_IS_FREEBSD || COIL_OS_DARWIN || COIL_OS_CYGWIN || COIL_OS_QNX
- #if defined(COIL_OS_LINUX)
-     std::string cmd("PATH=/bin:/sbin:/usr/bin:/usr/sbin "
-                     "ip route get ");
-@@ -100,7 +100,7 @@
-         line.erase(line.end() - 1);
-         coil::vstring vs(coil::split(line, delimiter));
- 
--#if defined(COIL_OS_FREEBSD) || defined(COIL_OS_DARWIN) || defined(COIL_OS_CYGWIN)
-+#if defined(COIL_OS_FREEBSD) || defined(COIL_OS_DARWIN) || defined(COIL_OS_CYGWIN) || defined(COIL_OS_QNX)
-         if (vs.size() > ifname_pos)
-           {
-             dest_if = vs[ifname_pos];
-@@ -108,7 +108,7 @@
- 	    wait(NULL);
-             return true;
-           }
--#endif // COIL_OS_FREEBSD || COIL_OS_DARWIN || COIL_OS_CYGWIN
-+#endif // COIL_OS_FREEBSD || COIL_OS_DARWIN || COIL_OS_CYGWIN || COIL_OS_QNX
- #if defined(COIL_OS_LINUX)
-         for (int i(0); i < vs.size(); ++i)
-           {

Modified: trunk/OpenRTM-aist/src/lib/coil/common/Properties.cpp
===================================================================
--- trunk/OpenRTM-aist/src/lib/coil/common/Properties.cpp	2014-03-14 01:15:22 UTC (rev 2522)
+++ trunk/OpenRTM-aist/src/lib/coil/common/Properties.cpp	2014-03-14 01:48:15 UTC (rev 2523)
@@ -21,6 +21,10 @@
 #include <coil/stringutil.h>
 #include <iostream>
 
+#ifdef __QNX__
+using std::size_t;
+#endif
+
 namespace coil
 {
   /*!

Modified: trunk/OpenRTM-aist/src/lib/coil/common/stringutil.cpp
===================================================================
--- trunk/OpenRTM-aist/src/lib/coil/common/stringutil.cpp	2014-03-14 01:15:22 UTC (rev 2522)
+++ trunk/OpenRTM-aist/src/lib/coil/common/stringutil.cpp	2014-03-14 01:48:15 UTC (rev 2523)
@@ -28,6 +28,11 @@
 #include <cctype>
 #include <cstdio>
 
+#ifdef __QNX__
+using std::toupper;
+using std::isalpha;
+#endif
+
 namespace coil
 {
   /*!

Modified: trunk/OpenRTM-aist/src/lib/coil/posix/coil/File.h
===================================================================
--- trunk/OpenRTM-aist/src/lib/coil/posix/coil/File.h	2014-03-14 01:15:22 UTC (rev 2522)
+++ trunk/OpenRTM-aist/src/lib/coil/posix/coil/File.h	2014-03-14 01:48:15 UTC (rev 2523)
@@ -27,6 +27,11 @@
 #include <coil/config_coil.h>
 #include <coil/stringutil.h>
 
+#ifdef __QNX__
+using std::strlen;
+using std::strcpy;
+#endif
+
 namespace coil
 {
 

Modified: trunk/OpenRTM-aist/src/lib/coil/posix/coil/OS.h
===================================================================
--- trunk/OpenRTM-aist/src/lib/coil/posix/coil/OS.h	2014-03-14 01:15:22 UTC (rev 2522)
+++ trunk/OpenRTM-aist/src/lib/coil/posix/coil/OS.h	2014-03-14 01:48:15 UTC (rev 2523)
@@ -180,6 +180,9 @@
       : optarg(::optarg), optind(1), opterr(1), optopt(0), m_argc(argc), m_argv(argv), m_opt(opt), m_flag(flag)
     {
       ::optind = 1;
+#ifdef __QNX___
+      optind_last = 1;
+#endif
     }
 
     /*!
@@ -200,6 +203,9 @@
     ~GetOpt()
     {
       ::optind = 1;
+#ifdef __QNX__
+      optind_last = 1;
+#endif
     }
 
     /*!
@@ -224,14 +230,27 @@
     int operator()()
     {
       ::opterr = opterr;
+#ifndef __QNX__
       ::optind = optind;
-
+#else
+      ::optind = optind_last;
+      ::optarg = 0;
+#endif
       int result = getopt(m_argc, m_argv, m_opt);
-
+#ifdef __QNX__
+        if(::optind == optind_last)
+	  {
+            ::optind++;
+            result = getopt(m_argc, m_argv, m_opt);
+            optind_last = ::optind;
+	  }
+#endif
       optarg = ::optarg;
       optind = ::optind;
       optopt = ::optopt;
-
+#if __QNX__
+      if(optind_last < m_argc) { ++optind_last; }
+#endif
       return result;
     }
 
@@ -239,6 +258,9 @@
     int optind;       //! 処理対象引数
     int opterr;       //! エラー表示 0:抑止、1:表示
     int optopt;       //! オプション文字が足りない時、多い時にセットされる
+#ifdef __QNX__
+    int optind_last;
+#endif
 
   private:
     int m_argc;

Modified: trunk/OpenRTM-aist/src/lib/coil/posix/coil/Routing.cpp
===================================================================
--- trunk/OpenRTM-aist/src/lib/coil/posix/coil/Routing.cpp	2014-03-14 01:15:22 UTC (rev 2522)
+++ trunk/OpenRTM-aist/src/lib/coil/posix/coil/Routing.cpp	2014-03-14 01:48:15 UTC (rev 2523)
@@ -64,7 +64,7 @@
     addr.sin_addr.s_addr = **(unsigned int **)(hostent->h_addr_list);
     dest_addr = inet_ntoa(addr.sin_addr);
     
-#if defined(COIL_OS_FREEBSD) || defined(COIL_OS_DARWIN) || defined(COIL_OS_CYGWIN)
+#if defined(COIL_OS_FREEBSD) || defined(COIL_OS_DARWIN) || defined(COIL_OS_CYGWIN) || defined(COIL_OS_QNX)
     std::string cmd("PATH=/bin:/sbin:/usr/bin:/usr/sbin "
                     "route get ");
     const char* match_str = "interface";
@@ -72,7 +72,7 @@
     size_t ifname_pos(1);
     cmd += dest_addr;
     cmd += " 2> /dev/null";
-#endif // COIL_OS_IS_FREEBSD || COIL_OS_DARWIN || COIL_OS_CYGWIN
+#endif // COIL_OS_IS_FREEBSD || COIL_OS_DARWIN || COIL_OS_CYGWIN || COIL_OS_QNX
 #if defined(COIL_OS_LINUX)
     std::string cmd("PATH=/bin:/sbin:/usr/bin:/usr/sbin "
                     "ip route get ");
@@ -100,7 +100,7 @@
         line.erase(line.end() - 1);
         coil::vstring vs(coil::split(line, delimiter));
 
-#if defined(COIL_OS_FREEBSD) || defined(COIL_OS_DARWIN) || defined(COIL_OS_CYGWIN)
+#if defined(COIL_OS_FREEBSD) || defined(COIL_OS_DARWIN) || defined(COIL_OS_CYGWIN) || defined(COIL_OS_QNX)
         if (vs.size() > ifname_pos)
           {
             dest_if = vs[ifname_pos];
@@ -108,7 +108,7 @@
 	    wait(NULL);
             return true;
           }
-#endif // COIL_OS_FREEBSD || COIL_OS_DARWIN || COIL_OS_CYGWIN
+#endif // COIL_OS_FREEBSD || COIL_OS_DARWIN || COIL_OS_CYGWIN || COIL_OS_QNX
 #if defined(COIL_OS_LINUX)
         for (int i(0); i < vs.size(); ++i)
           {

Modified: trunk/OpenRTM-aist/src/lib/coil/tests/Logger/LoggerTests.cpp
===================================================================
--- trunk/OpenRTM-aist/src/lib/coil/tests/Logger/LoggerTests.cpp	2014-03-14 01:15:22 UTC (rev 2522)
+++ trunk/OpenRTM-aist/src/lib/coil/tests/Logger/LoggerTests.cpp	2014-03-14 01:48:15 UTC (rev 2523)
@@ -38,6 +38,10 @@
 #include <coil/Mutex.h>
 #include <coil/Guard.h>
 
+#ifdef __QNX__
+using std::rand;
+#endif
+
 namespace coil 
 {
 };

Modified: trunk/OpenRTM-aist/src/lib/coil/tests/OS/OSTests.cpp
===================================================================
--- trunk/OpenRTM-aist/src/lib/coil/tests/OS/OSTests.cpp	2014-03-14 01:15:22 UTC (rev 2522)
+++ trunk/OpenRTM-aist/src/lib/coil/tests/OS/OSTests.cpp	2014-03-14 01:48:15 UTC (rev 2523)
@@ -32,6 +32,10 @@
 
 /* Global Valiables */
 
+#ifdef __QNX__
+using std::fprintf;
+using std::sprintf;
+#endif
 
 namespace OS
 {

Modified: trunk/OpenRTM-aist/src/lib/coil/tests/TestRunner.cpp
===================================================================
--- trunk/OpenRTM-aist/src/lib/coil/tests/TestRunner.cpp	2014-03-14 01:15:22 UTC (rev 2522)
+++ trunk/OpenRTM-aist/src/lib/coil/tests/TestRunner.cpp	2014-03-14 01:48:15 UTC (rev 2523)
@@ -36,6 +36,10 @@
 #include <cppunit/CompilerOutputter.h>
 #include <cppunit/extensions/TestFactoryRegistry.h>
 
+#ifdef __QNX__
+using std::exit;
+#endif
+
 enum FORMAT
   {
     TEXT_OUT,

Modified: trunk/OpenRTM-aist/src/lib/coil/tests/UUID/UUIDTests.cpp
===================================================================
--- trunk/OpenRTM-aist/src/lib/coil/tests/UUID/UUIDTests.cpp	2014-03-14 01:15:22 UTC (rev 2522)
+++ trunk/OpenRTM-aist/src/lib/coil/tests/UUID/UUIDTests.cpp	2014-03-14 01:48:15 UTC (rev 2523)
@@ -30,6 +30,10 @@
  * @brief UUID test
  */
 
+#ifdef __QNX__
+using std::isxdigit;
+#endif
+
 namespace coilUUID
 {
   class UUIDTests

Modified: trunk/OpenRTM-aist/src/lib/rtm/CORBA_IORUtil.cpp
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/CORBA_IORUtil.cpp	2014-03-14 01:15:22 UTC (rev 2522)
+++ trunk/OpenRTM-aist/src/lib/rtm/CORBA_IORUtil.cpp	2014-03-14 01:48:15 UTC (rev 2523)
@@ -233,7 +233,7 @@
     if (ior.profiles.length() == 0 && strlen(ior.type_id) == 0)
       {
         retstr << "IOR is a nil object reference." << std::endl;
-        retstr << iorstr << std::endl;
+        if (iorstr) { retstr << iorstr << std::endl; }
         return retstr.str();
       }
 

Modified: trunk/OpenRTM-aist/src/lib/rtm/ManagerConfig.cpp
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/ManagerConfig.cpp	2014-03-14 01:15:22 UTC (rev 2522)
+++ trunk/OpenRTM-aist/src/lib/rtm/ManagerConfig.cpp	2014-03-14 01:48:15 UTC (rev 2523)
@@ -25,6 +25,10 @@
 #include <coil/stringutil.h>
 #include <rtm/DefaultConfiguration.h>
 
+#ifdef __QNX__
+using std::sprintf;
+#endif
+
 namespace RTC
 {
   

Modified: trunk/OpenRTM-aist/src/lib/rtm/ModuleManager.cpp
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/ModuleManager.cpp	2014-03-14 01:15:22 UTC (rev 2522)
+++ trunk/OpenRTM-aist/src/lib/rtm/ModuleManager.cpp	2014-03-14 01:48:15 UTC (rev 2523)
@@ -27,6 +27,12 @@
 #include <rtm/ModuleManager.h>
 #include <coil/stringutil.h>
 
+#ifdef __QNX__
+using std::FILE;
+using std::fgets;
+using std::feof;
+#endif
+
 namespace RTC
 {
   

Modified: trunk/OpenRTM-aist/src/lib/rtm/RTObject.cpp
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/RTObject.cpp	2014-03-14 01:15:22 UTC (rev 2522)
+++ trunk/OpenRTM-aist/src/lib/rtm/RTObject.cpp	2014-03-14 01:48:15 UTC (rev 2523)
@@ -25,6 +25,10 @@
 #include <iostream>
 #include <typeinfo>
 
+#ifdef __QNX__
+using std::atof;
+#endif
+
 namespace RTC
 {
   /*!

Modified: trunk/OpenRTM-aist/src/lib/rtm/tests/RingBuffer/RingBufferTests.cpp
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/tests/RingBuffer/RingBufferTests.cpp	2014-03-14 01:15:22 UTC (rev 2522)
+++ trunk/OpenRTM-aist/src/lib/rtm/tests/RingBuffer/RingBufferTests.cpp	2014-03-14 01:48:15 UTC (rev 2523)
@@ -49,10 +49,16 @@
 
 #include <string>
 #include <sstream>
+#include <unistd.h>
 #include <rtm/RingBuffer.h>
 
 //#define DEBUG
 
+#ifdef __QNX__
+using std::abort;
+using std::perror;
+#endif
+
 static const int NLOOP = 0x00000fff;	// 読み書きのループ回数
 typedef ::RTC::BufferStatus::Enum ReturnCode;
 int isBlockTest = false;

Modified: trunk/OpenRTM-aist/src/lib/rtm/tests/TestRunner.cpp
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/tests/TestRunner.cpp	2014-03-14 01:15:22 UTC (rev 2522)
+++ trunk/OpenRTM-aist/src/lib/rtm/tests/TestRunner.cpp	2014-03-14 01:48:15 UTC (rev 2523)
@@ -36,6 +36,10 @@
 #include <cppunit/CompilerOutputter.h>
 #include <cppunit/extensions/TestFactoryRegistry.h>
 
+#ifdef __QNX__
+using std::exit;
+#endif
+
 enum FORMAT
   {
     TEXT_OUT,



More information about the openrtm-commit mailing list