Fix soft-sensor manager build failure.
authorHyunJun Kim <hyunjun2.kim@samsung.com>
Thu, 16 Apr 2015 10:39:53 +0000 (19:39 +0900)
committerUze Choi <uzchoi@samsung.com>
Fri, 17 Apr 2015 00:13:44 +0000 (00:13 +0000)
Update SConscript and android std compile error for android.

Change-Id: I285fdf63c3239f06c49b1acb535c936fe53d55d7
Signed-off-by: HyunJun Kim <hyunjun2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/754
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
SConstruct
service/SConscript
service/soft-sensor-manager/SConscript
service/soft-sensor-manager/SSMCore/src/SSMInterface/SSMResourceServer.cpp

index 939ac6a..2ea9acb 100644 (file)
@@ -51,8 +51,8 @@ if target_os not in ['arduino','darwin','ios', 'android']:
        SConscript(build_dir + 'examples/OICMiddle/SConscript')
 
 # Build 'service' sub-project
-if target_os != 'android':
-       SConscript(build_dir + 'service/SConscript')
+if target_os != 'android':
+SConscript(build_dir + 'service/SConscript')
 
 # Append targets information to the help information, to see help info, execute command line:
 #     $ scon [options] -h
index 183818d..1ada260 100644 (file)
@@ -28,14 +28,15 @@ target_os = env.get('TARGET_OS')
 
 if target_os not in ['arduino','darwin']:
        # Build things manager project
-       SConscript('things-manager/SConscript')
+       if target_os != 'android':      
+               SConscript('things-manager/SConscript')
 
        # Build soft sensor manager project
        SConscript('soft-sensor-manager/SConscript')
 
        # Build protocol plugin project
        # protocol-plugin use 'inotify', this feature isn't support by MAC OSX
-       if target_os not in ['darwin', 'ios']:
+       if target_os not in ['darwin', 'ios', 'android']:
                SConscript('protocol-plugin/SConscript')
 
        # Build notification manager project
index cff3dff..4defac6 100644 (file)
@@ -155,7 +155,8 @@ ssmcore_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
 ssmcore_env.AppendUnique(LIBS = ['oc', 'octbstack', 'oc_logger',
             'connectivity_abstraction', 'coap'])
 
-ssmcore_env.ParseConfig('pkg-config --libs glib-2.0');
+if target_os not in ['android']:
+       ssmcore_env.ParseConfig('pkg-config --libs glib-2.0');
 
 shared_libssmcore = ssmcore_env.SharedLibrary(
                target = 'SSMCore',
index 85b0c30..c35da90 100644 (file)
@@ -272,7 +272,7 @@ OCEntityHandlerResult SSMResourceServer::entityHandler(std::shared_ptr< OCResour
                 }
                 else if (rep.getValue<std::string>("command") == "ReleaseQueryEngine")
                 {
-                    pQueryEngine = (IQueryEngine *) std::stol(
+                    pQueryEngine = (IQueryEngine *) std::stoll(
                                        rep.getValue<std::string>("queryEngineId"));
 
                     ReleaseQueryEngine(pQueryEngine);
@@ -281,7 +281,7 @@ OCEntityHandlerResult SSMResourceServer::entityHandler(std::shared_ptr< OCResour
                 {
                     int CQID = 0;
 
-                    pQueryEngine = (IQueryEngine *)std::stol(
+                    pQueryEngine = (IQueryEngine *)std::stoll(
                                        rep.getValue<std::string>("queryEngineId"));
 
                     res = pQueryEngine->executeContextQuery(
@@ -299,7 +299,7 @@ OCEntityHandlerResult SSMResourceServer::entityHandler(std::shared_ptr< OCResour
                 }
                 else if (rep.getValue<std::string>("command") == "KillContextQuery")
                 {
-                    pQueryEngine = (IQueryEngine *)std::stol(
+                    pQueryEngine = (IQueryEngine *)std::stoll(
                                        rep.getValue<std::string>("queryEngineId"));
 
                     res = pQueryEngine->killContextQuery(std::stoi(rep.getValue<std::string>("CQID")));