Explorar el Código

Merge branch 'candidate-5.2.0' of https://github.com/hpcc-systems/HPCC-Platform into H13018-DaTut0

G Panagiotatos hace 10 años
padre
commit
9f27d6aa69
Se han modificado 100 ficheros con 693 adiciones y 417 borrados
  1. 9 3
      cmake_modules/commonSetup.cmake
  2. 3 2
      cmake_modules/optionDefaults.cmake
  3. 41 1
      common/dllserver/thorplugin.cpp
  4. 6 6
      common/fileview2/fvdsremote.cpp
  5. 5 5
      common/remote/sockfile.cpp
  6. 1 1
      common/thorhelper/roxiehelper.cpp
  7. 7 1
      common/thorhelper/thorsoapcall.cpp
  8. 60 5
      common/thorhelper/thorxmlread.cpp
  9. 1 1
      common/thorhelper/thorxmlwrite.cpp
  10. 2 2
      common/workunit/workunit.cpp
  11. 2 2
      common/workunit/wujobq.cpp
  12. 5 5
      dali/base/dacsds.cpp
  13. 1 1
      dali/base/dacsds.ipp
  14. 1 1
      dali/base/dadiags.cpp
  15. 3 3
      dali/base/danqs.cpp
  16. 26 26
      dali/base/dasds.cpp
  17. 13 13
      dali/base/dasess.cpp
  18. 1 1
      dali/base/dasubs.cpp
  19. 1 1
      dali/base/dautils.cpp
  20. 1 1
      dali/dafilesrv/dafilesrv.cpp
  21. 8 8
      dali/daliadmin/daliadmin.cpp
  22. 1 1
      dali/dalidiag/dalidiag.cpp
  23. 13 13
      dali/datest/datest.cpp
  24. 2 2
      dali/datest/floodtest.cpp
  25. 1 1
      dali/dfu/dfuerror.hpp
  26. 2 2
      dali/dfu/dfuwu.cpp
  27. 22 22
      dali/dfuXRefLib/dfuxreflib.cpp
  28. 2 2
      dali/ft/daft.cpp
  29. 50 4
      dali/ft/daftformat.cpp
  30. 4 8
      dali/ft/daftformat.ipp
  31. 1 1
      dali/ft/daftprogress.cpp
  32. 2 2
      dali/ft/filecopy.cpp
  33. 13 0
      dali/ft/filecopy.hpp
  34. 2 2
      dali/ft/ftbase.cpp
  35. 4 4
      dali/ft/fterror.hpp
  36. 4 4
      dali/ft/fttransform.cpp
  37. 3 3
      dali/fuse/dafuse.cpp
  38. 4 4
      dali/sasha/sacoalescer.cpp
  39. 6 6
      deployment/configgen/main.cpp
  40. 2 2
      deployment/configutils/confighelper.cpp
  41. 2 2
      deployment/deploy/configgenengine.cpp
  42. 1 1
      deployment/deployutils/computerpicker.cpp
  43. 11 11
      deployment/deployutils/configenvhelper.cpp
  44. 9 9
      deployment/deployutils/deployutils.cpp
  45. 11 11
      deployment/deployutils/wizardInputs.cpp
  46. 3 3
      deployment/envgen/main.cpp
  47. 2 2
      docs/ECLPluginForEclipse/ECL_Plugin_for_Eclipse.xml
  48. 9 9
      docs/HPCCClientTools/CT_Mods/CT_ECL_IDE.xml
  49. 4 4
      docs/HPCCDataTutorial/DataTutorial.xml
  50. 2 2
      docs/RunningHPCCinaVirtualMachine/RunningHPCCinaVirtualMachine.xml
  51. 2 2
      docs/UsingConfigManager/UsingConfigManager.xml
  52. 1 1
      ecl/agentexec/agentexec.cpp
  53. 7 7
      ecl/eclagent/eclagent.cpp
  54. 7 3
      ecl/eclcc/eclcc.cpp
  55. 3 3
      ecl/hql/hqlexpr.cpp
  56. 4 1
      ecl/hql/hqlgram2.cpp
  57. 31 10
      ecl/hqlcpp/hqlcpp.cpp
  58. 2 0
      ecl/hqlcpp/hqlcpp.hpp
  59. 6 0
      ecl/hqlcpp/hqlcpp.ipp
  60. 26 11
      ecl/hqlcpp/hqlecl.cpp
  61. 33 4
      ecl/hqlcpp/hqlres.cpp
  62. 1 1
      ecl/hqlcpp/hqlres.hpp
  63. 3 3
      ecl/hthor/hthor.cpp
  64. 2 2
      ecl/hthor/hthorkey.cpp
  65. 2 2
      ecl/wutest/wujobqtest.cpp
  66. 1 1
      ecl/wutest/wutest.cpp
  67. 10 0
      ecllibrary/teststd/uni/TestEditDistanceWithinRadius.ecl
  68. 2 2
      esp/bindings/SOAP/Platform/soapbind.cpp
  69. 1 1
      esp/bindings/http/platform/httpservice.cpp
  70. 2 2
      esp/bindings/http/platform/httptransport.cpp
  71. 1 1
      esp/esdllib/CMakeLists.txt
  72. 1 6
      esp/esdllib/esdl_def.cpp
  73. 17 22
      esp/esdllib/esdl_transformer2.cpp
  74. 1 0
      esp/scm/ws_fs.ecm
  75. 1 1
      esp/services/WsDeploy/WsDeployEngine.cpp
  76. 39 39
      esp/services/WsDeploy/WsDeployService.cpp
  77. 5 5
      esp/services/esdl_svc_engine/esdl_binding.cpp
  78. 1 1
      esp/services/ws_fileio/ws_fileioservice.cpp
  79. 6 3
      esp/services/ws_fs/ws_fsService.cpp
  80. 1 1
      esp/services/ws_fs/ws_fsService.hpp
  81. 1 1
      esp/services/ws_workunits/ws_workunitsQuerySets.cpp
  82. 2 14
      esp/services/ws_workunits/ws_workunitsService.cpp
  83. 1 1
      esp/src/dijit
  84. 1 1
      esp/src/dojo
  85. 1 1
      esp/src/dojox
  86. 3 4
      esp/src/eclwatch/ESPUtil.js
  87. 8 0
      esp/src/eclwatch/SFDetailsWidget.js
  88. 4 0
      esp/src/eclwatch/nls/hpcc.js
  89. 2 2
      esp/src/eclwatch/templates/GraphWidget.html
  90. 2 2
      esp/src/eclwatch/templates/SFDetailsWidget.html
  91. 1 1
      esp/src/util
  92. 3 3
      esp/test/httptest/httptest.hpp
  93. 2 2
      esp/tools/soapplus/http.cpp
  94. 39 11
      initfiles/bash/etc/init.d/hpcc_common.in
  95. 6 6
      initfiles/bash/etc/init.d/pid.sh
  96. 2 2
      initfiles/bin/init_configesp
  97. 2 0
      initfiles/bin/init_dafilesrv.in
  98. 2 2
      initfiles/bin/init_dali
  99. 3 3
      initfiles/bin/init_dfuserver
  100. 0 0
      initfiles/bin/init_eclagent.in

+ 9 - 3
cmake_modules/commonSetup.cmake

@@ -38,13 +38,19 @@ IF ("${COMMONSETUP_DONE}" STREQUAL "")
     then create a separate build directory and run 'cmake path_to_source [options]' there.")
 
   cmake_policy ( SET CMP0011 NEW )
-
+  if (NOT (CMAKE_MAJOR_VERSION LESS 3))
+    cmake_policy ( SET CMP0026 OLD )
+  endif()
   option(CLIENTTOOLS "Enable the building/inclusion of a Client Tools component." ON)
   option(PLATFORM "Enable the building/inclusion of a Platform component." ON)
   option(DEVEL "Enable the building/inclusion of a Development component." OFF)
   option(CLIENTTOOLS_ONLY "Enable the building of Client Tools only." OFF)
 
-  option(USE_BINUTILS "Enable use of binutils to embed workunit info into shared objects" ON)
+  if (APPLE OR WIN32)
+    option(USE_BINUTILS "Enable use of binutils to embed workunit info into shared objects" OFF)
+  else()
+    option(USE_BINUTILS "Enable use of binutils to embed workunit info into shared objects" ON)
+  endif()
   option(USE_CPPUNIT "Enable unit tests (requires cppunit)" OFF)
   option(USE_OPENLDAP "Enable OpenLDAP support (requires OpenLDAP)" ON)
   option(USE_ICU "Enable unicode support (requires ICU)" ON)
@@ -490,7 +496,7 @@ IF ("${COMMONSETUP_DONE}" STREQUAL "")
   ENDIF(MAKE_DOCS)
 
   IF ( NOT MAKE_DOCS_ONLY )
-      IF (USE_BINUTILS AND NOT WIN32)
+      IF (USE_BINUTILS AND NOT WIN32 AND NOT APPLE)
         find_package(BINUTILS)
         IF (BINUTILS_FOUND)
           add_definitions (-D_USE_BINUTILS)

+ 3 - 2
cmake_modules/optionDefaults.cmake

@@ -1,10 +1,11 @@
 
 if ( NOT PREFIX )
 if ( WIN32 )
-    if ("$ENV{ProgramFiles(x86)}" STREQUAL "")
+    set( prog86key "ProgramFiles(x86)" )
+    if ("$ENV{${prog86key}}" STREQUAL "")
         set( PREFIX "$ENV{ProgramFiles}" )
     else()
-        set( PREFIX "$ENV{ProgramFiles(x86)}" )
+        set( PREFIX "$ENV{${prog86key}}" )
     endif()
     string(REGEX REPLACE "\\\\" "/" PREFIX ${PREFIX})    
 else (WIN32)

+ 41 - 1
common/dllserver/thorplugin.cpp

@@ -25,6 +25,10 @@
 #include "eclrtl.hpp"
 #ifdef _USE_BINUTILS
 #include "bfd.h"
+#elif defined(__APPLE__)
+#include <mach-o/getsect.h>
+#include <sys/mman.h>
+#include <sys/stat.h>
 #endif
 
 #include "thorplugin.hpp"
@@ -195,7 +199,10 @@ bool HelperDll::getResource(size32_t & len, const void * & data, const char * ty
     symName.append(type).append("_").append(id).append("_txt_start");
     data = (const void *) getEntry(symName.str());
     if (!data)
+    {
+        printf("Failed to locate symbol %s", symName.str());
         return false;
+    }
     byte bom;
     byte version;
     bool compressed;
@@ -269,8 +276,41 @@ extern bool getResourceFromFile(const char *filename, MemoryBuffer &data, const
         bfd_close (file);
    }
    return data.length() != 0;
+#elif defined(__APPLE__)
+    unsigned long len = 0;
+    struct stat stat_buf;
+    VStringBuffer sectname("%s_%u", type, id);
+    int fd = open(filename, O_RDONLY);
+    if (fd == -1 || fstat(fd, &stat_buf) == -1)
+    {
+        DBGLOG("Failed to load library %s: %d", filename, errno);
+        return false;
+    }
+    __uint64 size = stat_buf.st_size;
+    byte *start_addr = (byte *) mmap(0, size, PROT_READ, MAP_FILE | MAP_PRIVATE, fd, 0);
+    if (start_addr == MAP_FAILED)
+    {
+        DBGLOG("Failed to load library %s: %d", filename, errno);
+    }
+    else
+    {
+        // The first bytes are the Mach-O header
+        struct mach_header_64 *mh = (struct mach_header_64 *) start_addr;
+        if (mh->magic != MH_MAGIC_64)
+        {
+            DBGLOG("Failed to load library %s: Does not appear to be a Mach-O 64-bit binary", filename);
+        }
+        else
+        {
+            unsigned char *data2 = getsectiondata(mh, "__TEXT", sectname.str(), &len);
+            data.append(len, data2);
+        }
+        munmap(start_addr, size);
+    }
+    close(fd);
+    return len != 0;
 #else
-   UNIMPLEMENTED;
+    UNIMPLEMENTED;
 #endif
 }
 

+ 6 - 6
common/fileview2/fvdsremote.cpp

@@ -408,7 +408,7 @@ void RemoteDataSourceServer::doCmdCreateWorkunit(MemoryBuffer & in, MemoryBuffer
     in.read(sequence);
     in.read(name);
 
-    DBGLOG("RemoteFileView:CreateWorkunit('%s',%d,'%s') by[%s:%"I64F"d", wuid.get(), sequence, name ? name.get() : "", username.get(), session);
+    DBGLOG("RemoteFileView:CreateWorkunit('%s',%d,'%s') by[%s:%" I64F "d", wuid.get(), sequence, name ? name.get() : "", username.get(), session);
     Owned<IConstWUResult> wuResult = resolveResult(wuid, sequence, name);
     Owned<IFvDataSource> ds = createDataSource(wuResult, wuid, username, password);
     unique_id_t id = addDataSource(session, ds);
@@ -419,7 +419,7 @@ void RemoteDataSourceServer::doCmdCreateWorkunit(MemoryBuffer & in, MemoryBuffer
     ds->queryMetaData()->serialize(out);
     out.append(ds->isIndex());
 
-    DBGLOG("RemoteFileView:CreateWorkunit returns %"I64F"d", id);
+    DBGLOG("RemoteFileView:CreateWorkunit returns %" I64F "d", id);
 }
 
 void RemoteDataSourceServer::doCmdCreateFile(MemoryBuffer & in, MemoryBuffer & out)
@@ -431,7 +431,7 @@ void RemoteDataSourceServer::doCmdCreateFile(MemoryBuffer & in, MemoryBuffer & o
     in.read(username).read(password);
     in.read(logicalName);
 
-    DBGLOG("RemoteFileView:CreateFile('%s') by[%s:%"I64F"d", logicalName.get(), username.get(), session);
+    DBGLOG("RemoteFileView:CreateFile('%s') by[%s:%" I64F "d", logicalName.get(), username.get(), session);
     Owned<IFvDataSource> ds = createFileDataSource(logicalName, cluster, username, password);
     unique_id_t id = addDataSource(session, ds);
 
@@ -441,7 +441,7 @@ void RemoteDataSourceServer::doCmdCreateFile(MemoryBuffer & in, MemoryBuffer & o
     ds->queryMetaData()->serialize(out);
     out.append(ds->isIndex());
 
-    DBGLOG("RemoteFileView:CreateFile returns %"I64F"d", id);
+    DBGLOG("RemoteFileView:CreateFile returns %" I64F "d", id);
 }
 
 void RemoteDataSourceServer::doCmdDestroy(MemoryBuffer & in, MemoryBuffer & out)
@@ -449,7 +449,7 @@ void RemoteDataSourceServer::doCmdDestroy(MemoryBuffer & in, MemoryBuffer & out)
     unique_id_t id;
     in.read(id);
 
-    DBGLOG("RemoteFileView:Destroy(%"I64F"d)", id);
+    DBGLOG("RemoteFileView:Destroy(%" I64F "d)", id);
     CriticalBlock block(cs);
     ForEachItemIn(idx, entries)
     {
@@ -503,7 +503,7 @@ void RemoteDataSourceServer::removeSession(SessionId id)
         RemoteDataEntry & cur = entries.item(idx);
         if (cur.session == id)
         {
-            DBGLOG("RemoteFileView:Instance Died %"I64F"d", cur.id);
+            DBGLOG("RemoteFileView:Instance Died %" I64F "d", cur.id);
             entries.remove(idx);
         }
     }

+ 5 - 5
common/remote/sockfile.cpp

@@ -2458,7 +2458,7 @@ public:
                 EXCLOG(e,"CRemoteFileIO::write");
                 if (++tries>3)
                     throw;
-                WARNLOG("Retrying write(%"I64F"d,%d) of %s (%d)",pos,len,parent->queryLocalName(),tries);
+                WARNLOG("Retrying write(%" I64F "d,%d) of %s (%d)",pos,len,parent->queryLocalName(),tries);
                 Owned<IException> exc = e;
                 if (!reopen())
                     throw exc.getClear();
@@ -3597,7 +3597,7 @@ public:
             return false;
         }
         if (TF_TRACE)
-            PROGLOG("read file,  handle = %d, pos = %"I64F"d, toread = %d, read = %d",handle,pos,len,numRead);
+            PROGLOG("read file,  handle = %d, pos = %" I64F "d, toread = %d, read = %d",handle,pos,len,numRead);
         {
             reply.setLength(posOfLength + sizeof(numRead) + numRead);
             reply.writeEndianDirect(posOfLength,sizeof(numRead),&numRead);
@@ -3616,7 +3616,7 @@ public:
         __int64 size = fileio->size();
         reply.append((unsigned)RFEnoerror).append(size);
         if (TF_TRACE)
-            PROGLOG("size file,  handle = %d, size = %"I64F"d",handle,size);
+            PROGLOG("size file,  handle = %d, size = %" I64F "d",handle,size);
         return true;
     }
 
@@ -3627,7 +3627,7 @@ public:
         msg.read(handle).read(size);
         IFileIO *fileio;
         if (TF_TRACE)
-            PROGLOG("set size file,  handle = %d, size = %"I64F"d",handle,size);
+            PROGLOG("set size file,  handle = %d, size = %" I64F "d",handle,size);
         if (!checkFileIOHandle(reply, handle, fileio))
             return false;
         fileio->setSize(size);
@@ -3824,7 +3824,7 @@ public:
             Owned<IFile> file = createIFile(srcname.get());
             __int64 written = fileio->appendFile(file,pos,len);
             if (TF_TRACE)
-                PROGLOG("append file,  handle = %d, file=%s, pos = %"I64F"d len = %"I64F"d written = %"I64F"d",handle,srcname.get(),pos,len,written);
+                PROGLOG("append file,  handle = %d, file=%s, pos = %" I64F "d len = %" I64F "d written = %" I64F "d",handle,srcname.get(),pos,len,written);
             reply.append((unsigned)RFEnoerror).append(written);
             return true;
         }

+ 1 - 1
common/thorhelper/roxiehelper.cpp

@@ -1214,7 +1214,7 @@ void FlushingJsonBuffer::setScalarInt(const char *resultName, unsigned sequence,
 void FlushingJsonBuffer::setScalarUInt(const char *resultName, unsigned sequence, unsigned __int64 value, unsigned size)
 {
     startScalar(resultName, sequence);
-    if (size < 6) //JavaScript doesn't support unsigned, and only supports 53 significant bits
+    if (size < 7) //JavaScript doesn't support unsigned, and only supports 53 significant bits
         s.append(value);
     else
         s.append('"').append(value).append('"');

+ 7 - 1
common/thorhelper/thorsoapcall.cpp

@@ -1388,14 +1388,20 @@ private:
         else
             assertex(false);
 
-        request.append("Host: ").append(url.host).append(":").append(url.port).append("\r\n");//http 1.1
         if (master->wscType == STsoap)
         {
+            request.append("Host: ").append(url.host).append(":").append(url.port).append("\r\n");//http 1.1
             request.append(CONTENT_LENGTH).append(xmlWriter.length()).append("\r\n\r\n");
             request.append(xmlWriter.str());//add SOAP xml content
         }
         else
+        {
+            request.append("Host: ").append(url.host);//http 1.1
+            if (url.port != 80) //default port?
+                request.append(":").append(url.port);
+            request.append("\r\n");//http 1.1
             request.append("\r\n");//httpcall
+        }
 
         if (soapTraceLevel > 6 || master->logXML)
             master->logctx.CTXLOG("%s: request(%s)", master->wscCallTypeText(), request.str());

+ 60 - 5
common/thorhelper/thorxmlread.cpp

@@ -1607,8 +1607,9 @@ class CXMLParse : public CInterface, implements IXMLParse
     PTreeReaderOptions xmlOptions;
     bool step, contentRequired, isJson;
 
-    class CXMLMaker : public CInterface, implements IPTreeMaker
+    class CMakerBase : public CInterface, implements IPTreeMaker
     {
+    protected:
         CXPath xpath;
         IXMLSelect *iXMLSelect;   // NOTE - not linked - creates circular links
         CICopyArrayOf<CParseStackInfo> stack, freeParseInfo;
@@ -1624,14 +1625,14 @@ class CXMLParse : public CInterface, implements IXMLParse
     public:
         IMPLEMENT_IINTERFACE;
 
-        CXMLMaker(const char *_xpath, IXMLSelect &_iXMLSelect, bool _contentRequired, bool ignoreNameSpaces) : xpath(_xpath, ignoreNameSpaces), iXMLSelect(&_iXMLSelect), contentRequired(_contentRequired)
+        CMakerBase(const char *_xpath, IXMLSelect &_iXMLSelect, bool _contentRequired, bool ignoreNameSpaces) : xpath(_xpath, ignoreNameSpaces), iXMLSelect(&_iXMLSelect), contentRequired(_contentRequired)
         {
             lastMatchKeptLevel = 0;
             lastMatchKeptNode = lastMatchKeptNodeParent = NULL;
             maker = NULL;
             utf8Translator = NULL;
         }
-        ~CXMLMaker()
+        ~CMakerBase()
         {
             ForEachItemIn(i, stack)
                 delete &stack.item(i);
@@ -1898,6 +1899,54 @@ class CXMLParse : public CInterface, implements IXMLParse
         }
     } *iXMLMaker;
 
+    class CXMLMaker : public CMakerBase
+    {
+    public:
+        CXMLMaker(const char *_xpath, IXMLSelect &_iXMLSelect, bool _contentRequired, bool ignoreNameSpaces) : CMakerBase(_xpath, _iXMLSelect, _contentRequired, ignoreNameSpaces)
+        {
+        }
+    };
+
+    class CJSONMaker : public CMakerBase
+    {
+    public:
+        CJSONMaker(const char *_xpath, IXMLSelect &_iXMLSelect, bool _contentRequired, bool ignoreNameSpaces) : CMakerBase(_xpath, _iXMLSelect, _contentRequired, ignoreNameSpaces)
+        {
+        }
+
+        bool checkSkipRoot(const char *tag)
+        {
+            if (stack.ordinality()) //root level only
+                return false;
+            if (streq(tag, "__array__")) //xpath starts after root array
+                return true;
+            if (streq(tag, "__object__") && xpath.queryDepth()) //empty xpath matches start object, otherwise skip, xpath starts immediately after
+                return true;
+            return false;
+        }
+
+        virtual void beginNode(const char *tag, offset_t startOffset)
+        {
+            if (!checkSkipRoot(tag))
+                CMakerBase::beginNode(tag, startOffset);
+        }
+        virtual void newAttribute(const char *tag, const char *value)
+        {
+            if (stack.ordinality() && stack.tos().keep)
+                maker->newAttribute(tag, value);
+        }
+        virtual void beginNodeContent(const char *tag)
+        {
+            if (!checkSkipRoot(tag))
+                CMakerBase::beginNodeContent(tag);
+        }
+        virtual void endNode(const char *tag, unsigned length, const void *value, bool binary, offset_t endOffset)
+        {
+            if (!checkSkipRoot(tag))
+                CMakerBase::endNode(tag, length, value, binary, endOffset);
+        }
+    };
+
 public:
     IMPLEMENT_IINTERFACE;
 
@@ -1912,11 +1961,17 @@ public:
         ::Release(iXMLMaker);
         ::Release(xmlReader);
     }
+    CMakerBase *createMaker()
+    {
+        bool ignoreNameSpaces = 0 != ((unsigned)xmlOptions & (unsigned)ptr_ignoreNameSpaces);
+        if (isJson)
+            return new CJSONMaker(xpath, *iXMLSelect, contentRequired, ignoreNameSpaces);
+        return new CXMLMaker(xpath, *iXMLSelect, contentRequired, ignoreNameSpaces);
+    }
     void init()
     {
         xmlReader = NULL;
-        bool ignoreNameSpaces = 0 != ((unsigned)xmlOptions & (unsigned)ptr_ignoreNameSpaces);
-        iXMLMaker = new CXMLMaker(xpath, *iXMLSelect, contentRequired, ignoreNameSpaces);
+        iXMLMaker = createMaker();
         iXMLMaker->init();
     }
 

+ 1 - 1
common/thorhelper/thorxmlwrite.cpp

@@ -501,7 +501,7 @@ void CommonJsonWriter::outputInt(__int64 field, unsigned size, const char *field
 }
 void CommonJsonWriter::outputUInt(unsigned __int64 field, unsigned size, const char *fieldname)
 {
-    if (size < 6) //JavaScript doesn't support unsigned, and only supports 53 significant bits
+    if (size < 7) //JavaScript doesn't support unsigned, and only supports 53 significant bits
     {
         checkDelimit();
         appendJSONValue(out, checkItemName(fieldname), field);

+ 2 - 2
common/workunit/workunit.cpp

@@ -4461,7 +4461,7 @@ void CLocalWorkUnit::checkAgentRunning(WUState & state)
                     state = WUStateFailed;
                 else
                     return;
-                WARNLOG("checkAgentRunning terminated: %"I64F"d state = %d",(__int64)agent,(int)state);
+                WARNLOG("checkAgentRunning terminated: %" I64F "d state = %d",(__int64)agent,(int)state);
                 Owned<IWorkUnit> w = &lock();
                 w->setState(state);
                 Owned<IWUException> e = w->createException();
@@ -9826,7 +9826,7 @@ static WUState _waitForWorkUnit(const char * wuid, unsigned timeout, bool compil
                             default:
                                 return ret;
                         }
-                        WARNLOG("_waitForWorkUnit terminated: %"I64F"d state = %d",(__int64)agent,(int)ret);
+                        WARNLOG("_waitForWorkUnit terminated: %" I64F "d state = %d",(__int64)agent,(int)ret);
                         Owned<IWorkUnitFactory> factory = getWorkUnitFactory();
                         Owned<IWorkUnit> wu = factory->updateWorkUnit(wuid);
                         wu->setState(ret);

+ 2 - 2
common/workunit/wujobq.cpp

@@ -679,7 +679,7 @@ public:
     {
         StringBuffer path;
         if (idx==(unsigned)-1)
-            path.appendf("Client[@session=\"%"I64F"d\"]",sessionid);
+            path.appendf("Client[@session=\"%" I64F "d\"]",sessionid);
         else
             path.appendf("Client[%d]",idx+1);
         IPropertyTree *ret = qd.root->queryPropTree(path.str());
@@ -1439,7 +1439,7 @@ public:
                 item = qd.root->queryPropTree(path.str());
                 if (!item)
                     break;
-//              PROGLOG("WUJOBQ: Removing %s as session %"I64F"x not active",item->queryProp("@wuid"),item->getPropInt64("@session"));
+//              PROGLOG("WUJOBQ: Removing %s as session %" I64F "x not active",item->queryProp("@wuid"),item->getPropInt64("@session"));
                 removeItem(qd,item,false);
             }
             else

+ 5 - 5
dali/base/dacsds.cpp

@@ -45,7 +45,7 @@ static CriticalSection SDScrit;
 #define CHECK_CONNECTED(XSTR)                                                                                        \
     if (!connected)                                                                                                   \
     {                                                                                                               \
-        LOG(MCerror, unknownJob, XSTR": Closed connection (xpath=%s, sessionId=%"I64F"d)", xpath.get(), sessionId);       \
+        LOG(MCerror, unknownJob, XSTR": Closed connection (xpath=%s, sessionId=%" I64F "d)", xpath.get(), sessionId);       \
         return;                                                                                                     \
     }
 
@@ -526,7 +526,7 @@ IPropertyTreeIterator *CRemoteConnection::doGetElements(CClientRemoteTree *tree,
 IPropertyTreeIterator *CRemoteConnection::getElements(const char *xpath, IPTIteratorCodes flags)
 {
     if (!serverIterAvailable)
-        throw MakeSDSException(SDSExcpt_VersionMismatch, "Server-side getElements not supported by server versions prior to "SDS_SVER_MIN_GETXPATHS_CONNECT);
+        throw MakeSDSException(SDSExcpt_VersionMismatch, "Server-side getElements not supported by server versions prior to " SDS_SVER_MIN_GETXPATHS_CONNECT);
     flags |= iptiter_remote;
     return root->getElements(xpath, flags);
 }
@@ -1693,10 +1693,10 @@ IRemoteConnections *CClientSDSManager::connect(IMultipleConnector *mConnect, Ses
 {
     CDaliVersion serverVersionNeeded(MIN_MCONNECT_SVER);
     if (queryDaliServerVersion().compare(serverVersionNeeded) < 0)
-        throw MakeSDSException(SDSExcpt_VersionMismatch, "Multiple connect not supported by server versions prior to "MIN_MCONNECT_SVER);
+        throw MakeSDSException(SDSExcpt_VersionMismatch, "Multiple connect not supported by server versions prior to " MIN_MCONNECT_SVER);
 
     if (0 == id || id != myProcessSession())
-        throw MakeSDSException(SDSExcpt_InvalidSessionId, ", in multi connect, sessionid=%"I64F"x", id);
+        throw MakeSDSException(SDSExcpt_InvalidSessionId, ", in multi connect, sessionid=%" I64F "x", id);
 
     CMessageBuffer mb;
     mb.append((unsigned)DAMP_SDSCMD_MCONNECT | lazyExtFlag);
@@ -1752,7 +1752,7 @@ IRemoteConnections *CClientSDSManager::connect(IMultipleConnector *mConnect, Ses
 IRemoteConnection *CClientSDSManager::connect(const char *xpath, SessionId id, unsigned mode, unsigned timeout)
 {
     if (0 == id || id != myProcessSession())
-        throw MakeSDSException(SDSExcpt_InvalidSessionId, ", connecting to %s, sessionid=%"I64F"x", xpath, id);
+        throw MakeSDSException(SDSExcpt_InvalidSessionId, ", connecting to %s, sessionid=%" I64F "x", xpath, id);
 
     CMessageBuffer mb;
     mb.append((int)DAMP_SDSCMD_CONNECT | lazyExtFlag);

+ 1 - 1
dali/base/dacsds.ipp

@@ -47,7 +47,7 @@ public:
             }
             catch (IException *e)
             {
-                VStringBuffer errMsg("beforeDispose commit connectionid=%"I64F"x, xpath=%s", connectionId, xpath.get());
+                VStringBuffer errMsg("beforeDispose commit connectionid=%" I64F "x, xpath=%s", connectionId, xpath.get());
                 EXCLOG(e, errMsg.str());
                 e->Release();
             }

+ 1 - 1
dali/base/dadiags.cpp

@@ -190,7 +190,7 @@ public:
                     bool disconnect;
                     params.read(connectionId);
                     params.read(disconnect);
-                    PROGLOG("Dalidiag request to unlock connection id: %"I64F"x", connectionId);
+                    PROGLOG("Dalidiag request to unlock connection id: %" I64F "x", connectionId);
                     StringBuffer connectionInfo;
                     bool success = querySDSServer().unlock(connectionId, disconnect, connectionInfo);
                     mb.append(success);

+ 3 - 3
dali/base/danqs.cpp

@@ -767,7 +767,7 @@ public:
         {
             char const * branch = transactionIsGet ? "TransactionalGet" : "TransactionalPut";
             StringBuffer path;
-            path.appendf("%s[@id=\"%"I64F"d\"]", branch, transactionId);
+            path.appendf("%s[@id=\"%" I64F "d\"]", branch, transactionId);
             add = root->queryPropTree(path.str());
             if(!add)
             {
@@ -935,8 +935,8 @@ public:
             IPropertyTree & q = iter->query();
             StringBuffer getPath;
             StringBuffer putPath;
-            getPath.appendf("TransactionalGet[@id=\"%"I64F"d\"]", transactionId);
-            putPath.appendf("TransactionalPut[@id=\"%"I64F"d\"]", transactionId);
+            getPath.appendf("TransactionalGet[@id=\"%" I64F "d\"]", transactionId);
+            putPath.appendf("TransactionalPut[@id=\"%" I64F "d\"]", transactionId);
             IPropertyTree * xferBranch;
             IPropertyTree * removeBranch;
             if(rollback)

+ 26 - 26
dali/base/dasds.cpp

@@ -569,7 +569,7 @@ public:
             if (pos == NotFound)
             {
                 StringBuffer msg;
-                msg.append("ConnectionId=").appendf("%"I64F"x", connectionId).append(", xpath=").append(xpath).append(", sessionId=").appendf("%"I64F"x", sessionId).append(", mode=").append(mode).append(", timeout=");
+                msg.append("ConnectionId=").appendf("%" I64F "x", connectionId).append(", xpath=").append(xpath).append(", sessionId=").appendf("%" I64F "x", sessionId).append(", mode=").append(mode).append(", timeout=");
                 if (INFINITE == timeout)
                     msg.append("INFINITE");
                 else
@@ -608,7 +608,7 @@ public:
 
     void closed(SessionId id)
     {
-        LOG(MCwarning, unknownJob, "Connection (%"I64F"x) was leaked by exiting client (%"I64F"x) path=%s", connectionId, id, queryXPath());
+        LOG(MCwarning, unknownJob, "Connection (%" I64F "x) was leaked by exiting client (%" I64F "x) path=%s", connectionId, id, queryXPath());
         aborted(id);
         subsid=0;
     }
@@ -987,7 +987,7 @@ void writeDelta(StringBuffer &xml, IFile &iFile, const char *msg="", unsigned re
             char *headerPtr = (char *)header.bufferBase();
             sprintf(strNum, "%010u", ~crc);
             memcpy(headerPtr + deltaHeaderCrcOff, strNum, 10);
-            sprintf(strNum, "%016"I64F"X", fLen);
+            sprintf(strNum, "%016" I64F "X", fLen);
             memcpy(headerPtr + deltaHeaderSizeOff, strNum, 16);
             iFileIO->write(0, strlen(deltaHeader), headerPtr);
         }
@@ -1413,7 +1413,7 @@ class CLegacyBinaryFileExternal : public CExternalFile, implements IExternalHand
 public:
     IMPLEMENT_IINTERFACE;
 
-    CLegacyBinaryFileExternal(const char *dataPath, CBackupHandler &backupHandler) : CExternalFile("."EF_LegacyBinaryValue, dataPath, backupHandler) { }
+    CLegacyBinaryFileExternal(const char *dataPath, CBackupHandler &backupHandler) : CExternalFile("." EF_LegacyBinaryValue, dataPath, backupHandler) { }
     virtual void resetAsExternal(IPropertyTree &tree)
     {
         tree.setProp(NULL, (char *)NULL);
@@ -1518,7 +1518,7 @@ class CBinaryFileExternal : public CExternalFile, implements IExternalHandler
 public:
     IMPLEMENT_IINTERFACE;
 
-    CBinaryFileExternal(const char *dataPath, CBackupHandler &backupHandler) : CExternalFile("."EF_BinaryValue, dataPath, backupHandler) { }
+    CBinaryFileExternal(const char *dataPath, CBackupHandler &backupHandler) : CExternalFile("." EF_BinaryValue, dataPath, backupHandler) { }
     virtual void resetAsExternal(IPropertyTree &tree)
     {
         tree.setProp(NULL, (char *)NULL);
@@ -1619,7 +1619,7 @@ class CXMLFileExternal : public CExternalFile, implements IExternalHandler
 public:
     IMPLEMENT_IINTERFACE;
 
-    CXMLFileExternal(const char *dataPath, CBackupHandler &backupHandler) : CExternalFile("."EF_XML, dataPath, backupHandler) { }
+    CXMLFileExternal(const char *dataPath, CBackupHandler &backupHandler) : CExternalFile("." EF_XML, dataPath, backupHandler) { }
     virtual void resetAsExternal(IPropertyTree &_tree)
     {
         PTree &tree = *QUERYINTERFACE(&_tree, PTree);
@@ -2249,7 +2249,7 @@ CServerConnection::~CServerConnection()
 
 void CServerConnection::aborted(SessionId id)
 {
-    LOG(MCdebugInfo(100), unknownJob, "CServerConnection: connection aborted (%"I64F"x) sessId=%"I64F"x",connectionId, id);
+    LOG(MCdebugInfo(100), unknownJob, "CServerConnection: connection aborted (%" I64F "x) sessId=%" I64F "x",connectionId, id);
 #if 0 // JCSMORE - think this is ok, but concerned about deadlock, change later.
     Owned<CLCLockBlock> lockBlock = new CLCWriteLockBlock(((CCovenSDSManager &)manager).dataRWLock, readWriteTimeout, __FILE__, __LINE__);
     SDSManager->disconnect(connectionId, false);
@@ -2490,7 +2490,7 @@ public:
     virtual void setServerId(__int64 _serverId)
     {
         if (serverId && serverId != _serverId)
-            WARNLOG("Unexpected - client server id mismatch in %s, id=%"I64F"x", queryName(), _serverId);
+            WARNLOG("Unexpected - client server id mismatch in %s, id=%" I64F "x", queryName(), _serverId);
         CRemoteTreeBase::setServerId(_serverId);
     }
 
@@ -3200,7 +3200,7 @@ class CLockInfo : public CInterface, implements IInterface
                         if (lD->sessId != nodeSessId)
                         {
                             StringBuffer out("Removing stale connection session [");
-                            out.appendf("%"I64F"x], connectionId [%"I64F"x]", lD->sessId, * ((ConnectionId *) imap.getKey()));
+                            out.appendf("%" I64F "x], connectionId [%" I64F "x]", lD->sessId, * ((ConnectionId *) imap.getKey()));
                             out.append(" xpath [").append(xpath).append("]");
                             PROGLOG("%s", out.str());
                             querySessionManager().stopSession(lD->sessId, true);
@@ -3216,7 +3216,7 @@ class CLockInfo : public CInterface, implements IInterface
                                 StringBuffer out("Terminating connection session to ");
                                 out.append(nodeStr);
                                 out.append(" [");
-                                out.appendf("%"I64F"x], connectionId [%"I64F"x]", lD->sessId, * ((ConnectionId *) imap.getKey()));
+                                out.appendf("%" I64F "x], connectionId [%" I64F "x]", lD->sessId, * ((ConnectionId *) imap.getKey()));
                                 out.append(" xpath [").append(xpath).append("]");
                                 PROGLOG("%s", out.str());
                                 queryCoven().disconnect(node);
@@ -3664,7 +3664,7 @@ public:
                 time.set(tt);
                 StringBuffer timeStr;
                 time.getString(timeStr);
-                out.appendf("%-20s|%-16"I64F"x|%-16"I64F"x|%-8x|%s(%d ms)", querySessionManager().getClientProcessEndpoint(lD.sessId, sessEpStr).str(), lD.sessId, connId, lD.mode, timeStr.str(), lockedFor);
+                out.appendf("%-20s|%-16" I64F "x|%-16" I64F "x|%-8x|%s(%d ms)", querySessionManager().getClientProcessEndpoint(lD.sessId, sessEpStr).str(), lD.sessId, connId, lD.mode, timeStr.str(), lockedFor);
                 ++l;
                 if (l>=nlocks)
                     break;
@@ -4123,7 +4123,7 @@ void CSDSTransactionServer::processMessage(CMessageBuffer &mb)
                     if (0 == id)
                     {
                         StringBuffer str("Dali client passing sessionid=0 to connect (xpath=");
-                        str.append(xpath).append(", mode=").append(mode).append(", connectionId=").appendf("%"I64F"x", connectionId).append(")");
+                        str.append(xpath).append(", mode=").append(mode).append(", connectionId=").appendf("%" I64F "x", connectionId).append(")");
                         WARNLOG("%s", str.str());
                     }
                     mb.clear();
@@ -4179,7 +4179,7 @@ void CSDSTransactionServer::processMessage(CMessageBuffer &mb)
                             if (0 == id)
                             {
                                 StringBuffer str("Dali client passing sessionid=0 to multi connect (xpath=");
-                                str.append(xpath).append(", mode=").append(mode).append(", connectionId=").appendf("%"I64F"x", connectionId).append(")");
+                                str.append(xpath).append(", mode=").append(mode).append(", connectionId=").appendf("%" I64F "x", connectionId).append(")");
                                 WARNLOG("%s", str.str());
                             }
                             CRemoteConnection *conn = new CRemoteConnection(*SDSManager, connectionId, xpath, id, mode, timeout);
@@ -4812,7 +4812,7 @@ IPropertyTree *loadStore(const char *storeFilename, IPTreeMaker *iMaker, unsigne
         unsigned crc = crcPipeStream->queryCrc();
 
         if (crcValidation && crc != crcValidation)
-            LOG(MCoperatorWarning, unknownJob, "Error processing store %s - CRC ERROR (file size=%"I64F"d, validation crc=%x, calculated crc=%x)", storeFilename, iFileIOStore->size(), crcValidation, crc); // not fatal yet (maybe later)
+            LOG(MCoperatorWarning, unknownJob, "Error processing store %s - CRC ERROR (file size=%" I64F "d, validation crc=%x, calculated crc=%x)", storeFilename, iFileIOStore->size(), crcValidation, crc); // not fatal yet (maybe later)
     }
     catch (IException *e)
     {
@@ -5029,7 +5029,7 @@ public:
         if (e>readWriteSlowTracing)
         {
             StringBuffer s("TIME: CUnlockCallback(write=");
-            s.append(lockedForWrite).append(",xpath=").append(xpath).append(", connectionId=").appendf("%"I64F"x", connectionId).append(") took ").append(e);
+            s.append(lockedForWrite).append(",xpath=").append(xpath).append(", connectionId=").appendf("%" I64F "x", connectionId).append(") took ").append(e);
             DBGLOG("%s", s.str());
             if (readWriteStackTracing)
                 PrintStackReport();
@@ -5355,14 +5355,14 @@ public:
                 {
                     pos = strlen(deltaHeader);
                     offset_t lastGood;
-                    if (sscanf(ptr+deltaHeaderSizeOff, "%"I64F"X", &lastGood))
+                    if (sscanf(ptr+deltaHeaderSizeOff, "%" I64F "X", &lastGood))
                     {
                         offset_t fSize = iFileIO->size();
                         if (fSize > lastGood)
                         {
                             offset_t diff = fSize - lastGood;
-                            LOG(MCoperatorError, unknownJob, "Delta file '%s', has %"I64F"d bytes of trailing data (possible power loss during save?), file size: %"I64F"d, last committed size: %"I64F"d", filename, diff, fSize, lastGood);
-                            LOG(MCoperatorError, unknownJob, "Resetting delta file '%s' to size: %"I64F"d", filename, lastGood);
+                            LOG(MCoperatorError, unknownJob, "Delta file '%s', has %" I64F "d bytes of trailing data (possible power loss during save?), file size: %" I64F "d, last committed size: %" I64F "d", filename, diff, fSize, lastGood);
+                            LOG(MCoperatorError, unknownJob, "Resetting delta file '%s' to size: %" I64F "d", filename, lastGood);
                             iFileIO->close();
                             backup(filename);
                             iFileIO.setown(iFile->open(IFOreadwrite));
@@ -7042,7 +7042,7 @@ void CCovenSDSManager::getExternalValueFromServerId(__int64 serverId, MemoryBuff
         if (index)
             getExternalValue(index, mb);
         else
-            WARNLOG("External file reference missing (node name='%s', id=%"I64F"d)", idTree->queryName(), serverId);
+            WARNLOG("External file reference missing (node name='%s', id=%" I64F "d)", idTree->queryName(), serverId);
     }
 }
 
@@ -7868,7 +7868,7 @@ StringBuffer &formatConnectionInfo(MemoryBuffer &src, StringBuffer &out)
     unsigned timeout;
     bool established;
     src.read(connectionId).read(xpath).read(sessionId).read(mode).read(timeout).read(established);
-    out.append("ConnectionId=").appendf("%"I64F"x", connectionId).append(", xpath=").append(xpath).append(", sessionId=").appendf("%"I64F"x", sessionId).append(", mode=").append(mode).append(", timeout=");
+    out.append("ConnectionId=").appendf("%" I64F "x", connectionId).append(", xpath=").append(xpath).append(", sessionId=").appendf("%" I64F "x", sessionId).append(", mode=").append(mode).append(", timeout=");
     if (INFINITE == timeout)
         out.append("INFINITE");
     else
@@ -7883,7 +7883,7 @@ StringBuffer &formatSubscriberInfo(MemoryBuffer &src, StringBuffer &out)
     bool sub;
     StringAttr xpath;
     src.read(subscriptionId).read(sub).read(xpath);
-    out.append("SubscriptionId=").appendf("%"I64F"x", subscriptionId).append(", xpath=").append(xpath).append(", sub=").append(sub?"true":"false");
+    out.append("SubscriptionId=").appendf("%" I64F "x", subscriptionId).append(", xpath=").append(xpath).append(", sub=").append(sub?"true":"false");
     return out;
 }
 
@@ -7893,7 +7893,7 @@ StringBuffer &formatNodeSubscriberInfo(MemoryBuffer &src, StringBuffer &out)
     StringAttr xpath;
     unsigned nodeCount;
     src.read(subscriptionId).read(xpath).read(nodeCount);
-    out.append("SubscriptionId=").appendf("%"I64F"x", subscriptionId).append(", xpath=").append(xpath).append(", nodes=").append(nodeCount);
+    out.append("SubscriptionId=").appendf("%" I64F "x", subscriptionId).append(", xpath=").append(xpath).append(", nodes=").append(nodeCount);
     return out;
 }
 
@@ -8886,12 +8886,12 @@ bool applyXmlDeltas(IPropertyTree &root, IIOStream &stream, bool stopOnError)
                     {
                         const char *pos = child.queryProp("@pos");
                         if (!pos)
-                            throw MakeStringException(0, "Missing position attribute in child reference, section end offset=%"I64F"d", sectionEndOffset);
+                            throw MakeStringException(0, "Missing position attribute in child reference, section end offset=%" I64F "d", sectionEndOffset);
                         StringBuffer xpath(name);
                         xpath.append('[').append(pos).append(']');
                         IPropertyTree *existingBranch = currentBranch.queryPropTree(xpath.str());
                         if (!existingBranch)
-                            throw MakeStringException(0, "Failed to locate delta change in %s, section end offset=%"I64F"d", xpath.str(), sectionEndOffset);
+                            throw MakeStringException(0, "Failed to locate delta change in %s, section end offset=%" I64F "d", xpath.str(), sectionEndOffset);
                         apply(child, *existingBranch);
                     }
                 }
@@ -8917,7 +8917,7 @@ bool applyXmlDeltas(IPropertyTree &root, IIOStream &stream, bool stopOnError)
                 throw MakeStringException(0, "Failed to locate header xpath = %s", xpath);
             IPropertyTree *start = match.queryPropTree("Delta/T");
             if (!start)
-                throw MakeStringException(0, "Badly constructed delta format (missing Delta/T) in header path=%s, section end offset=%"I64F"d", xpath, endOffset);
+                throw MakeStringException(0, "Badly constructed delta format (missing Delta/T) in header path=%s, section end offset=%" I64F "d", xpath, endOffset);
             headerPath.set(xpath);
             apply(*start, *root);
         }
@@ -8980,7 +8980,7 @@ void LogRemoteConn(IRemoteConnection *conn)
     IPropertyTree *root = conn->queryRoot();
     CRemoteTreeBase *remotetree = root?QUERYINTERFACE(root,CRemoteTreeBase):NULL;
     unsigned rcount = remotetree?remotetree->getLinkCount()-1:((unsigned)-1);
-    PROGLOG("CONN(%x,%"I64F"x,%"I64F"x) path = '%s' mode = %x, link %d,%d", 
+    PROGLOG("CONN(%x,%" I64F "x,%" I64F "x) path = '%s' mode = %x, link %d,%d",
             (unsigned)(memsize_t)conn,
             (__int64)conbase->querySessionId(),
             (__int64)conbase->queryConnectionId(),

+ 13 - 13
dali/base/dasess.cpp

@@ -269,7 +269,7 @@ public:
     StringBuffer &getDetails(StringBuffer &buf)
     {
         StringBuffer ep;
-        return buf.appendf("%16"I64F"X: %s, role=%s",CSessionState::id,node->endpoint().getUrlStr(ep).str(),queryRoleName(role));
+        return buf.appendf("%16" I64F "X: %s, role=%s",CSessionState::id,node->endpoint().getUrlStr(ep).str(),queryRoleName(role));
     }
     void addSessionIds(CProcessSessionState &other, bool prevOnly)
     {
@@ -296,7 +296,7 @@ public:
     void removeOldSessionId(SessionId id)
     {
         if (previousSessionIds.zap(id))
-            PROGLOG("Removed old sessionId (%"I64F"x) from current process state", id);
+            PROGLOG("Removed old sessionId (%" I64F "x) from current process state", id);
     }
 };
 
@@ -797,12 +797,12 @@ public:
         Semaphore sem;
         void closed(SessionId id)
         {
-            //PROGLOG("Session closed %"I64F"x",id);
+            //PROGLOG("Session closed %" I64F "x",id);
             sem.signal();
         }
         void aborted(SessionId id)
         {
-            //PROGLOG("Session aborted %"I64F"x",id);
+            //PROGLOG("Session aborted %" I64F "x",id);
             sem.signal();
         }
     };
@@ -1308,7 +1308,7 @@ public:
     void addProcessSession(SessionId id,INode *client,DaliClientRole role)
     {
         StringBuffer str;
-        PROGLOG("Session starting %"I64F"x (%s) : role=%s",id,client->endpoint().getUrlStr(str).str(),queryRoleName(role));
+        PROGLOG("Session starting %" I64F "x (%s) : role=%s",id,client->endpoint().getUrlStr(str).str(),queryRoleName(role));
         CHECKEDCRITICALBLOCK(sessmanagersect,60000);
         CProcessSessionState *s = new CProcessSessionState(id,client,role);
         while (!sessionstates.add(s)) // takes ownership
@@ -1326,7 +1326,7 @@ public:
             dbgassertex(previousState); // Must be there, it's reason add() failed
             SessionId oldSessionId = previousState->getId();
             s->addSessionIds(*previousState, false); // merges sessions from previous process state into new one that replaces it
-            WARNLOG("Dali session manager: registerClient process session already registered, old (%"I64F"x) replaced", oldSessionId);
+            WARNLOG("Dali session manager: registerClient process session already registered, old (%" I64F "x) replaced", oldSessionId);
             processlookup.remove(previousState, this);
         }
     }
@@ -1639,7 +1639,7 @@ protected:
         MemoryBuffer mb;
         bool abort=true;
         mb.append(abort);
-        ERRLOG("Session Manager - adding unknown session ID %"I64F"x", nstub->getSessionId());
+        ERRLOG("Session Manager - adding unknown session ID %" I64F "x", nstub->getSessionId());
         subs->notify(mb); 
         delete nstub;
         return;
@@ -1653,7 +1653,7 @@ protected:
 
     void stopSession(SessionId id, bool abort)
     {
-        PROGLOG("Session stopping %"I64F"x %s",id,abort?"aborted":"ok");
+        PROGLOG("Session stopping %" I64F "x %s",id,abort?"aborted":"ok");
         CHECKEDCRITICALBLOCK(sessmanagersect,60000);
         // do in multiple stages as may remove one or more sub sessions
         loop
@@ -1698,7 +1698,7 @@ protected:
                     SessionId prevId = cState->dequeuePreviousSessionId();
                     if (prevId)
                     {
-                        PROGLOG("Session (%"I64F"x) in stopSession, detected %d pending previous states, reinstating session (%"I64F"x) as current", id, cState->previousSessionIdCount(), prevId);
+                        PROGLOG("Session (%" I64F "x) in stopSession, detected %d pending previous states, reinstating session (%" I64F "x) as current", id, cState->previousSessionIdCount(), prevId);
                         CSessionState *prevSessionState = sessionstates.query(prevId);
                         dbgassertex(prevSessionState); // must be there
                         CProcessSessionState *prevProcessState = QUERYINTERFACE(prevSessionState, CProcessSessionState);
@@ -1721,13 +1721,13 @@ protected:
                     if (processlookup.remove(pState, this))
                     {
                         // Don't think possible to be here, if not current must have replaced afaics
-                        PROGLOG("Session (%"I64F"x) in stopSession, old process session removed", id);
+                        PROGLOG("Session (%" I64F "x) in stopSession, old process session removed", id);
                     }
                     else
-                        PROGLOG("Session (%"I64F"x) in stopSession, old process session was already removed", id); // because replaced
+                        PROGLOG("Session (%" I64F "x) in stopSession, old process session was already removed", id); // because replaced
                     if (cState)
                     {
-                        PROGLOG("Session (%"I64F"x) was replaced, ensuring removed from new process state", id);
+                        PROGLOG("Session (%" I64F "x) was replaced, ensuring removed from new process state", id);
                         cState->removeOldSessionId(id); // If already replaced, then must ensure no longer tracked by new
                     }
                 }
@@ -1757,7 +1757,7 @@ protected:
             idtostop = s->dequeuePreviousSessionId();
             if (idtostop)
             {
-                PROGLOG("Previous sessionId (%"I64F"x) for %s was replaced by (%"I64F"x), stopping old session now", idtostop, clientStr.str(), s->getId());
+                PROGLOG("Previous sessionId (%" I64F "x) for %s was replaced by (%" I64F "x), stopping old session now", idtostop, clientStr.str(), s->getId());
                 unsigned c = s->previousSessionIdCount();
                 if (c) // very unlikely, but could be >1, trace for info.
                     PROGLOG("%d old sessions pending closure", c);

+ 1 - 1
dali/base/dasubs.cpp

@@ -124,7 +124,7 @@ public:
     StringBuffer &getDetails(StringBuffer &buf)
     {
         StringBuffer ep;
-        return buf.appendf("%16"I64F"X: %s %s",sid,dst->endpoint().getUrlStr(ep).str(),hasaborted?"aborted":"");
+        return buf.appendf("%16" I64F "X: %s %s",sid,dst->endpoint().getUrlStr(ep).str(),hasaborted?"aborted":"");
     }
 };
 

+ 1 - 1
dali/base/dautils.cpp

@@ -2404,7 +2404,7 @@ public:
     }
     virtual void notify(SubscriptionId id, const char *xpath, SDSNotifyFlags flags, unsigned valueLen, const void *valueData)
     {
-//      PrintLog("Notification(%"I64F"x) of %s - flags = %d",(__int64) id, xpath, flags);
+//      PrintLog("Notification(%" I64F "x) of %s - flags = %d",(__int64) id, xpath, flags);
         sem.signal();
     }
 };

+ 1 - 1
dali/dafilesrv/dafilesrv.cpp

@@ -543,7 +543,7 @@ int main(int argc,char **argv)
                 else
                     listenep.getUrlStr(eps);
                 enableDafsAuthentication(requireauthenticate!=0);
-                PROGLOG("Opening "DAFS_SERVICE_DISPLAY_NAME" on %s%s", useSSL?"SECURE ":"",eps.str());
+                PROGLOG("Opening " DAFS_SERVICE_DISPLAY_NAME " on %s%s", useSSL?"SECURE ":"",eps.str());
                 const char * verstring = remoteServerVersionString();
                 PROGLOG("Version: %s", verstring);
                 PROGLOG("Authentication:%s required",requireauthenticate?"":" not");

+ 8 - 8
dali/daliadmin/daliadmin.cpp

@@ -1196,7 +1196,7 @@ static void checksuperfile(const char *lfn,bool fix=false)
                 root->removeTree(sub);
             }
             else if (sub->getPropInt64("@recordCount")||sub->getPropInt64("@size"))
-                ERRLOG("FAIL Empty Superfile %s contains non-empty Attr sz=%"I64F"d rc=%"I64F"d",lname.get(),sub->getPropInt64("@recordCount"),sub->getPropInt64("@size"));
+                ERRLOG("FAIL Empty Superfile %s contains non-empty Attr sz=%" I64F "d rc=%" I64F "d",lname.get(),sub->getPropInt64("@recordCount"),sub->getPropInt64("@size"));
 
         }
     }
@@ -1435,18 +1435,18 @@ static void dfscompratio (const char *lname, IUserDescriptor *user)
         if (size==(offset_t)-1)
             out.appendf("size not known");
         else if (compressed) {
-            out.appendf("expanded size %"I64F"d, ",size);
+            out.appendf("expanded size %" I64F "d, ",size);
             offset_t csize = getCompressedSize(file);
             if (csize==(offset_t)-1)
                 out.append("compressed size unknown");
             else {
-                out.appendf("compressed size %"I64F"d",csize);
+                out.appendf("compressed size %" I64F "d",csize);
                 if (csize)
                     out.appendf(", Ratio %.2f:1 (%%%d)",(float)size/csize,(unsigned)(csize*100/size));
             }
         }
         else
-            out.appendf("not compressed, size %"I64F"d",size);
+            out.appendf("not compressed, size %" I64F "d",size);
     }
     else
         out.appendf("File %s not found",lname);
@@ -2177,7 +2177,7 @@ class CXMLSizesParser : public CInterface
                 CTreeItem &match = arr.item(m);
                 StringBuffer xpath;
                 match.getXPath(xpath);
-                printf("xpath=%s, size=%"I64F"d\n", xpath.str(), match.size());
+                printf("xpath=%s, size=%" I64F "d\n", xpath.str(), match.size());
             }
         }
         void printResultTree()
@@ -2195,7 +2195,7 @@ class CXMLSizesParser : public CInterface
                     if (adjusted)
                         res.append(" (rest)");
                     res.padTo(40);
-                    res.appendf(" %10"I64F"d(%5.2f%%)",sz,((float)sz*100.0)/(float)totalSize);
+                    res.appendf(" %10" I64F "d(%5.2f%%)",sz,((float)sz*100.0)/(float)totalSize);
                     printf("%s\n",res.str());
                 }
             }
@@ -2405,10 +2405,10 @@ static void unlock(const char *pattern)
         mb.read(success);
         StringBuffer connectionInfo;
         if (!success)
-            PROGLOG("Lock %"I64F"x not found",connectionId);
+            PROGLOG("Lock %" I64F "x not found",connectionId);
         else {
             mb.read(connectionInfo);
-            PROGLOG("Lock %"I64F"x successfully removed: %s", connectionId, connectionInfo.str());
+            PROGLOG("Lock %" I64F "x successfully removed: %s", connectionId, connectionInfo.str());
         }
     }
 }

+ 1 - 1
dali/dalidiag/dalidiag.cpp

@@ -284,7 +284,7 @@ void partInfo(const char *name,unsigned copy)
             part.getFilename(fn,copy);
             StringBuffer buf;
             SocketEndpoint ep = fn.queryEndpoint();
-            printf("%3d %10"I64F"d %5s\n",partno,part.queryAttributes().getPropInt64("@size", -1),fn.getRemotePath(buf).str());
+            printf("%3d %10" I64F "d %5s\n",partno,part.queryAttributes().getPropInt64("@size", -1),fn.getRemotePath(buf).str());
         }
     }
     else

+ 13 - 13
dali/datest/datest.cpp

@@ -246,31 +246,31 @@ void Test_SuperFile2()
     queryDistributedFileDirectory().removeEntry(TEST_SUPER_FILE"B1",UNKNOWN_USER);
     sfile.setown(queryDistributedFileDirectory().createSuperFile(TEST_SUPER_FILE"B1",UNKNOWN_USER,true));
     for (unsigned tst=0;tst<2;tst++) {
-        printf("sfile size = %"I64F"d\n",sfile->getFileSize(false,false));
+        printf("sfile size = %" I64F "d\n",sfile->getFileSize(false,false));
         for (i = 0;i<3;i++) {
             StringBuffer name(TEST_SUB_FILE);
             name.append(i+1);
             addTestFile(name.str(),i+2);
             Owned<IDistributedFile> sbfile = queryDistributedFileDirectory().lookup(name,UNKNOWN_USER);
-            printf("adding size = %"I64F"d\n",sbfile->getFileSize(false,false));
+            printf("adding size = %" I64F "d\n",sbfile->getFileSize(false,false));
             sfile->addSubFile(name);
-            printf("sfile size = %"I64F"d\n",sfile->getFileSize(false,false));
+            printf("sfile size = %" I64F "d\n",sfile->getFileSize(false,false));
         }
         sfile.clear();
         sfile.setown(queryDistributedFileDirectory().lookupSuperFile(TEST_SUPER_FILE"B1",UNKNOWN_USER));
         printf("NumSubFiles = %d\n",sfile->numSubFiles());
         if (tst==1) {
             sfile->removeSubFile(NULL,false);
-            printf("sfile size = %"I64F"d\n",sfile->getFileSize(false,false));
+            printf("sfile size = %" I64F "d\n",sfile->getFileSize(false,false));
         }
         else {
             for (i = 0;i<3;i++) {
                 StringBuffer name(TEST_SUB_FILE);
                 name.append(i+1);
                 Owned<IDistributedFile> sbfile = queryDistributedFileDirectory().lookup(name,UNKNOWN_USER);
-                printf("removing size = %"I64F"d\n",sbfile->getFileSize(false,false));
+                printf("removing size = %" I64F "d\n",sbfile->getFileSize(false,false));
                 sfile->removeSubFile(name,false);
-                printf("sfile size = %"I64F"d\n",sfile->getFileSize(false,false));
+                printf("sfile size = %" I64F "d\n",sfile->getFileSize(false,false));
             }
         }
         printf("NumSubFiles = %d\n",sfile->numSubFiles());
@@ -1019,12 +1019,12 @@ public:
     Semaphore sem;
     void closed(SessionId id)
     {
-        PrintLog("Session closed %"I64F"d",id);
+        PrintLog("Session closed %" I64F "d",id);
         sem.signal();
     }
     void aborted(SessionId id)
     {
-        PrintLog("Session aborted %"I64F"d",id);
+        PrintLog("Session aborted %" I64F "d",id);
         sem.signal();
     }
 };
@@ -1046,7 +1046,7 @@ void Test_Session(const char *eps) // test for sessions
     loop {
         id = querySessionManager().lookupProcessSession(node);
         if (id) {
-            PrintLog("Session looked up %"I64F"d",id);
+            PrintLog("Session looked up %" I64F "d",id);
             break;
         }
         Sleep(1000);
@@ -1063,7 +1063,7 @@ void QTest2(bool testput)
     CMessageBuffer mb;
     if (testput) {
         SessionId session = querySessionManager().startSession(0);
-        PrintLog("session started = %"I64F"d",session);
+        PrintLog("session started = %" I64F "d",session);
         mb.append(session);
         channel->put(mb);
         while (!querySessionManager().sessionStopped(session,1000*5))
@@ -1075,7 +1075,7 @@ void QTest2(bool testput)
         mb.read(session);
         PrintLog("Started");
         Sleep(1000*6);
-        PrintLog("stopping session %"I64F"d",session);
+        PrintLog("stopping session %" I64F "d",session);
         querySessionManager().stopSession(session,false);
         PrintLog("Stopped");
     }
@@ -1092,7 +1092,7 @@ public:
     virtual void notify(SubscriptionId id, const char *xpath, SDSNotifyFlags flags, unsigned valueLen, const void *valueData)
     {
         static int nno = 0;
-        PrintLog("%d: Notification(%"I64F"d) of %s - flags = %d", nno++, (__int64) id, xpath, flags);
+        PrintLog("%d: Notification(%" I64F "d) of %s - flags = %d", nno++, (__int64) id, xpath, flags);
         if (valueData)
         {
             StringBuffer data;
@@ -1192,7 +1192,7 @@ void testSubscription(bool subscriber, int subs, int comms)
         IMPLEMENT_IINTERFACE;
         virtual void notify(SubscriptionId id, const char *xpath, SDSNotifyFlags flags, unsigned valueLen, const void *valueData)
         {
-            PrintLog("Notification(%"I64F"x) of %s - flags = %d",(__int64) id, xpath, flags);
+            PrintLog("Notification(%" I64F "x) of %s - flags = %d",(__int64) id, xpath, flags);
             if (valueData)
             {
                 StringBuffer data;

+ 2 - 2
dali/datest/floodtest.cpp

@@ -262,7 +262,7 @@ public:
                 }   
                 ninfo->sendbytes[dest] = done;
 #ifdef TRACE
-                DBGLOG("sent %d to %d  done = %"I64F"d",sz,dest+1,done);
+                DBGLOG("sent %d to %d  done = %" I64F "d",sz,dest+1,done);
 #endif
                 return true;
             }
@@ -908,7 +908,7 @@ void floodtestServer(const char *exename,const char *daliserver,const char *grpn
         Owned<IFileIO> res = resf->open(IFOcreate);
         res->write(0,out.length(),out.str());
         PROGLOG("Results written to floodlbres.txt");
-        PROGLOG("Floodtest loopback %"I64F"d messages received",total);
+        PROGLOG("Floodtest loopback %" I64F "d messages received",total);
         PROGLOG("Floodtest loopback finished, %d error%s reported",numerrs,(numerrs==1)?"":"s");
     }
     else {

+ 1 - 1
dali/dfu/dfuerror.hpp

@@ -82,7 +82,7 @@
 #define DFUERR_DifferentNodes_Text          "Part %d(%s): Nodes must be different (currently %s)"
 #define DFUERR_MultiNotAllowed_Text         "Wild or Multi-filenames not allowed for this operation"
 
-#define DFUERR_JobNotFound_Text             "No recovery information found for job %"I64F"d"
+#define DFUERR_JobNotFound_Text             "No recovery information found for job %" I64F "d"
 #define DFUERR_NoJobFound_Text              "No matching recovery information found."
 #define DFUERR_InconsistentInfo_Text        "Recovery information is inconsistent with current state."
 

+ 2 - 2
dali/dfu/dfuwu.cpp

@@ -400,7 +400,7 @@ public:
             if ((kbs!=0)||(sdone!=0)||(stotal!=0)) {
                 str.append(" (");
                 if ((sdone!=0)||(stotal!=0)) {
-                   str.appendf("%"I64F"d/%"I64F"d%s",sdone,stotal,scale.str());
+                   str.appendf("%" I64F "d/%" I64F "d%s",sdone,stotal,scale.str());
                    if (kbs!=0)
                        str.append(' ');
                 }
@@ -2878,7 +2878,7 @@ class CDFUWorkUnitFactory : public CInterface, implements IDFUWorkUnitFactory, i
             if (ok)
                 break;
             if (i%10==9)
-                WARNLOG("CDFUWorkUnitFactory: Subscription(%d,%"I64F"d) busy %s",i,(__int64)atid,xpath?xpath:"");
+                WARNLOG("CDFUWorkUnitFactory: Subscription(%d,%" I64F "d) busy %s",i,(__int64)atid,xpath?xpath:"");
             CriticalUnblock unblock(proxylock);
             Sleep(i*10);
             if (i==99) 

+ 22 - 22
dali/dfuXRefLib/dfuxreflib.cpp

@@ -1242,7 +1242,7 @@ void CLogicalNameEntry::resolve(CFileEntry *entry)
                     ((entry->size%recordsize)!=0)&&
                     !compressed&&
                     (!grouped||(entry->size%(recordsize+1)!=0))) {
-                    manager.error(lname.get(),"Part %d: Record size %d not multiple of file size %"I64F"d\n",part+1,recordsize,entry->size);
+                    manager.error(lname.get(),"Part %d: Record size %d not multiple of file size %" I64F "d\n",part+1,recordsize,entry->size);
                 }
             }
 #endif
@@ -1251,7 +1251,7 @@ void CLogicalNameEntry::resolve(CFileEntry *entry)
     }
 #ifdef PARTS_SIZE_NEEDED
     if (primaryresolved[part]&&replicateresolved[part]&&(primaryresolved[part]->size!=replicateresolved[part]->size)) {
-        manager.error(lname.get(),"Part %d: primary size %"I64F"d is different to replicate size %"I64F"d",part+1,primaryresolved[part]->size,replicateresolved[part]->size);
+        manager.error(lname.get(),"Part %d: primary size %" I64F "d is different to replicate size %" I64F "d",part+1,primaryresolved[part]->size,replicateresolved[part]->size);
     }
 #endif
 }
@@ -1652,7 +1652,7 @@ public:
 #ifdef PARTS_SIZE_NEEDED
                 if (entry->owner->compressed) {
                     if ((entry->expsize>=0)&&((sz!=entry->size)||((entry->size==0)&&(entry->expsize>0)))) {
-                        manager.error(entry->owner->lname.get(),"Part %d: %s size mismatch: recorded size %"I64F"d, actual size %"I64F"d, expanded size %"I64F"d",entry->part,entry->replicate?"replicate":"primary",entry->size,sz,entry->expsize); 
+                        manager.error(entry->owner->lname.get(),"Part %d: %s size mismatch: recorded size %" I64F "d, actual size %" I64F "d, expanded size %" I64F "d",entry->part,entry->replicate?"replicate":"primary",entry->size,sz,entry->expsize);
                         entry->owner->addMismatchedSize(entry->size,sz,entry->expsize,entry);
                     }
                     if (entry->size>=0) {
@@ -1665,7 +1665,7 @@ public:
                     if (!entry->replicate) {
                         entry->owner->addMismatchedSize(entry->size,sz,-1,entry);
                     }
-                    manager.error(entry->owner->lname.get(),"Part %d: %s size mismatch: recorded size %"I64F"d, actual size %"I64F"d",entry->part,entry->replicate?"replicate":"primary",entry->size,sz); 
+                    manager.error(entry->owner->lname.get(),"Part %d: %s size mismatch: recorded size %" I64F "d, actual size %" I64F "d",entry->part,entry->replicate?"replicate":"primary",entry->size,sz);
                     entry->size=sz; // set to actual size for fix
                 }
 #endif              
@@ -1793,7 +1793,7 @@ class CXRefManager: public CXRefManagerBase
                             if (sz!=entry->size) {
                                 StringBuffer s1;
                                 entry->getLogicalName(s1);
-                                outf("SIZEFIX: Changing size for %s from %"I64F"d to %"I64F"d\n",s1.str(),sz,entry->size);
+                                outf("SIZEFIX: Changing size for %s from %" I64F "d to %" I64F "d\n",s1.str(),sz,entry->size);
                                 part->lockProperties().setPropInt64("@size", entry->size);
                                 part->unlockProperties();
                             }
@@ -1805,7 +1805,7 @@ class CXRefManager: public CXRefManagerBase
                     }
                     sz = file->queryAttributes().getPropInt64("@size", -1);
                     if (sz!=total) {
-                        outf("SIZEFIX: Changing total size for %s from %"I64F"d to %"I64F"d\n",item.lname.get(),sz,total);
+                        outf("SIZEFIX: Changing total size for %s from %" I64F "d to %" I64F "d\n",item.lname.get(),sz,total);
                         if (total!=-1)
                             file->lockProperties().setPropInt64("@size", total);
                         else
@@ -1922,7 +1922,7 @@ class CXRefManager: public CXRefManagerBase
                 rname.setPath(ep,fullname);
                 rname.getRemotePath(name);
                 Owned<IFile> f= createIFile(name.str());
-                outf("%12"I64F"d %s\n",f->size(),name.str());
+                outf("%12" I64F "d %s\n",f->size(),name.str());
             }
 
 
@@ -2083,9 +2083,9 @@ class CXRefManager: public CXRefManagerBase
                 COrphanEntry &item = orphanlist.item(i);
                 if (!item.complete()&&item.misplaced) {
                     if (item.max>0)
-                        outf("%s %s (found %d, size %"I64F"d, modified %s)\n",item.fname.get(),item.misplaced->lname.get(),item.num(),item.size,item.modified.get());
+                        outf("%s %s (found %d, size %" I64F "d, modified %s)\n",item.fname.get(),item.misplaced->lname.get(),item.num(),item.size,item.modified.get());
                     else
-                        outf("%s (size %"I64F"d, modified %s)\n",item.fname.get(),item.size,item.modified.get());
+                        outf("%s (size %" I64F "d, modified %s)\n",item.fname.get(),item.size,item.modified.get());
                     StringBuffer s1;
                     item.getEps(s1,false);
                     outf("        primary: %s\n",s1.str());
@@ -2100,9 +2100,9 @@ class CXRefManager: public CXRefManagerBase
                 COrphanEntry &item = orphanlist.item(i);
                 if (!item.complete()&&!item.misplaced) {
                     if (item.max>0)
-                        outf("%s (found %d, size %"I64F"d, modified %s)\n",item.fname.get(),item.num(),item.size,item.modified.get());
+                        outf("%s (found %d, size %" I64F "d, modified %s)\n",item.fname.get(),item.num(),item.size,item.modified.get());
                     else
-                        outf("%s (size %"I64F"d, modified %s)\n",item.fname.get(),item.size,item.modified.get());
+                        outf("%s (size %" I64F "d, modified %s)\n",item.fname.get(),item.size,item.modified.get());
                     StringBuffer s1;
                     item.getEps(s1,false);
                     outf("        primary: %s\n",s1.str());
@@ -2119,9 +2119,9 @@ class CXRefManager: public CXRefManagerBase
                     StringBuffer sname;
                     if (item.isSingleton()) {
                         if (item.singletonName(sname,false))
-                            outf("%s (size %"I64F"d)\n",sname.str(),item.size);
+                            outf("%s (size %" I64F "d)\n",sname.str(),item.size);
                         if (item.singletonName(sname.clear(),true))
-                            outf("%s (size %"I64F"d)\n",sname.str(),item.size);
+                            outf("%s (size %" I64F "d)\n",sname.str(),item.size);
                     }
                 }
             }
@@ -2133,7 +2133,7 @@ class CXRefManager: public CXRefManagerBase
                 if (item.complete()) {
                     StringBuffer sname;
                     if (!item.isSingleton()) {
-                        outf("%s %s(size %"I64F"d)\n",item.fname.get(),item.misplaced?item.misplaced->lname.get():"",item.size);
+                        outf("%s %s(size %" I64F "d)\n",item.fname.get(),item.misplaced?item.misplaced->lname.get():"",item.size);
                         StringBuffer s1;
                         item.getEps(s1,false);
                         outf("        primary: %s\n",s1.str());
@@ -2304,7 +2304,7 @@ class CXRefManager: public CXRefManagerBase
                     item.maxip.getIpText(s2);
                 StringBuffer skew;
                 item.getskew(skew);
-                outf("%s numfiles=%u totalsize=%"CF"d minsize=%"CF"d(%s) maxsize=%"CF"d(%s), skew=%s\n",item.name.get(),item.num,item.size,
+                outf("%s numfiles=%u totalsize=%" CF "d minsize=%" CF "d(%s) maxsize=%" CF "d(%s), skew=%s\n",item.name.get(),item.num,item.size,
                     item.minsize,s1.str(),item.maxsize,s2.str(),skew.str());
             }
         }
@@ -2317,8 +2317,8 @@ class CXRefManager: public CXRefManagerBase
                 }
             }
         }
-        outf("TOTAL ORPHANS: %d files %"I64F"d bytes\n",totalNumOrphans,totalSizeOrphans);
-        outf("Row Compression: %d files %"I64F"d compressed %"I64F"d uncompressed\n",totalCompressed,totalCompressedSize, totalUncompressedSize);
+        outf("TOTAL ORPHANS: %d files %" I64F "d bytes\n",totalNumOrphans,totalSizeOrphans);
+        outf("Row Compression: %d files %" I64F "d compressed %" I64F "d uncompressed\n",totalCompressed,totalCompressedSize, totalUncompressedSize);
         outfileio.clear();
     }
 
@@ -2339,7 +2339,7 @@ class CXRefManager: public CXRefManagerBase
             ForEachItemIn(i,orphanlist) {
                 COrphanEntry &item = orphanlist.item(i);
                 if ((!item.complete())&&!item.misplaced) {
-                    outf("%s,%d,%"I64F"d,%s\n",item.fname.get(),item.num(),item.size,item.modified.get());
+                    outf("%s,%d,%" I64F "d,%s\n",item.fname.get(),item.num(),item.size,item.modified.get());
                 }
             }
         }
@@ -2381,7 +2381,7 @@ class CXRefManager: public CXRefManagerBase
             ForEachItemIn(i,orphanlist) {
                 COrphanEntry &item = orphanlist.item(i);
                 if (item.complete()&&!item.isSingleton()) {
-                    outf("%s,%d,%"I64F"d,%s %s\n",item.fname.get(),item.num(),item.size,item.modified.get(),item.misplaced?item.misplaced->lname.get():"");
+                    outf("%s,%d,%" I64F "d,%s %s\n",item.fname.get(),item.num(),item.size,item.modified.get(),item.misplaced?item.misplaced->lname.get():"");
                 }
             }
         }
@@ -2396,7 +2396,7 @@ class CXRefManager: public CXRefManagerBase
                     if (!item.primaryresolved[j0a]&&!item.replicateresolved[j0a]) 
                         incomplete = true;
                 if (incomplete&&(!item.outsidedir)&&(item.outsidenodes.ordinality()==0)&&(item.primarynum!=item.max)) {
-                    outf("%s,%d,%d,%d,%"I64F"d\n",item.lname.get(),item.primarynum,item.replicatenum,item.max,item.totalsize);
+                    outf("%s,%d,%d,%d,%" I64F "d\n",item.lname.get(),item.primarynum,item.replicatenum,item.max,item.totalsize);
                     item.done = true;
                 }
             }
@@ -2406,7 +2406,7 @@ class CXRefManager: public CXRefManagerBase
             ForEachItemIn(i,logicalnamelist) {
                 CLogicalNameEntry &item = logicalnamelist.item(i);
                 if (!item.outsidedir&&(item.outsidenodes.ordinality()==0)&&(item.primarynum!=item.max)) {
-                    outf("%s,%d,%d,%"I64F"d\n",item.lname.get(),item.primarynum,item.max,item.totalsize);
+                    outf("%s,%d,%d,%" I64F "d\n",item.lname.get(),item.primarynum,item.max,item.totalsize);
                     item.done = true;
                 }
             }
@@ -2416,7 +2416,7 @@ class CXRefManager: public CXRefManagerBase
             ForEachItemIn(i,logicalnamelist) {
                 CLogicalNameEntry &item = logicalnamelist.item(i);
                 if (!item.outsidedir&&(item.outsidenodes.ordinality()==0)&&(item.replicatenum!=item.max)) {
-                    outf("%s,%d,%d,%"I64F"d\n",item.lname.get(),item.replicatenum,item.max,item.totalsize);
+                    outf("%s,%d,%d,%" I64F "d\n",item.lname.get(),item.replicatenum,item.max,item.totalsize);
                     item.done = true;
                 }
             }

+ 2 - 2
dali/ft/daft.cpp

@@ -208,7 +208,7 @@ offset_t CDistributedFileSystem::getSize(IDistributedFile * file, bool forceget,
             lock.queryAttributes().setPropInt64("@size", totalSize);
         }
     }
-    //LOG(MCdebugInfo(1000), unknownJob, "DFS: getSize(%s)=%"I64F"d", file->queryLogicalName(), totalSize);
+    //LOG(MCdebugInfo(1000), unknownJob, "DFS: getSize(%s)=%" I64F "d", file->queryLogicalName(), totalSize);
     return totalSize;
 }
 
@@ -266,7 +266,7 @@ offset_t CDistributedFileSystem::getSize(IDistributedFilePart * part, bool force
         }
     }
 
-    //LOG(MCdebugInfo(2000), unknownJob, "DFS: getSize(%s)=%"I64F"d", part->queryPartName(), size);
+    //LOG(MCdebugInfo(2000), unknownJob, "DFS: getSize(%s)=%" I64F "d", part->queryPartName(), size);
     return size;
 }
 

+ 50 - 4
dali/ft/daftformat.cpp

@@ -178,6 +178,12 @@ void CPartitioner::getRecordStructure(StringBuffer & _recordStructure)
 
 //----------------------------------------------------------------------------
 
+CSimpleFixedPartitioner::CSimpleFixedPartitioner(unsigned _recordSize, bool _noTranslation)
+{
+    LOG(MCdebugProgressDetail, unknownJob, "CSimpleFixedPartitioner::CSimpleFixedPartitioner( _recordSize:%d, _noTranslation:%d)", _recordSize, _noTranslation);
+    recordSize = _recordSize;
+    noTranslation = _noTranslation;
+}
 
 void CSimpleFixedPartitioner::findSplitPoint(offset_t splitOffset, PartitionCursor & cursor)
 {
@@ -200,6 +206,7 @@ void CSimpleFixedPartitioner::setPartitionRange(offset_t _totalSize, offset_t _t
 
 CSimpleBlockedPartitioner::CSimpleBlockedPartitioner(bool _noTranslation) : CSimpleFixedPartitioner(EFX_BLOCK_SIZE, _noTranslation)
 {
+    LOG(MCdebugProgressDetail, unknownJob, "CSimpleBlockedPartitioner::CSimpleBlockedPartitioner( _noTranslation:%d)", _noTranslation);
 }
 
 //----------------------------------------------------------------------------
@@ -256,7 +263,7 @@ void CInputBasePartitioner::findSplitPoint(offset_t splitOffset, PartitionCursor
         {
             // Display progress
             oldInputOffset = nextInputOffset;
-            LOG(MCdebugProgressDetail, unknownJob, "findSplitPoint(splitOffset:%"I64F"d) progress: %3.0f%% done.", splitOffset, (double)100.0*(double)nextInputOffset/(double)splitOffset);
+            LOG(MCdebugProgressDetail, unknownJob, "findSplitPoint(splitOffset:%" I64F "d) progress: %3.0f%% done.", splitOffset, (double)100.0*(double)nextInputOffset/(double)splitOffset);
         }
 
         inputOffset = nextInputOffset;
@@ -305,7 +312,7 @@ void CInputBasePartitioner::findSplitPoint(offset_t splitOffset, PartitionCursor
 
     cursor.inputOffset = inputOffset;
     cursor.nextInputOffset = nextInputOffset;
-    LOG(MCdebugProgressDetail, unknownJob, "findSplitPoint(splitOffset:%"I64F"d) progress: %3.0f%% done.", splitOffset, 100.0);
+    LOG(MCdebugProgressDetail, unknownJob, "findSplitPoint(splitOffset:%" I64F "d) progress: %3.0f%% done.", splitOffset, 100.0);
 }
 
 
@@ -420,6 +427,7 @@ unsigned CInputBasePartitioner::transformBlock(offset_t endOffset, TransformCurs
 
 CFixedPartitioner::CFixedPartitioner(size32_t _recordSize) : CInputBasePartitioner(0, _recordSize)
 {
+    LOG(MCdebugProgressDetail, unknownJob, "CFixedPartitioner::CFixedPartitioner( recordSize:%d)", recordSize);
     recordSize = _recordSize;
 }
 
@@ -438,6 +446,7 @@ size32_t CFixedPartitioner::getTransformRecordSize(const byte * record, unsigned
 
 CBlockedPartitioner::CBlockedPartitioner() : CFixedPartitioner(EFX_BLOCK_SIZE)
 {
+    LOG(MCdebugProgressDetail, unknownJob, "CBlockedPartitioner::CBlockedPartitioner()");
 }
 
 
@@ -451,6 +460,7 @@ void CBlockedPartitioner::setTarget(IOutputProcessor * _target)
 
 CVariablePartitioner::CVariablePartitioner(bool _bigendian) : CInputBasePartitioner(sizeof(varLenType), EXPECTED_VARIABLE_LENGTH)
 {
+    LOG(MCdebugProgressDetail, unknownJob, "CVariablePartitioner::CVariablePartitioner(_bigendian:%d)", _bigendian);
     assertex(sizeof(varLenType) == 4);
     bigendian = _bigendian;
 }
@@ -491,6 +501,7 @@ void CVariablePartitioner::setTarget(IOutputProcessor * _target)
 
 CRECFMvbPartitioner::CRECFMvbPartitioner(bool blocked) : CInputBasePartitioner(blocked?BDW_SIZE:RDW_SIZE, EXPECTED_VARIABLE_LENGTH)
 {
+    LOG(MCdebugProgressDetail, unknownJob, "CRECFMvbPartitioner::CRECFMvbPartitioner(blocked:%d)", blocked);
     isBlocked = blocked;
 }
 
@@ -564,7 +575,7 @@ size32_t CRECFMvbPartitioner::getTransformRecordSize(const byte * record, unsign
 
 unsigned CRECFMvbPartitioner::transformBlock(offset_t endOffset, TransformCursor & cursor)
 {
-    LOG(MCdebugProgressDetail, unknownJob, "CRECFMvbPartitioner::transformBlock(offset_t endOffset: %"I64F"d (0x%016"I64F"x), TransformCursor & cursor)", endOffset ,endOffset);
+    LOG(MCdebugProgressDetail, unknownJob, "CRECFMvbPartitioner::transformBlock(offset_t endOffset: %" I64F "d (0x%016" I64F "x), TransformCursor & cursor)", endOffset ,endOffset);
     const byte *buffer = bufferBase();
     offset_t startOffset = cursor.inputOffset;
     offset_t inputOffset = startOffset;
@@ -631,6 +642,12 @@ unsigned CRECFMvbPartitioner::transformBlock(offset_t endOffset, TransformCursor
 
 CCsvPartitioner::CCsvPartitioner(const FileFormat & _format) : CInputBasePartitioner(_format.maxRecordSize, _format.maxRecordSize)
 {
+    LOG(MCdebugProgressDetail, unknownJob, "CCsvPartitioner::CCsvPartitioner(_format :'%s', maxRecordSize:%d)", _format.getFileFormatTypeString(), _format.maxRecordSize);
+    LOG(MCdebugProgressDetail, unknownJob, "        separator :'%s'", _format.separate.get());
+    LOG(MCdebugProgressDetail, unknownJob, "        quote     :'%s'", _format.quote.get());
+    LOG(MCdebugProgressDetail, unknownJob, "        terminator:'%s'", _format.terminate.get());
+    LOG(MCdebugProgressDetail, unknownJob, "        escape    :'%s'", _format.escape.get());
+
     maxElementLength = 1;
     format.set(_format);
     addActionList(matcher, format.separate.get() ? format.separate.get() : "\\,", SEPARATOR, &maxElementLength);
@@ -868,6 +885,12 @@ void CCsvPartitioner::setTarget(IOutputProcessor * _target)
 
 // A quick version of the csv partitioner that jumps to the split offset, and then searches for a terminator.
 
+CCsvQuickPartitioner::CCsvQuickPartitioner(const FileFormat & _format, bool _noTranslation) : CCsvPartitioner(_format)
+{
+    LOG(MCdebugProgressDetail, unknownJob, "CCsvQuickPartitioner::CCsvQuickPartitioner(_format.type :'%s', _noTranslation:%d)", _format.getFileFormatTypeString(), _noTranslation);
+    noTranslation = _noTranslation;
+}
+
 void CCsvQuickPartitioner::findSplitPoint(offset_t splitOffset, PartitionCursor & cursor)
 {
     const byte *buffer = bufferBase();
@@ -957,6 +980,11 @@ void CCsvQuickPartitioner::findSplitPoint(offset_t splitOffset, PartitionCursor
 
 CUtfPartitioner::CUtfPartitioner(const FileFormat & _format) : CInputBasePartitioner(_format.maxRecordSize, _format.maxRecordSize)
 {
+    LOG(MCdebugProgressDetail, unknownJob, "CUtfPartitioner::CUtfPartitioner(_format.type :'%s', maxRecordSize:%d)", _format.getFileFormatTypeString(), _format.maxRecordSize);
+    LOG(MCdebugProgressDetail, unknownJob, "        separator :'%s'", _format.separate.get());
+    LOG(MCdebugProgressDetail, unknownJob, "        quote     :'%s'", _format.quote.get());
+    LOG(MCdebugProgressDetail, unknownJob, "        terminator:'%s'", _format.terminate.get());
+
     maxElementLength = 1;
     format.set(_format);
     utfFormat = getUtfFormatType(format.type);
@@ -1194,6 +1222,12 @@ void CUtfPartitioner::setTarget(IOutputProcessor * _target)
 
 // A quick version of the Utf partitioner that jumps to the split offset, and then searches for a terminator.
 
+CUtfQuickPartitioner::CUtfQuickPartitioner(const FileFormat & _format, bool _noTranslation) : CUtfPartitioner(_format)
+{
+    LOG(MCdebugProgressDetail, unknownJob, "CUtfQuickPartitioner::CUtfQuickPartitioner(_format.type :'%s', _noTranslation:%d)", _format.getFileFormatTypeString(), _noTranslation);
+    noTranslation = _noTranslation;
+}
+
 void CUtfQuickPartitioner::findSplitPoint(offset_t splitOffset, PartitionCursor & cursor)
 {
     const byte *buffer = bufferBase();
@@ -1321,6 +1355,7 @@ size32_t BufferedDirectReader::ensure(size32_t required)
 
 XmlSplitter::XmlSplitter(const FileFormat & format)
 {
+    LOG(MCdebugProgressDetail, unknownJob, "XmlSplitter::XmlSplitter(_format.type :'%s', format.rowTag:'%s')", format.getFileFormatTypeString(), format.rowTag.get());
     maxElementLength = 1;
     utfFormat = getUtfFormatType(format.type);
     StringBuffer openTag, closeTag, endTag, endCloseTag;
@@ -1544,6 +1579,7 @@ offset_t XmlSplitter::getFooterLength(BufferedDirectReader & reader, offset_t si
 
 CXmlPartitioner::CXmlPartitioner(const FileFormat & _format) : CInputBasePartitioner(_format.maxRecordSize, _format.maxRecordSize), splitter(_format)
 {
+    LOG(MCdebugProgressDetail, unknownJob, "CXmlPartitioner::CXmlPartitioner(_format.type :'%s', unitSize:%d)", _format.getFileFormatTypeString(), format.getUnitSize());
     format.set(_format);
     unitSize = format.getUnitSize();
     utfFormat = getUtfFormatType(format.type);
@@ -1573,13 +1609,19 @@ void CXmlPartitioner::setTarget(IOutputProcessor * _target)
 
 // A quick version of the Utf partitioner that jumps to the split offset, and then searches for a terminator.
 
+CXmlQuickPartitioner::CXmlQuickPartitioner(const FileFormat & _format, bool _noTranslation) : CXmlPartitioner(_format)
+{
+    LOG(MCdebugProgressDetail, unknownJob, "CXmlQuickPartitioner::CXmlQuickPartitioner(_format.type :'%s', _noTranslation:%d)", _format.getFileFormatTypeString(), _noTranslation);
+    noTranslation = _noTranslation;
+}
+
 void CXmlQuickPartitioner::findSplitPoint(offset_t splitOffset, PartitionCursor & cursor)
 {
     const byte *buffer = bufferBase();
     numInBuffer = bufferOffset = 0;
     if (splitOffset != 0)
     {
-        LOG(MCdebugProgressDetail, unknownJob, "CXmlQuickPartitioner::findSplitPoint(splitOffset:%"I64F"d)", splitOffset);
+        LOG(MCdebugProgressDetail, unknownJob, "CXmlQuickPartitioner::findSplitPoint(splitOffset:%" I64F "d)", splitOffset);
         unsigned delta = (unsigned)(splitOffset & (unitSize-1));
         if (delta)
             splitOffset += (unitSize - delta);
@@ -1629,6 +1671,7 @@ void CXmlQuickPartitioner::findSplitPoint(offset_t splitOffset, PartitionCursor
 CRemotePartitioner::CRemotePartitioner(const SocketEndpoint & _ep, const FileFormat & _srcFormat, const FileFormat & _tgtFormat, const char * _slave, const char *_wuid)
     : wuid(_wuid)
 {
+    LOG(MCdebugProgressDetail, unknownJob, "CRemotePartitioner::CRemotePartitioner(_srcFormat.type :'%s', _tgtFormat.type:'%s', _slave:'%s', _wuid:'%s')", _srcFormat.getFileFormatTypeString(), _tgtFormat.getFileFormatTypeString(), _slave, _wuid);
     ep.set(_ep);
     srcFormat.set(_srcFormat);
     tgtFormat.set(_tgtFormat);
@@ -2051,6 +2094,7 @@ IFormatProcessor * createFormatProcessor(const FileFormat & srcFormat, const Fil
 {
     IFormatProcessor * partitioner;
     bool sameFormats = srcFormat.equals(tgtFormat);
+    LOG(MCdebugProgressDetail, unknownJob, "createFormatProcessor(srcFormat:'%s', tgtFormat:'%s', calcOutput:%d, sameFormats:%d)", srcFormat.getFileFormatTypeString(), tgtFormat.getFileFormatTypeString(), calcOutput, sameFormats);
     switch (srcFormat.type)
     {
     case FFTfixed:
@@ -2108,6 +2152,7 @@ IFormatProcessor * createFormatProcessor(const FileFormat & srcFormat, const Fil
 
 IOutputProcessor * createOutputProcessor(const FileFormat & format)
 {
+    LOG(MCdebugProgressDetail, unknownJob, "createOutputProcessor(format.type:'%s')", format.getFileFormatTypeString());
     switch (format.type)
     {
     case FFTfixed:
@@ -2129,6 +2174,7 @@ IOutputProcessor * createOutputProcessor(const FileFormat & format)
 IFormatPartitioner * createFormatPartitioner(const SocketEndpoint & ep, const FileFormat & srcFormat, const FileFormat & tgtFormat, bool calcOutput, const char * slave, const char *wuid)
 {
     bool sameFormats = sameEncoding(srcFormat, tgtFormat);
+    LOG(MCdebugProgressDetail, unknownJob, "createFormatProcessor(srcFormat.type:'%s', tgtFormat.type:'%s', calcOutput:%d, sameFormats:%d)", srcFormat.getFileFormatTypeString(), tgtFormat.getFileFormatTypeString(), calcOutput, sameFormats);
     if (sameFormats)
     {
         switch (srcFormat.type)

+ 4 - 8
dali/ft/daftformat.ipp

@@ -81,7 +81,7 @@ public:
 class DALIFT_API CSimpleFixedPartitioner : public CSimplePartitioner
 {
 public:
-    CSimpleFixedPartitioner(unsigned _recordSize, bool _noTranslation) { recordSize = _recordSize; noTranslation = _noTranslation; }
+    CSimpleFixedPartitioner(unsigned _recordSize, bool _noTranslation);
 
     virtual void setPartitionRange(offset_t _totalSize, offset_t _thisOffset, offset_t _thisSize, unsigned _thisHeaderSize, unsigned _numParts);
 
@@ -268,11 +268,7 @@ protected:
 class DALIFT_API CCsvQuickPartitioner : public CCsvPartitioner
 {
 public:
-    CCsvQuickPartitioner(const FileFormat & _format, bool _noTranslation) 
-        : CCsvPartitioner(_format)
-    {
-        noTranslation = _noTranslation;
-    }
+    CCsvQuickPartitioner(const FileFormat & _format, bool _noTranslation);
 
 protected:
     virtual void findSplitPoint(offset_t curOffset, PartitionCursor & cursor);
@@ -324,7 +320,7 @@ protected:
 class DALIFT_API CUtfQuickPartitioner : public CUtfPartitioner
 {
 public:
-    CUtfQuickPartitioner(const FileFormat & _format, bool _noTranslation) : CUtfPartitioner(_format) { noTranslation = _noTranslation; }
+    CUtfQuickPartitioner(const FileFormat & _format, bool _noTranslation);
 
 protected:
     virtual void findSplitPoint(offset_t curOffset, PartitionCursor & cursor);
@@ -403,7 +399,7 @@ protected:
 class DALIFT_API CXmlQuickPartitioner : public CXmlPartitioner
 {
 public:
-    CXmlQuickPartitioner(const FileFormat & _format, bool _noTranslation) : CXmlPartitioner(_format) { noTranslation = _noTranslation; }
+    CXmlQuickPartitioner(const FileFormat & _format, bool _noTranslation);
 
 protected:
     virtual void findSplitPoint(offset_t curOffset, PartitionCursor & cursor);

+ 1 - 1
dali/ft/daftprogress.cpp

@@ -136,7 +136,7 @@ void DemoProgress::displayProgress(unsigned percentDone, unsigned secsLeft, cons
                             unsigned kbPerSecondAve, unsigned kbPerSecondRate, unsigned numNodes)
 {
 
-    LOG(MCdebugProgress, unknownJob, "Progress: %d%% done, %s left.  (%"I64F"d/%"I64F"d%s @Ave(%dKB/s) Rate(%dKB/s) [%d/%d]", 
+    LOG(MCdebugProgress, unknownJob, "Progress: %d%% done, %s left.  (%" I64F "d/%" I64F "d%s @Ave(%dKB/s) Rate(%dKB/s) [%d/%d]",
             percentDone, timeLeft, scaledDone, scaledTotal, scale, kbPerSecondAve, kbPerSecondRate, numNodes, totalNodes);
 }
 

+ 2 - 2
dali/ft/filecopy.cpp

@@ -388,7 +388,7 @@ bool FileTransferThread::performTransfer()
             newProgress.deserializeExtra(msg, 1);
             sprayer.updateProgress(newProgress);
 
-            LOG(MCdebugProgress(10000), job, "Update %s: %d %"I64F"d->%"I64F"d", url.str(), newProgress.whichPartition, newProgress.inputLength, newProgress.outputLength);
+            LOG(MCdebugProgress(10000), job, "Update %s: %d %" I64F "d->%" I64F "d", url.str(), newProgress.whichPartition, newProgress.inputLength, newProgress.outputLength);
 
             if (isAborting())
             {
@@ -1743,7 +1743,7 @@ void FileSprayer::gatherMissingSourceTarget(IFileDescriptor * source)
                 }
                 else if (secondarySize != -1) 
                 {
-                    LOG(MCwarning, unknownJob, "Replicate - primary and secondary copies have different sizes (%"I64F"d v %"I64F"d) for part %u", primarySize, secondarySize, idx);
+                    LOG(MCwarning, unknownJob, "Replicate - primary and secondary copies have different sizes (%" I64F "d v %" I64F "d) for part %u", primarySize, secondarySize, idx);
                     continue; // ignore copy
                 }
             }

+ 13 - 0
dali/ft/filecopy.hpp

@@ -35,6 +35,18 @@ typedef enum
     FFTrecfmvb, FFTrecfmv, FFTvariablebigendian,
     FFTlast
  } FileFormatType;
+
+static const char * FileFormatTypeStr[] =
+{       "FFTunknown",
+        "FFTfixed", "FFTvariable", "FFTblocked",
+        "FFTcsv",
+        "FFTutf",                             // any format, default to utf-8n
+        "FFTutf8", "FFTutf8n",
+        "FFTutf16", "FFTutf16be", "FFTutf16le",
+        "FFTutf32", "FFTutf32be", "FFTutf32le",
+        "FFTrecfmvb", "FFTrecfmv", "FFTvariablebigendian",
+        "FFTlast"
+};
 enum { FTactionpull, FTactionpush, FTactionpartition, FTactiondirectory, FTactionsize, FTactionpcopy };
 
 
@@ -59,6 +71,7 @@ public:
     void set(const FileFormat & src);
     bool hasQuote() const                           { return (quote == NULL) || (*quote != '\0'); }
     bool hasQuotedTerminator() const                { return quotedTerminator; }
+    const char * getFileFormatTypeString() const        { return FileFormatTypeStr[type]; }
 
 public:
     FileFormatType      type;

+ 2 - 2
dali/ft/ftbase.cpp

@@ -145,7 +145,7 @@ void PartitionPoint::display()
 {
     StringBuffer fulli, fullo;
     LOG(MCdebugInfoDetail, unknownJob, 
-             "Partition %s{%d}[%"I64F"d size %"I64F"d]->%s{%d}[%"I64F"d size %"I64F"d]", 
+             "Partition %s{%d}[%" I64F "d size %" I64F "d]->%s{%d}[%" I64F "d size %" I64F "d]",
              inputName.getPath(fulli).str(), whichInput, inputOffset, inputLength, 
              outputName.getPath(fullo).str(), whichOutput, outputOffset, outputLength);
 }
@@ -548,7 +548,7 @@ MemoryBuffer & OutputProgress::deserializeExtra(MemoryBuffer & in, unsigned vers
 static const char * const statusText[] = {"Init","Active","Copied","Renamed"};
 void OutputProgress::trace()
 {
-    LOG(MCdebugInfoDetail, unknownJob, "[%d] %s  %"I64F"d[%x]->%"I64F"d[%x]", whichPartition, statusText[status], inputLength, inputCRC, outputLength, outputCRC);
+    LOG(MCdebugInfoDetail, unknownJob, "[%d] %s  %" I64F "d[%x]->%" I64F "d[%x]", whichPartition, statusText[status], inputLength, inputCRC, outputLength, outputCRC);
 }
 
 MemoryBuffer & OutputProgress::serializeCore(MemoryBuffer & out)        

+ 4 - 4
dali/ft/fterror.hpp

@@ -126,7 +126,7 @@
 #define DFTERR_PrefixCannotAlsoAddHeader_Text   "Cannot add length prefixes and also add headers"
 #define DFTERR_InvalidPrefixFormat_Text         "Invalid length prefix: '%s'"
 #define DFTERR_PrefixTooSmall_Text              "Length prefix too small to store source length"
-#define DFTERR_UnexpectedReadFailure_Text       "Unexpected read failure at file %s[%"I64F"d]"
+#define DFTERR_UnexpectedReadFailure_Text       "Unexpected read failure at file %s[%" I64F "d]"
 #define DFTERR_NoPartsInDestination_Text        "Destination does not have any parts"
 #define DFTERR_PhysicalExistsNoOverwrite_Text   "OVERWRITE not supplied and physical file %s exists"
 #define DFTERR_InvalidSplitPrefixFormat_Text    "Cannot process file %s using the splitprefix supplied"
@@ -138,7 +138,7 @@
 #define DFTERR_CannotPushAndCompress_Text       "Need to pull the data when compressing the output"
 #define DFTERR_CannotFindFirstXmlRecord_Text    "Could not find the start of the first record"
 #define DFTERR_CouldNotOpenCompressedFile_Text  "Could not open file %s as compressed file"
-#define DFTERR_EndOfXmlRecordNotFound_Text      "End of XML record not found (need to increase maxRecordSize?)! At offset:%"I64F"d, record size (>%d bytes) is larger than expected maxRecordSize (%d bytes)."
+#define DFTERR_EndOfXmlRecordNotFound_Text      "End of XML record not found (need to increase maxRecordSize?)! At offset:%" I64F "d, record size (>%d bytes) is larger than expected maxRecordSize (%d bytes)."
 #define DFTERR_EndOfCsvRecordNotFound_Text      "End of CSV record not found (wrong record terminator defined or need to increase maxRecordSize?) after processing %d bytes!"
 #define DFTERR_EndOfUtfRecordNotFound_Text      "End of UTF record not found (wrong record terminator defined or need to increase maxRecordSize?) after processing %d bytes!"
 #define DFTERR_WrongRECFMvRecordDescriptorWord_Text  "RECFMv(b) file Record Description Word contains invalid data (0x%04x) or the file is not RECFMv(b) format!"
@@ -148,11 +148,11 @@
 #define DFTERR_WrongSplitRecordSize_Text        "Invalid Record Size (%d, 0x%08x)!"
 
 #define DFTERR_UnknownFormatType_Text           "INTERNAL: Save unknown format type"
-#define DFTERR_OutputOffsetMismatch_Text        "INTERNAL: Output offset does not match expected (%"I64F"d expected %"I64F"d) at %s of block %d"
+#define DFTERR_OutputOffsetMismatch_Text        "INTERNAL: Output offset does not match expected (%" I64F "d expected %" I64F "d) at %s of block %d"
 #define DFTERR_NoSolarisDir_Text                "Directory not yet supported for solaris"
 #define DFTERR_NoSolarisCopy_Text               "Copy not yet supported for solaris"
 #define DFTERR_ReplicateSameFormat_Text         "INTERNAL: Replicate cannot convert formats"
-#define DFTERR_PartitioningZeroSizedRowLink_Text        "Zero sized row link in source file at %"I64F"d - cannot partition"
+#define DFTERR_PartitioningZeroSizedRowLink_Text        "Zero sized row link in source file at %" I64F "d - cannot partition"
 #define DFTERR_CopyAborted_Text                 "Copy failed - User Abort"
 #define DFTERR_WrongComputer_Text               "INTERNAL: Command send to wrong computer.  Expected %s got %s"
 

+ 4 - 4
dali/ft/fttransform.cpp

@@ -535,7 +535,7 @@ void TransferServer::appendTransformed(unsigned chunkIndex, ITransformer * input
             offset_t outputOffset = out->tell();
             offset_t inputOffset = input->tell();
             if (totalLengthToRead)
-                LOG(MCdebugProgress, unknownJob, "Progress: %d%% done. [%"I64F"u]", (unsigned)(totalLengthRead*100/totalLengthToRead), (unsigned __int64)totalLengthRead);
+                LOG(MCdebugProgress, unknownJob, "Progress: %d%% done. [%" I64F "u]", (unsigned)(totalLengthRead*100/totalLengthToRead), (unsigned __int64)totalLengthRead);
 
             curProgress.status = (gotLength == 0) ? OutputProgress::StatusCopied : OutputProgress::StatusActive;
             curProgress.inputLength = input->tell()-startInputOffset;
@@ -669,7 +669,7 @@ void TransferServer::transferChunk(unsigned chunkIndex)
     PartitionPoint & curPartition = partition.item(chunkIndex);
     OutputProgress & curProgress = progress.item(chunkIndex);
 
-    LOG(MCdebugProgress, unknownJob, "Begin to transfer chunk %d: Start at length %"I64F"d", chunkIndex, curProgress.inputLength);
+    LOG(MCdebugProgress, unknownJob, "Begin to transfer chunk %d: Start at length %" I64F "d", chunkIndex, curProgress.inputLength);
     const unsigned __int64 startOutOffset = out->tell();
     if (startOutOffset != curPartition.outputOffset+curProgress.outputLength)
         throwError4(DFTERR_OutputOffsetMismatch, out->tell(), curPartition.outputOffset+curProgress.outputLength, "start", chunkIndex);
@@ -754,7 +754,7 @@ bool TransferServer::pull()
             unsigned __int64 progressOffset = curOutputOffset + curProgress.outputLength;
             if (progressOffset > size)
             {
-                LOG(MCwarning, unknownJob, "Recovery information seems to be invalid (%"I64F"d %"I64F"d) start copying from the beginning",
+                LOG(MCwarning, unknownJob, "Recovery information seems to be invalid (%" I64F "d %" I64F "d) start copying from the beginning",
                          size, progressOffset);
                 //reset any remaining partitions...
                 for (i = start; i < numPartitions; i++)
@@ -849,7 +849,7 @@ processedProgress:
                     char null = 0;
                     offset_t lastOffset = lastChunk.outputOffset+lastChunk.outputLength;
                     outio->write(lastOffset-sizeof(null),sizeof(null),&null);
-                    LOG(MCdebugProgress, unknownJob, "Extend length of target file to %"I64F"d", lastOffset);
+                    LOG(MCdebugProgress, unknownJob, "Extend length of target file to %" I64F "d", lastOffset);
                 }
             }
 

+ 3 - 3
dali/fuse/dafuse.cpp

@@ -638,7 +638,7 @@ class CFuseDaliDFS: public CFuseBase
     {
         offset_t pos = _pos;
         size32_t sz = _sz;
-        PROGLOG("fuse_read(%s,,%d,%"I64F"d,)",path,sz,pos);
+        PROGLOG("fuse_read(%s,,%d,%" I64F "d,)",path,sz,pos);
         int ret = 0;
         try {
             unsigned h = (unsigned)info->fh;
@@ -661,7 +661,7 @@ class CFuseDaliDFS: public CFuseBase
                 IDistributedFilePart &part = file->queryPart(pn);
                 offset_t psz = part.getFileSize(true,false);
                 size32_t toread = (psz-pos-base<(offset_t)sz)?((size32_t)(psz-pos-base)):sz;
-                PROGLOG("reading %d from part %d size %"I64F"d pos = %"I64F"d base=%"I64F"d",toread,pn,psz,pos,base);
+                PROGLOG("reading %d from part %d size %" I64F "d pos = %" I64F "d base=%" I64F "d",toread,pn,psz,pos,base);
                 RemoteFilename rfn;
                 part.getFilename(rfn,0);
                 Owned<IFile> partfile = createIFile(rfn);
@@ -706,7 +706,7 @@ class CFuseDaliDFS: public CFuseBase
                         srcio.setown(cmpio.getClear());
                 }
                 size32_t szrd = srcio->read(pos-base,toread,dst);
-                PROGLOG("Read %s offset %"I64F"d len %d returned %d",partfile->queryFilename(),pos-base,toread,szrd);
+                PROGLOG("Read %s offset %" I64F "d len %d returned %d",partfile->queryFilename(),pos-base,toread,szrd);
                 sz -= szrd;
                 dst += szrd;
                 ret += szrd;

+ 4 - 4
dali/sasha/sacoalescer.cpp

@@ -52,7 +52,7 @@ void coalesceDatastore(bool force)
         offset_t minDeltaSize = force?0:coalesceProps->getPropInt64("@minDeltaSize", DEFAULT_MINDELTASIZE);
 
         loop {
-            PROGLOG("COALESCER: dataPath=%s, backupPath=%s, minDeltaSize = %"I64F"dK", dataPath.str(), backupPath.str(), (unsigned __int64) minDeltaSize);
+            PROGLOG("COALESCER: dataPath=%s, backupPath=%s, minDeltaSize = %" I64F "dK", dataPath.str(), backupPath.str(), (unsigned __int64) minDeltaSize);
             unsigned configFlags = SH_External|SH_CheckNewDelta;
             configFlags |= coalesceProps->getPropBool("@recoverFromIncErrors", false) ? SH_RecoverFromIncErrors : 0;
             configFlags |= coalesceProps->getPropBool("@backupErrorFiles", true) ? SH_BackupErrorFiles : 0;
@@ -75,7 +75,7 @@ void coalesceDatastore(bool force)
                         break;
                     offset_t dsz = deltaIFile->size();
                     if (minDeltaSize > dsz/1024) {
-                        PROGLOG("COALESCER: Delta size %"I64F"d less than minimum, exiting",dsz);
+                        PROGLOG("COALESCER: Delta size %" I64F "d less than minimum, exiting",dsz);
                         break;
                     }
                 }
@@ -91,7 +91,7 @@ void coalesceDatastore(bool force)
             OwnedIFile storeIFile = createIFile(storeFilename.str());
             if (storeIFile->exists())
             {
-                PROGLOG("Loading store: %s, size=%"I64F"d", storeFilename.str(), storeIFile->size());
+                PROGLOG("Loading store: %s, size=%" I64F "d", storeFilename.str(), storeIFile->size());
                 _root.setown(createPTreeFromXMLFile(storeFilename.str()));
                 PROGLOG("Loaded: %s", storeFilename.str());
             }
@@ -125,7 +125,7 @@ void coalesceDatastore(bool force)
             OwnedIFile detachedIFile = createIFile(detachPath.str());
             if (detachedIFile->exists() || iStoreHelper->detachCurrentDelta())
             {
-                PROGLOG("COALESCER: Loading delta: %s, size=%"I64F"d", detachName.str(), detachedIFile->size());
+                PROGLOG("COALESCER: Loading delta: %s, size=%" I64F "d", detachName.str(), detachedIFile->size());
                 bool noError;
                 Owned<IException> deltaE;
                 try { noError = iStoreHelper->loadDelta(detachName.str(), detachedIFile, root); }

+ 6 - 6
deployment/configgen/main.cpp

@@ -47,11 +47,11 @@ void usage()
   puts("          configgencomplist.xml. If not specified, the following ");
   puts("          defaults are used. ");
   puts("          For win32, 'c:\\trunk\\initfiles\\componentfiles\\configxml'");
-  puts("          For Linux, '"COMPONENTFILES_DIR"/configxml/'");
+  puts("          For Linux, '" COMPONENTFILES_DIR "/configxml/'");
   puts("   -od <output directory>: The output directory for the generated files.");
   puts("          If not specified, the following defaults are used. ");
   puts("          For win32, '.'");
-  puts("          For Linux, '"CONFIG_DIR"'");
+  puts("          For Linux, '" CONFIG_DIR "'");
   puts("   -ldapconfig : Generates a .ldaprc file and puts it in the specified");
   puts("          output directory. If output directory is not specified,");
   puts("          default output directory is used as mentioned in -od option");
@@ -325,7 +325,7 @@ int processRequest(const char* in_cfgname, const char* out_dirname, const char*
     }
 
     StringBuffer out;
-    xPath.clear().append(XML_TAG_SOFTWARE"/"XML_TAG_LDAPSERVERPROCESS);
+    xPath.clear().append(XML_TAG_SOFTWARE "/" XML_TAG_LDAPSERVERPROCESS);
     Owned<IPropertyTreeIterator> ldaps = pEnv->getElements(xPath.str());
     Owned<IPropertyTree> pSelComps(createPTree("SelectedComponents"));
     bool flag = false;
@@ -415,7 +415,7 @@ int processRequest(const char* in_cfgname, const char* out_dirname, const char*
 
     //Lookup and output all LDAPServer components
     StringBuffer out;
-    xPath.clear().append(XML_TAG_SOFTWARE"/"XML_TAG_LDAPSERVERPROCESS);
+    xPath.clear().append(XML_TAG_SOFTWARE "/" XML_TAG_LDAPSERVERPROCESS);
     Owned<IPropertyTreeIterator> ldaps = pEnv->getElements(xPath.str());
 
     ForEach(*ldaps)
@@ -536,7 +536,7 @@ int processRequest(const char* in_cfgname, const char* out_dirname, const char*
   else if (listESPServices == true)
   {
       StringBuffer out;
-      Owned<IPropertyTreeIterator> espProcesses = pEnv->getElements(XML_TAG_SOFTWARE"/"XML_TAG_ESPPROCESS);
+      Owned<IPropertyTreeIterator> espProcesses = pEnv->getElements(XML_TAG_SOFTWARE "/" XML_TAG_ESPPROCESS);
 
       ForEach(*espProcesses)
       {
@@ -604,7 +604,7 @@ int processRequest(const char* in_cfgname, const char* out_dirname, const char*
       const char* name = pComputer->queryProp(XML_ATTR_NAME);
       bool isNonHPCCNode = true;
 
-      xpath.clear().appendf(XML_TAG_SOFTWARE"/*[//"XML_ATTR_COMPUTER"='%s']", name);
+      xpath.clear().appendf(XML_TAG_SOFTWARE "/*[//" XML_ATTR_COMPUTER "='%s']", name);
       Owned<IPropertyTreeIterator> it = pEnv->getElements(xpath.str());
 
       ForEach(*it)

+ 2 - 2
deployment/configutils/confighelper.cpp

@@ -283,7 +283,7 @@ void CConfigHelper::addNewComponentsFromBuildSetToEnv(IPropertyTree *pEnvTree) c
         if (pEnvTree->hasProp(xpath.str()) == true)
             continue;
 
-        pEnvTree->queryPropTree(XML_TAG_PROGRAMS"/"XML_TAG_BUILD)->addPropTree(XML_TAG_BUILDSET, createPTreeFromIPT(m_pDefBldSet->queryPropTree(xpath.str())));
+        pEnvTree->queryPropTree(XML_TAG_PROGRAMS "/" XML_TAG_BUILD)->addPropTree(XML_TAG_BUILDSET, createPTreeFromIPT(m_pDefBldSet->queryPropTree(xpath.str())));
     }
 }
 
@@ -356,7 +356,7 @@ void CConfigHelper::addPluginsToConfigGenCompList(IPropertyTree *pCGenComplist,
                 ForEach(*pCGenCompListIterator)
                 {
                     StringBuffer strXPath2(XML_TAG_COMPONENT);
-                    StringBuffer strXPath3(XML_TAG_COMPONENT"/"XML_TAG_FILE);
+                    StringBuffer strXPath3(XML_TAG_COMPONENT "/" XML_TAG_FILE);
 
                     const char *pServiceName = pCGenCompListIterator->query().queryProp(XML_ATTR_NAME);
                     strXPath2.appendf("[%s='%s']", XML_ATTR_NAME, pServiceName);

+ 2 - 2
deployment/deploy/configgenengine.cpp

@@ -376,13 +376,13 @@ void CConfigGenEngine::createFakePlugins(StringBuffer& destFilePath) const
     StringBuffer tmpoutbuf("<?xml version=\"1.0\" encoding=\"UTF-8\"?><Plugins/>");
 
     if (m_instances.ordinality() > 1 && strcmp(m_process.queryName(), XML_TAG_ESPPROCESS))
-        destFilePath.replaceString("@temp"PATHSEPSTR, m_cachePath);
+        destFilePath.replaceString("@temp" PATHSEPSTR, m_cachePath);
     else
     {
         char tempPath[_MAX_PATH];
         getTempPath(tempPath, sizeof(tempPath), m_name);
         ensurePath(tempPath);
-        destFilePath.replaceString("@temp"PATHSEPSTR, tempPath);
+        destFilePath.replaceString("@temp" PATHSEPSTR, tempPath);
     }
 
     Owned<IFile> pTargetFile = createIFile(destFilePath.str());

+ 1 - 1
deployment/deployutils/computerpicker.cpp

@@ -405,7 +405,7 @@ void CComputerPicker::Refresh()
   int iItem = 0;
   m_pComputerTree.clear();
   m_pComputerTree.setown(createPTree("ComputerList"));
-  Owned<IPropertyTreeIterator> iComputer = m_pRootNode->getElements(XML_TAG_HARDWARE"/"XML_TAG_COMPUTER);
+  Owned<IPropertyTreeIterator> iComputer = m_pRootNode->getElements(XML_TAG_HARDWARE "/" XML_TAG_COMPUTER);
   ForEach (*iComputer)
   {
     // Must have a valid name

+ 11 - 11
deployment/deployutils/configenvhelper.cpp

@@ -65,7 +65,7 @@ bool CConfigEnvHelper::handleThorTopologyOp(const char* cmd, const char* xmlArg,
         {
             IPropertyTree* pComp = &iterComputers->query();
             const char* pszCompName = pComp->queryProp(XML_ATTR_NAME);
-            xpath.clear().appendf(XML_TAG_HARDWARE"/"XML_TAG_COMPUTER"/["XML_ATTR_NAME"='%s']", pszCompName);
+            xpath.clear().appendf(XML_TAG_HARDWARE "/" XML_TAG_COMPUTER "/[" XML_ATTR_NAME "='%s']", pszCompName);
             IPropertyTree* pComputer = m_pRoot->queryPropTree(xpath.str());
 
             if (pComputer)
@@ -146,7 +146,7 @@ bool CConfigEnvHelper::addRoxieServers(const char* xmlArg)
 
   if (pszFarm && strlen(pszFarm))
   {
-    xpath.clear().appendf("RoxieCluster[@name='%s']/"XML_TAG_ROXIE_FARM, pszRoxieCluster);
+    xpath.clear().appendf("RoxieCluster[@name='%s']/" XML_TAG_ROXIE_FARM, pszRoxieCluster);
     pFarm = getSoftwareNode(xpath.str(), pszFarm);
 
     if (pFarm == NULL)
@@ -174,13 +174,13 @@ bool CConfigEnvHelper::addRoxieServers(const char* xmlArg)
   }
   else
   {
-    xpath.clear().appendf("RoxieCluster[@name='%s']/"XML_TAG_ROXIE_FARM, pszRoxieCluster);
+    xpath.clear().appendf("RoxieCluster[@name='%s']/" XML_TAG_ROXIE_FARM, pszRoxieCluster);
     createUniqueName("farm", xpath.str(), sFarmName);
     bNewFarm = true;
 
     Owned<IPropertyTreeIterator> iter = pSrcTree->getElements(XML_TAG_COMPONENT);
       
-    xpath.clear().appendf("RoxieCluster[@name='%s']/"XML_TAG_ROXIE_FARM, pszRoxieCluster);
+    xpath.clear().appendf("RoxieCluster[@name='%s']/" XML_TAG_ROXIE_FARM, pszRoxieCluster);
     pFarm = pParent->addPropTree(xpath.str(), createPTree());
     pFarm->addProp    (XML_ATTR_NAME,       sFarmName.str());
     pFarm->addPropInt("@port", pSrcTree->getPropInt("@port", 9876));
@@ -230,12 +230,12 @@ bool CConfigEnvHelper::handleReplaceRoxieServer(const char* xmlArg)
       if (pServer && pszNewComputer && *pszNewComputer)
       {
         pServer->setProp(XML_ATTR_COMPUTER, pszNewComputer);
-        xpath.clear().appendf(XML_TAG_ROXIECLUSTER"[@name='%s']/"XML_TAG_ROXIE_SERVER"[@name='%s']", pszRoxieCluster, pszName);
+        xpath.clear().appendf(XML_TAG_ROXIECLUSTER"[@name='%s']/" XML_TAG_ROXIE_SERVER "[@name='%s']", pszRoxieCluster, pszName);
         IPropertyTree* pOldVerRoxieServer = pParent->queryPropTree(xpath.str());
         if (pOldVerRoxieServer)
         {
           pOldVerRoxieServer->setProp(XML_ATTR_COMPUTER, pszNewComputer);
-          xpath.clear().appendf("Hardware/"XML_TAG_COMPUTER"["XML_ATTR_NAME"='%s']", pszNewComputer);
+          xpath.clear().appendf("Hardware/" XML_TAG_COMPUTER "[" XML_ATTR_NAME "='%s']", pszNewComputer);
           IPropertyTree* pComputer = m_pRoot->queryPropTree(xpath.str());
           if (pComputer)
             pOldVerRoxieServer->setProp(XML_ATTR_NETADDRESS, pComputer->queryProp(XML_ATTR_NETADDRESS));
@@ -442,7 +442,7 @@ IPropertyTree* CConfigEnvHelper::lookupComputerByName(const char* szName) const
 {
   if (!szName || !*szName) return NULL;
 
-  Owned<IPropertyTreeIterator> iter = m_pRoot->getElements(XML_TAG_HARDWARE"/"XML_TAG_COMPUTER);
+  Owned<IPropertyTreeIterator> iter = m_pRoot->getElements(XML_TAG_HARDWARE "/" XML_TAG_COMPUTER);
   for (iter->first(); iter->isValid(); iter->next())
   {
     const char* szValue = iter->query().queryProp(XML_ATTR_NAME);
@@ -809,14 +809,14 @@ bool CConfigEnvHelper::handleRoxieSlaveConfig(const char* xmlArg)
         if (!pRoxie)
             throw MakeStringException(-1, "Cannot find roxie with name %s", pszRoxie);
 
-        Owned<IPropertyTreeIterator> iterComputers = pSrcTree->getElements(XML_TAG_INSTANCES"/"XML_TAG_INSTANCE);
+        Owned<IPropertyTreeIterator> iterComputers = pSrcTree->getElements(XML_TAG_INSTANCES "/" XML_TAG_INSTANCE);
         IPropertyTreePtrArray computers;
 
         ForEach (*iterComputers)
         {
             IPropertyTree* pComp = &iterComputers->query();
             const char* pszCompName = pComp->queryProp(XML_ATTR_NAME);
-            xpath.clear().appendf(XML_TAG_HARDWARE"/"XML_TAG_COMPUTER"/["XML_ATTR_NAME"='%s']", pszCompName);
+            xpath.clear().appendf(XML_TAG_HARDWARE "/" XML_TAG_COMPUTER "/[" XML_ATTR_NAME "='%s']", pszCompName);
             IPropertyTree* pComputer = m_pRoot->queryPropTree(xpath.str());
             
             if (pComputer)
@@ -952,7 +952,7 @@ void CConfigEnvHelper::UpdateThorAttributes(IPropertyTree* pParentNode)
           if (!multiSlaves)
           {
             StringBuffer xpath(XML_TAG_THORSLAVEPROCESS);
-            xpath.appendf("["XML_ATTR_COMPUTER"='%s']", computer);
+            xpath.appendf("[" XML_ATTR_COMPUTER "='%s']", computer);
 
             Owned<IPropertyTreeIterator> iterNodes = pParentNode->getElements(xpath.str());
             int count = 0;
@@ -1043,7 +1043,7 @@ bool CConfigEnvHelper::CheckTopologyComputerUse(IPropertyTree* pComputerNode, IP
         {
             IPropertyTree* pTree = &iter->query();
             const char* pszComputer = pTree->queryProp(XML_ATTR_COMPUTER);
-            xpath.clear().appendf(XML_TAG_HARDWARE"/"XML_TAG_COMPUTER"["XML_ATTR_NAME"='%s']", pszComputer);
+            xpath.clear().appendf(XML_TAG_HARDWARE "/" XML_TAG_COMPUTER "[" XML_ATTR_NAME "='%s']", pszComputer);
             IPropertyTree* pComputer = m_pRoot->queryPropTree(xpath.str());
             const char* szNetAddress1 = pComputer?pComputer->queryProp(XML_ATTR_NETADDRESS):NULL;
             if (szNetAddress1 && strcmp(szNetAddress1, szNetAddress)==0)

+ 9 - 9
deployment/deployutils/deployutils.cpp

@@ -1552,7 +1552,7 @@ public:
            }
            else if(!strcmp(attr.queryProp(tempPath.str()), "$hthorcluster"))
            {
-              tempPath.clear().append(XML_TAG_SOFTWARE"/"XML_TAG_TOPOLOGY"/"XML_TAG_CLUSTER);
+              tempPath.clear().append(XML_TAG_SOFTWARE "/" XML_TAG_TOPOLOGY "/" XML_TAG_CLUSTER);
               Owned<IPropertyTreeIterator> iterClusters = m_pEnv->getElements(tempPath.str());
               ForEach (*iterClusters)
               {
@@ -1763,7 +1763,7 @@ public:
               {
                 IPropertyTree* pHard = m_pEnv->queryPropTree(tempPath.str());
                 if(pHard)
-                  wizDefVal.clear().append(pHard->queryProp("./"XML_ATTR_NETADDRESS)).append(":").append(defaultPort);
+                  wizDefVal.clear().append(pHard->queryProp("./" XML_ATTR_NETADDRESS)).append(":").append(defaultPort);
               }
            }
          }
@@ -1972,8 +1972,8 @@ bool generateHardwareHeaders(const IPropertyTree* pEnv, StringBuffer& sbDefn, bo
     addItem(jsStrBuf, pEnv, XML_TAG_DOMAIN,  TAG_SNMPSECSTRING, "", 0, 1, "", 5);
     addItem(jsStrBuf, pEnv, XML_TAG_COMPUTER,  TAG_NAME, "", 0, 1, "", 1);
     addItem(jsStrBuf, pEnv, XML_TAG_COMPUTER,  TAG_NETADDRESS, "", 0, 1, "", 1);
-    addItem(jsStrBuf, pEnv, XML_TAG_COMPUTER,  TAG_DOMAIN, "", 0, 1, XML_TAG_HARDWARE"/"XML_TAG_DOMAIN, 4);
-    addItem(jsStrBuf, pEnv, XML_TAG_COMPUTER,  TAG_COMPUTERTYPE, "", 0, 1, XML_TAG_HARDWARE"/"XML_TAG_COMPUTERTYPE, 4);
+    addItem(jsStrBuf, pEnv, XML_TAG_COMPUTER,  TAG_DOMAIN, "", 0, 1, XML_TAG_HARDWARE "/" XML_TAG_DOMAIN, 4);
+    addItem(jsStrBuf, pEnv, XML_TAG_COMPUTER,  TAG_COMPUTERTYPE, "", 0, 1, XML_TAG_HARDWARE "/" XML_TAG_COMPUTERTYPE, 4);
     addItem(jsStrBuf, pEnv, XML_TAG_NAS,  TAG_NAME, "", 0, 1, "", 1);
     addItem(jsStrBuf, pEnv, XML_TAG_NAS,       TAG_SUBNET,       "", 0, 1, "", 1);
     addItem(jsStrBuf, pEnv, XML_TAG_NAS,       TAG_DIRECTORY,       "", 0, 1, "", 1);
@@ -2991,7 +2991,7 @@ IPropertyTree* getNewRange(const IPropertyTree* pEnv, const char* prefix, const
    String str(startIP);
    iprange.append("-").append(endIP + str.lastIndexOf('.') + 1);
    range.ipsetrange(iprange.str());
-   StringBuffer sNode("<"XML_TAG_HARDWARE">"), sName, sIP;
+   StringBuffer sNode("<" XML_TAG_HARDWARE ">"), sName, sIP;
    int count = (e >> 24) - (s >> 24) + 1;
    nCount = count;
    
@@ -3012,7 +3012,7 @@ IPropertyTree* getNewRange(const IPropertyTree* pEnv, const char* prefix, const
      }
 
      sName.clear().appendf("%s%03d%03d", prefix, (x >> 16) & 0xFF, (x >> 24) & 0xFF);
-     sNode.appendf("<"XML_TAG_COMPUTER" %s=\"%s\" %s=\"%s\" %s/>",
+     sNode.appendf("<" XML_TAG_COMPUTER " %s=\"%s\" %s=\"%s\" %s/>",
                       &XML_ATTR_NAME[1], getUniqueName(pEnv, sName, XML_TAG_COMPUTER, XML_TAG_HARDWARE),
                       &XML_ATTR_NETADDRESS[1], sIP.str(),
                       attr.str());
@@ -3021,7 +3021,7 @@ IPropertyTree* getNewRange(const IPropertyTree* pEnv, const char* prefix, const
    
    if (sNode.length() > 10)
    {
-    sNode.append("</"XML_TAG_HARDWARE">");
+    sNode.append("</" XML_TAG_HARDWARE ">");
     IPropertyTree* pTree = createPTreeFromXMLString(sNode);
     return pTree;
    }
@@ -3516,7 +3516,7 @@ void getSummary(const IPropertyTree* pEnvRoot, StringBuffer& respXmlStr, bool pr
           {
             if(ipAssigned.length())
             {
-              Owned<IPropertyTreeIterator> espSerIter = pCompTree->getElements("./"XML_TAG_ESPBINDING);
+              Owned<IPropertyTreeIterator> espSerIter = pCompTree->getElements("./" XML_TAG_ESPBINDING);
               ForEach(*espSerIter)
               {
                 IPropertyTree* pEspBinding = &espSerIter->query();
@@ -3598,7 +3598,7 @@ void getSummary(const IPropertyTree* pEnvRoot, StringBuffer& respXmlStr, bool pr
                  computerName.clear().append(pServer->queryProp(XML_ATTR_COMPUTER));
                  if(computerName.length())
                  {
-                   xpath.clear().appendf("./Hardware/%s/[%s=\"%s\"]", XML_TAG_COMPUTER, XML_ATTR_NAME, computerName.str()); 
+                   xpath.clear().appendf("./Hardware/%s/[%s=\"%s\"]", XML_TAG_COMPUTER, XML_ATTR_NAME, computerName.str());
                    IPropertyTree* pHardware = pEnvRoot->queryPropTree(xpath.str());
                    if(pHardware)
                      ipAssigned.append(pHardware->queryProp(XML_ATTR_NETADDRESS)).append(",");

+ 11 - 11
deployment/deployutils/wizardInputs.cpp

@@ -472,7 +472,7 @@ IPropertyTree* CWizardInputs::createEnvironment()
   }
 
   Owned<IPropertyTree> pProgramTree = createPTreeFromIPT(m_buildSetTree);
-  pNewEnvTree->addPropTree(XML_TAG_PROGRAMS, createPTreeFromIPT(pProgramTree->queryPropTree("./"XML_TAG_PROGRAMS)));
+  pNewEnvTree->addPropTree(XML_TAG_PROGRAMS, createPTreeFromIPT(pProgramTree->queryPropTree("./" XML_TAG_PROGRAMS)));
 
   Owned<IPropertyTree> pCompTree = createPTree(XML_TAG_HARDWARE);
   generateHardwareHeaders(pNewEnvTree, sbTemp, false, pCompTree);
@@ -575,7 +575,7 @@ void CWizardInputs::generateSoftwareTree(IPropertyTree* pNewEnvTree)
       }
     }
 
-    pNewEnvTree->addPropTree(XML_TAG_SOFTWARE,createPTreeFromIPT(m_buildSetTree->queryPropTree("./"XML_TAG_SOFTWARE)));
+    pNewEnvTree->addPropTree(XML_TAG_SOFTWARE,createPTreeFromIPT(m_buildSetTree->queryPropTree("./" XML_TAG_SOFTWARE)));
     xpath.clear().appendf("%s/%s/%s[%s='%s']/LocalEnvConfFile", XML_TAG_SOFTWARE, XML_TAG_ESPPROCESS, XML_TAG_ESPSERVICE, XML_ATTR_NAME, m_service.str());
     const char* tmp = m_cfg->queryProp(xpath.str());
     if (tmp && *tmp)
@@ -614,7 +614,7 @@ void CWizardInputs::addInstanceToTree(IPropertyTree* pNewEnvTree, StringBuffer a
   xpath.clear().appendf("./%s/%s[%s=\"%s\"]", XML_TAG_HARDWARE, XML_TAG_COMPUTER, XML_ATTR_NETADDRESS, attrName.str());
   IPropertyTree* pHardTemp = pNewEnvTree->queryPropTree(xpath.str());
   if(pHardTemp)
-    nodeName.clear().append(pHardTemp->queryProp("./"XML_ATTR_NAME));//NodeName
+    nodeName.clear().append(pHardTemp->queryProp("./" XML_ATTR_NAME));//NodeName
 
   xpath.clear().appendf("./%s/%s[%s=\"%s\"]", XML_TAG_SOFTWARE, processName, XML_ATTR_BUILDSET, buildSetName);
   
@@ -638,7 +638,7 @@ void CWizardInputs::addInstanceToTree(IPropertyTree* pNewEnvTree, StringBuffer a
 void CWizardInputs::getDefaultsForWizard(IPropertyTree* pNewEnvTree)
 {
   StringBuffer xpath, tempName, value;
-  Owned<IPropertyTree> pBuildTree = createPTreeFromIPT(pNewEnvTree->queryPropTree("./"XML_TAG_PROGRAMS));
+  Owned<IPropertyTree> pBuildTree = createPTreeFromIPT(pNewEnvTree->queryPropTree("./" XML_TAG_PROGRAMS));
   xpath.clear().appendf("./%s/%s/", XML_TAG_BUILD, XML_TAG_BUILDSET);
   Owned<IPropertyTreeIterator> buildSetInsts = pBuildTree->getElements(xpath.str());
 
@@ -651,7 +651,7 @@ void CWizardInputs::getDefaultsForWizard(IPropertyTree* pNewEnvTree)
     const char* processName = pBuildSet->queryProp(XML_ATTR_PROCESS_NAME);
     if(processName && *processName && buildSetName && * buildSetName && xsdFileName && *xsdFileName)
     {
-      Owned<IPropertyTree> pSchema = loadSchema(pBuildTree->queryPropTree("./"XML_TAG_BUILD"[1]"), pBuildSet, buildSetPath, NULL);
+      Owned<IPropertyTree> pSchema = loadSchema(pBuildTree->queryPropTree("./" XML_TAG_BUILD "[1]"), pBuildSet, buildSetPath, NULL);
 
       Owned<IPropertyTree> pCompTree = generateTreeFromXsd(pNewEnvTree, pSchema, processName, buildSetName, m_cfg, m_service.str(), true, true, this);
       xpath.clear().appendf("./%s/%s/[%s=\"%s\"]", XML_TAG_SOFTWARE, processName, XML_ATTR_BUILDSET, buildSetName);
@@ -886,7 +886,7 @@ void CWizardInputs::addRoxieThorClusterToEnv(IPropertyTree* pNewEnvTree, CInstDe
 void CWizardInputs::getEspBindingInformation(IPropertyTree* pNewEnvTree)
 {
    StringBuffer xpath, sbDefn, xmlArg, compName, sbNewName;
-   Owned<IPropertyTreeIterator> espProcessIter = pNewEnvTree->getElements("./"XML_TAG_SOFTWARE"/"XML_TAG_ESPPROCESS);
+   Owned<IPropertyTreeIterator> espProcessIter = pNewEnvTree->getElements("./" XML_TAG_SOFTWARE "/" XML_TAG_ESPPROCESS);
         
    ForEach(*espProcessIter)
    {
@@ -967,8 +967,8 @@ void CWizardInputs::getEspBindingInformation(IPropertyTree* pNewEnvTree)
 void CWizardInputs::addTopology(IPropertyTree* pNewEnvTree)
 {
   StringBuffer xpath;
-  if(!pNewEnvTree->hasProp("./"XML_TAG_SOFTWARE"/"XML_TAG_TOPOLOGY))
-    pNewEnvTree->addPropTree("./"XML_TAG_SOFTWARE"/"XML_TAG_TOPOLOGY, createPTree());
+  if(!pNewEnvTree->hasProp("./" XML_TAG_SOFTWARE "/" XML_TAG_TOPOLOGY))
+    pNewEnvTree->addPropTree("./" XML_TAG_SOFTWARE "/" XML_TAG_TOPOLOGY, createPTree());
  
   HashIterator sIter(m_compForTopology);
   for(sIter.first();sIter.isValid();sIter.next())
@@ -976,7 +976,7 @@ void CWizardInputs::addTopology(IPropertyTree* pNewEnvTree)
     IMapping &cur = sIter.query();
     IPropertyTree* pCluster = createTopologyForComp(pNewEnvTree,(const char *) cur.getKey());
     if(pCluster)
-       pNewEnvTree->addPropTree("./"XML_TAG_SOFTWARE"/"XML_TAG_TOPOLOGY"/Cluster", pCluster);
+       pNewEnvTree->addPropTree("./" XML_TAG_SOFTWARE "/" XML_TAG_TOPOLOGY "/Cluster", pCluster);
   }
 }
 
@@ -1134,7 +1134,7 @@ void CWizardInputs::addComponentToSoftware(IPropertyTree* pNewEnvTree, IProperty
   const char* buildSetName = pBuildSet->queryProp(XML_ATTR_NAME);
   const char* xsdFileName = pBuildSet->queryProp(XML_ATTR_SCHEMA);
   const char* processName = pBuildSet->queryProp(XML_ATTR_PROCESS_NAME);
-  StringBuffer deployable = pBuildSet->queryProp("@"TAG_DEPLOYABLE);
+  StringBuffer deployable = pBuildSet->queryProp("@" TAG_DEPLOYABLE);
   unsigned numOfIpNeeded = 1;
 
   if (m_doNotGenComp.find(buildSetName) != NotFound )
@@ -1142,7 +1142,7 @@ void CWizardInputs::addComponentToSoftware(IPropertyTree* pNewEnvTree, IProperty
 
   if (processName && *processName && buildSetName && * buildSetName && xsdFileName && *xsdFileName)
   {
-    Owned<IPropertyTree> pSchema = loadSchema(m_buildSetTree->queryPropTree("./"XML_TAG_PROGRAMS"/"XML_TAG_BUILD"[1]"), pBuildSet, buildSetPath, NULL);
+    Owned<IPropertyTree> pSchema = loadSchema(m_buildSetTree->queryPropTree("./" XML_TAG_PROGRAMS "/" XML_TAG_BUILD "[1]"), pBuildSet, buildSetPath, NULL);
     IPropertyTree* pCompTree = generateTreeFromXsd(pNewEnvTree, pSchema, processName, buildSetName, m_cfg, m_service.str(), false);
 
     sbNewName.clear();

+ 3 - 3
deployment/envgen/main.cpp

@@ -19,7 +19,7 @@
 #include "deployutils.hpp"
 #include "build-config.h"
 
-#define ENVGEN_PATH_TO_ESP_CONFIG INSTALL_DIR""CONFIG_DIR"/configmgr/esp.xml"
+#define ENVGEN_PATH_TO_ESP_CONFIG INSTALL_DIR "" CONFIG_DIR "/configmgr/esp.xml"
 #define STANDARD_CONFIGXMLDIR COMPONENTFILES_DIR"/configxml/"
 #define STANDARD_CONFIG_BUILDSETFILE "buildset.xml"
 
@@ -283,7 +283,7 @@ int main(int argc, char** argv)
           if (buildset && *buildset)
           {
             StringBuffer xpath(XML_TAG_SOFTWARE"/");
-            xpath.appendf("*["XML_ATTR_BUILDSET"='%s']", buildset);
+            xpath.appendf("*[" XML_ATTR_BUILDSET "='%s']", buildset);
             Owned<IPropertyTreeIterator> iter = pEnvTree->getElements(xpath.str());
 
             ForEach (*iter)
@@ -307,7 +307,7 @@ int main(int argc, char** argv)
       StringBuffer env;
       StringBuffer thisip;
       queryHostIP().getIpText(thisip);
-      env.appendf("<"XML_HEADER">\n<!-- Generated with envgen on ip %s -->\n", thisip.str());
+      env.appendf("<" XML_HEADER ">\n<!-- Generated with envgen on ip %s -->\n", thisip.str());
       env.append(envXml);
       
       Owned<IEnvironmentFactory> factory = getEnvironmentFactory();

+ 2 - 2
docs/ECLPluginForEclipse/ECL_Plugin_for_Eclipse.xml

@@ -593,10 +593,10 @@
 
         <orderedlist>
           <listitem>
-            <para>Expand your project (hello_world), then rt-click on
+            <para>Expand your project (hello_world), then right-click on
             hello.ecl, and select <emphasis role="bold">Run As</emphasis>
             <emphasis role="bold">&gt;&gt;</emphasis> <emphasis
-            role="bold">Run Configurations</emphasis></para>
+            role="bold">Run Configurations...</emphasis></para>
 
             <para><graphic fileref="images/EPI011.jpg" scale="80" /></para>
           </listitem>

+ 9 - 9
docs/HPCCClientTools/CT_Mods/CT_ECL_IDE.xml

@@ -942,7 +942,7 @@
           as optional addons. And, you can create your own and add them to a
           system.</para>
 
-          <para>A RT-CLICK on the folders in the Repository Toolbox gives you
+          <para>A right-click on the folders in the Repository Toolbox gives you
           an option of <emphasis role="bold">Locate File in
           Explorer</emphasis> which will then open that folder in a new
           explorer window.</para>
@@ -1166,7 +1166,7 @@
           <para>This toolbox displays Logical files for the environment to
           which you are connected. Logical files are are organized into
           “folders” by scope in which they were created and displayed in a
-          tree format. Expand any branch to see the files within it. RT-CLICK
+          tree format. Expand any branch to see the files within it. Right-click
           to copy the label of the file to paste into your code.</para>
 
           <para></para>
@@ -1274,7 +1274,7 @@
                     <entry><graphic fileref="../../images/tip.jpg" /></entry>
 
                     <entry>You can copy the error message text using the
-                    RT-CLICK pop up menu option.</entry>
+                    right-click pop up menu option.</entry>
                   </row>
                 </tbody>
               </tgroup>
@@ -2081,7 +2081,7 @@
         <sect3>
           <title>Workunit Pop-up Menu</title>
 
-          <para>RT-CLICK on any Workunit for a Pop-up menu containing:</para>
+          <para>Right-click on any Workunit for a Pop-up menu containing:</para>
 
           <informaltable colsep="0" frame="none" rowsep="0">
             <tgroup cols="2">
@@ -2214,7 +2214,7 @@
         <sect3>
           <title>Repository Pop-up Menu</title>
 
-          <para>RT-CLICK in the <emphasis role="bold">Repository Window
+          <para>Right-click in the <emphasis role="bold">Repository Window
           </emphasis>for a Pop-up menu containing options which are available
           depending on whether you have a folder or ECL file selected.</para>
 
@@ -2353,7 +2353,7 @@
         <sect3>
           <title>Results Pop-up Menu</title>
 
-          <para>RT-CLICK on Results Pop-up menu containing:</para>
+          <para>Right-click on Results Pop-up menu containing:</para>
 
           <informaltable colsep="0" frame="none" rowsep="0">
             <tgroup cols="2">
@@ -2674,7 +2674,7 @@ ENDMACRO;
         <para>Using CTRL+MOUSEWHEEL will grow or shrink the font size used in
         the window.</para>
 
-        <para>There is also a RT-CLICK pop-up menu with the all the options
+        <para>There is also a right-click pop-up menu with the all the options
         found on the <emphasis role="bold">Edit</emphasis> menu.</para>
 
         <sect3 role="brk">
@@ -2745,7 +2745,7 @@ ENDMACRO;
         <para>Using CTRL+MOUSEWHEEL will grow or shrink the font size used in
         the window.</para>
 
-        <para>There is also a RT-CLICK pop-up menu with the all the options
+        <para>There is also a right-click pop-up menu with the all the options
         found on the <emphasis role="bold">Edit</emphasis> menu.</para>
       </sect2>
 
@@ -2770,7 +2770,7 @@ ENDMACRO;
           </listitem>
 
           <listitem>
-            <para>Use Ribbon bar buttons or RT-CLICK popup menu Cut, Copy,
+            <para>Use Ribbon bar buttons or right-click the popup menu. Cut, Copy,
             Paste, or Delete to remove or add cells, rows, columns to what is
             displayed. This does not change the actual result, only the
             display.</para>

+ 4 - 4
docs/HPCCDataTutorial/DataTutorial.xml

@@ -549,7 +549,7 @@
         <listitem>
           <?dbfo keep-together="always"?>
 
-          <para>Rt-Click on the <emphasis role="bold">My Files</emphasis>
+          <para>Right-click on the <emphasis role="bold">My Files</emphasis>
           folder in the Repository window, and select <emphasis
           role="bold">Insert Folder</emphasis> from the pop-up menu.</para>
 
@@ -589,7 +589,7 @@
         </listitem>
 
         <listitem>
-          <para>Rt-Click on the <emphasis
+          <para>Right-click on the <emphasis
           role="bold">Tutorial</emphasis><emphasis
           role="bold">YourName</emphasis>Folder, and select <emphasis
           role="bold">Insert File</emphasis> from the pop-up menu.</para>
@@ -687,7 +687,7 @@ END;    </programlisting> <figure>
 
         <orderedlist>
           <listitem>
-            <para>Rt-Click on the <emphasis
+            <para>Right-click on the <emphasis
             role="bold">Tutorial</emphasis><emphasis role="bold">YourName
             </emphasis>Folder, and select <emphasis role="bold">Insert
             File</emphasis> from the pop-up menu.</para>
@@ -848,7 +848,7 @@ COUNT(TutorialYourName.File_OriginalPerson);
 
         <orderedlist>
           <listitem>
-            <para>Rt-Click on the <emphasis
+            <para>Right-click on the <emphasis
             role="bold">Tutorial</emphasis><emphasis role="bold">YourName
             </emphasis>Folder, and select Insert File from the pop-up
             menu.</para>

+ 2 - 2
docs/RunningHPCCinaVirtualMachine/RunningHPCCinaVirtualMachine.xml

@@ -1578,7 +1578,7 @@ OUTPUT(ValidWords)
               <listitem>
                 <?dbfo keep-together="always"?>
 
-                <para>RT-CLICK on the <emphasis role="bold">MyFIles</emphasis>
+                <para>Right-click on the <emphasis role="bold">MyFiles</emphasis>
                 folder in the Repository<emphasis role="bold"></emphasis>
                 window, and select <emphasis role="bold">Insert
                 Folder</emphasis> from the pop-up menu.</para>
@@ -1616,7 +1616,7 @@ OUTPUT(ValidWords)
               </listitem>
 
               <listitem>
-                <para>RT-CLICK on the <emphasis role="bold">Anagram
+                <para>Right-click on the <emphasis role="bold">Anagram
                 </emphasis>Folder, and select <emphasis role="bold">Insert
                 File</emphasis> from the pop-up menu.</para>
               </listitem>

+ 2 - 2
docs/UsingConfigManager/UsingConfigManager.xml

@@ -1535,8 +1535,8 @@ sudo -u hpcc cp /etc/HPCCSystems/source/NewEnvironment.xml /etc/HPCCSystems/envi
           <orderedlist>
             <listitem>
               <para>On the <emphasis role="bold">Instances</emphasis> tab,
-              Rt-click on the table on the right hand side, choose <emphasis
-              role="bold">Add Instances</emphasis></para>
+              right-click on the table on the right hand side, choose <emphasis
+              role="bold">Add Instances...</emphasis></para>
             </listitem>
 
             <listitem>

+ 1 - 1
ecl/agentexec/agentexec.cpp

@@ -220,7 +220,7 @@ int CEclAgentExecutionServer::executeWorkunit(const char * wuid)
     if (success)
     { 
         if (runcode != 0)
-            PROGLOG("Process failed during execution: %s error(%"I64F"i)", cmdLine.str(), (unsigned __int64) runcode);
+            PROGLOG("Process failed during execution: %s error(%" I64F "i)", cmdLine.str(), (unsigned __int64) runcode);
         else
             PROGLOG("Execution started");
     }

+ 7 - 7
ecl/eclagent/eclagent.cpp

@@ -775,7 +775,7 @@ void EclAgent::outputFormattedResult(const char * name, unsigned sequence, bool
 
 void EclAgent::setResultInt(const char * name, unsigned sequence, __int64 val, unsigned size)
 {
-    LOG(MCsetresult, unknownJob, "setResultInt(%s,%d,%"I64F"d)", nullText(name), sequence, val);
+    LOG(MCsetresult, unknownJob, "setResultInt(%s,%d,%" I64F "d)", nullText(name), sequence, val);
     Owned<IWUResult> r = updateResult(name, sequence);
     if (r)
     {
@@ -788,7 +788,7 @@ void EclAgent::setResultInt(const char * name, unsigned sequence, __int64 val, u
     {
         if (outputFmt == ofSTD)
         {
-            outputSerializer->printf(sequence, "%"I64F"d", val);
+            outputSerializer->printf(sequence, "%" I64F "d", val);
             outputSerializer->close(sequence, true);
         }
         else
@@ -798,7 +798,7 @@ void EclAgent::setResultInt(const char * name, unsigned sequence, __int64 val, u
 
 void EclAgent::setResultUInt(const char * name, unsigned sequence, unsigned __int64 val, unsigned size)
 {
-    LOG(MCsetresult, unknownJob, "setResultUInt(%s,%d,%"I64F"u)", nullText(name), sequence, val);
+    LOG(MCsetresult, unknownJob, "setResultUInt(%s,%d,%" I64F "u)", nullText(name), sequence, val);
     Owned<IWUResult> r = updateResult(name, sequence);
     if (r)
     {
@@ -811,7 +811,7 @@ void EclAgent::setResultUInt(const char * name, unsigned sequence, unsigned __in
     {
         if (outputFmt == ofSTD)
         {
-            outputSerializer->printf(sequence, "%"I64F"u", val);
+            outputSerializer->printf(sequence, "%" I64F "u", val);
             outputSerializer->close(sequence, true);
         }
         else
@@ -2435,13 +2435,13 @@ static unsigned __int64 crcLogicalFileTime(IDistributedFile * file, unsigned __i
     CDateTime dt;
     file->getModificationTime(dt);
     unsigned __int64 modifiedTime = dt.getSimple();
-    PrintLog("getDatasetHash adding crc %"I64F"u for file %s", modifiedTime, filename);
+    PrintLog("getDatasetHash adding crc %" I64F "u for file %s", modifiedTime, filename);
     return rtlHash64Data(sizeof(modifiedTime), &modifiedTime, crc);
 }
 
 unsigned __int64 EclAgent::getDatasetHash(const char * logicalName, unsigned __int64 crc)
 {
-    PrintLog("getDatasetHash initial crc %"I64F"x", crc);
+    PrintLog("getDatasetHash initial crc %" I64F "x", crc);
 
     StringBuffer fullname;
     expandLogicalName(fullname, logicalName);
@@ -2481,7 +2481,7 @@ unsigned __int64 EclAgent::getDatasetHash(const char * logicalName, unsigned __i
     else
         PrintLog("getDatasetHash did not find file %s", fullname.str());
 
-    PrintLog("getDatasetHash final crc %"I64F"x", crc);
+    PrintLog("getDatasetHash final crc %" I64F "x", crc);
     return crc;
 }
 

+ 7 - 3
ecl/eclcc/eclcc.cpp

@@ -771,7 +771,10 @@ void EclCC::instantECL(EclCompileInstance & instance, IWorkUnit *wu, const char
                 instance.stats.cppSize = generator->getGeneratedSize();
                 if (generateOk && !optNoCompile)
                 {
-                    Owned<ICppCompiler> compiler = createCompiler(processName.toCharArray());
+                    Owned<ICppCompiler> compiler = createCompiler(processName.str());
+                    StringBuffer mainName(processName);
+                    mainName.append(".cpp");
+                    compiler->addSourceFile(mainName);
                     compiler->setSaveTemps(optSaveTemps);
 
                     bool compileOk = true;
@@ -1704,8 +1707,9 @@ bool EclCC::generatePrecompiledHeader()
         ERRLOG("Cannot find eclinclude4.hpp");
         return false;
     }
-    Owned<ICppCompiler> compiler = createCompiler("eclinclude4.hpp", foundPath, NULL);
+    Owned<ICppCompiler> compiler = createCompiler("precompile", foundPath, NULL);
     compiler->setDebug(true);  // a precompiled header with debug can be used for no-debug, but not vice versa
+    compiler->addSourceFile("eclinclude4.hpp");
     compiler->setPrecompileHeader(true);
     if (compiler->compile())
     {
@@ -1829,7 +1833,7 @@ void EclCompileInstance::logStats()
         memsize_t peakVm, peakResident;
         getPeakMemUsage(peakVm, peakResident);
         //Stats: added as a prefix so it is easy to grep, and a comma so can be read as a csv list.
-        DBGLOG("Stats:,parse,%u,generate,%u,peakmem,%u,xml,%"I64F"u,cpp,%"I64F"u",
+        DBGLOG("Stats:,parse,%u,generate,%u,peakmem,%u,xml,%" I64F "u,cpp,%" I64F "u",
                 stats.parseTime, stats.generateTime, (unsigned)(peakResident / 0x100000),
                 (unsigned __int64)stats.xmlSize, (unsigned __int64)stats.cppSize);
     }

+ 3 - 3
ecl/hql/hqlexpr.cpp

@@ -334,9 +334,9 @@ MODULE_EXIT()
 #ifdef GATHER_LINK_STATS
 static void showStats()
 {
-    printf("Links = %"I64F"d(%"I64F"d) releases = %"I64F"d(%"I64F"d)\n", numLinks, numTransformerLinks, numReleases, numTransformerReleases);
-    printf("Create Links = %"I64F"d releases = %"I64F"d\n", numCreateLinks, numCreateReleases);
-    printf("setExtra = %"I64F"d setExtraSame = %"I64F"d setExtraUnlinked = %"I64F"d\n", numSetExtra, numSetExtraSame, numSetExtraUnlinked);
+    printf("Links = %" I64F "d(%" I64F "d) releases = %" I64F "d(%" I64F "d)\n", numLinks, numTransformerLinks, numReleases, numTransformerReleases);
+    printf("Create Links = %" I64F "d releases = %" I64F "d\n", numCreateLinks, numCreateReleases);
+    printf("setExtra = %" I64F "d setExtraSame = %" I64F "d setExtraUnlinked = %" I64F "d\n", numSetExtra, numSetExtraSame, numSetExtraUnlinked);
     printf("numLocks = %d nestedLocks = %d maxNested=%d nestedLockExtra = %d\n", numLocks, numNestedLocks, maxNestedLocks, numNestedExtra);
 }
 

+ 4 - 1
ecl/hql/hqlgram2.cpp

@@ -5973,7 +5973,10 @@ void HqlGram::report(IError* error)
             if (associateWarnings)
                 pendingWarnings.append(*LINK(error));
             else
-                errorHandler->report(error);
+            {
+                Owned<IError> mappedError = mapError(error);
+                errorHandler->report(mappedError);
+            }
         }
         else
         {

+ 31 - 10
ecl/hqlcpp/hqlcpp.cpp

@@ -1135,6 +1135,20 @@ const char * HqlCppInstance::queryLibrary(unsigned idx)
     return NULL;
 }
 
+const char * HqlCppInstance::queryObjectFile(unsigned idx)
+{
+    if (objectFiles.isItem(idx))
+        return objectFiles.item(idx).text;
+    return NULL;
+}
+
+const char * HqlCppInstance::querySourceFile(unsigned idx)
+{
+    if (sourceFiles.isItem(idx))
+        return sourceFiles.item(idx).text;
+    return NULL;
+}
+
 HqlStmts * HqlCppInstance::querySection(IAtom * section)
 {
     ForEachItemIn(idx, sections)
@@ -1240,6 +1254,16 @@ void HqlCppInstance::useLibrary(const char * libname)
     insertUniqueString(modules, libname);
 }
 
+void HqlCppInstance::useObjectFile(const char * objname)
+{
+    insertUniqueString(objectFiles, objname);
+}
+
+void HqlCppInstance::useSourceFile(const char * srcname)
+{
+    insertUniqueString(sourceFiles, srcname);
+}
+
 void HqlCppInstance::addHint(const char * hintXml, ICodegenContextCallback * ctxCallback)
 {
     if (!hintFile)
@@ -1307,27 +1331,24 @@ void HqlCppInstance::flushResources(const char *filename, ICodegenContextCallbac
     {
         bool flushText = workunit->getDebugValueBool("flushResourceAsText", false);
 
-        StringBuffer path, trailing;
-        splitFilename(filename, &path, &path, &trailing, &trailing);
-
-        StringBuffer ln;
-        ln.append(path).append(SharedObjectPrefix).append(trailing).append(LibraryExtension);
 #ifdef __64BIT__
-        // ARMFIX: Map all the uses of this property and make sure
-        // they're not used to mean x86_64 (it shouldn't, though)
         bool target64bit = workunit->getDebugValueBool("target64bit", true);
 #else
         bool target64bit = workunit->getDebugValueBool("target64bit", false);
 #endif
-        resources.flush(ln.str(), flushText, target64bit);
+        StringBuffer resname;
+        bool isObjectFile = resources.flush(resname, filename, flushText, target64bit);
 
         StringBuffer resTextName;
-        if (flushText && resources.queryWriteText(resTextName, ln))
+        if (flushText && resources.queryWriteText(resTextName, resname))
         {
             Owned<IWUQuery> query = workunit->updateQuery();
             associateLocalFile(query, FileTypeHintXml, resTextName, "Workunit resource text", 0);
         }
-        useLibrary(filename);
+        if (isObjectFile)
+            useObjectFile(resname);
+        else
+            useSourceFile(resname);
     }
 }
 

+ 2 - 0
ecl/hqlcpp/hqlcpp.hpp

@@ -113,6 +113,8 @@ interface HQLCPP_API IHqlCppInstance : public IInterface
 public:
     virtual HqlStmts * ensureSection(IAtom * section) = 0;
     virtual const char * queryLibrary(unsigned idx) = 0;
+    virtual const char * queryObjectFile(unsigned idx) = 0;
+    virtual const char * querySourceFile(unsigned idx) = 0;
     virtual HqlStmts * querySection(IAtom * section) = 0;
     virtual void addResource(const char * type, unsigned len, const void * data, IPropertyTree *manifestEntry, unsigned id=(unsigned)-1) = 0;
     virtual void addCompressResource(const char * type, unsigned len, const void * data, IPropertyTree *manifestEntry, unsigned id=(unsigned)-1) = 0;

+ 6 - 0
ecl/hqlcpp/hqlcpp.ipp

@@ -129,6 +129,8 @@ public:
 
     virtual HqlStmts * ensureSection(IAtom * section);
     virtual const char * queryLibrary(unsigned idx);
+    virtual const char * queryObjectFile(unsigned idx);
+    virtual const char * querySourceFile(unsigned idx);
     virtual HqlStmts * querySection(IAtom * section);
     virtual void flushHints();
     virtual void flushResources(const char *filename, ICodegenContextCallback * ctxCallback);
@@ -141,6 +143,8 @@ public:
     bool useFunction(IHqlExpression * funcdef);
     void useInclude(const char * include);
     void useLibrary(const char * libname);
+    void useObjectFile(const char * objname);
+    void useSourceFile(const char * srcname);
     unsigned addStringResource(unsigned len, const char * body);
     void addHint(const char * hintXml, ICodegenContextCallback * ctxCallback);
 
@@ -155,6 +159,8 @@ public:
     CIArray             sections;
     IArray               helpers;
     StringAttrArray     modules;
+    StringAttrArray     objectFiles;
+    StringAttrArray     sourceFiles;
     StringAttrArray     includes;
     CIArray             extra;
     ResourceManager     resources;

+ 26 - 11
ecl/hqlcpp/hqlecl.cpp

@@ -115,6 +115,7 @@ protected:
     unsigned defaultMaxCompileThreads;
     StringArray sourceFiles;
     StringArray libraries;
+    StringArray objects;
     offset_t totalGeneratedSize;
     bool checkForLocalFileUploads;
     bool noOutput;
@@ -151,11 +152,30 @@ void HqlDllGenerator::addLibrariesToCompiler()
         const char * lib = code->queryLibrary(idx);
         if (!lib)
             break;
-
         PrintLog("Adding library: %s", lib);
         addLibrary(lib);
         idx++;
     }
+    idx=0;
+    loop
+    {
+        const char * obj = code->queryObjectFile(idx);
+        if (!obj)
+            break;
+        PrintLog("Adding object file: %s", obj);
+        objects.append(obj);
+        idx++;
+    }
+    idx=0;
+    loop
+    {
+        const char * src = code->querySourceFile(idx);
+        if (!src)
+            break;
+        PrintLog("Adding source file: %s", src);
+        sourceFiles.append(src);
+        idx++;
+    }
 }
 
 
@@ -490,7 +510,7 @@ void HqlDllGenerator::doExpand(HqlCppTranslator & translator)
             expandCode(CHILD_MODULE_TEMPLATE, fullext, code, true, i+1, translator.queryOptions().targetCompiler);
 
             StringBuffer fullname;
-            fullname.append(wuname).append("_").append(i+1);
+            fullname.append(wuname).append("_").append(i+1).append(".cpp");
             sourceFiles.append(fullname);
         }
     }
@@ -535,6 +555,8 @@ bool HqlDllGenerator::doCompile(ICppCompiler * compiler)
 
     ForEachItemIn(idx, libraries)
         compiler->addLibrary(libraries.item(idx));
+    ForEachItemIn(idx2, objects)
+        compiler->addObjectFile(objects.item(idx2));
 
     StringBuffer options;
     StringBufferAdaptor linkOptionAdaptor(options);
@@ -577,8 +599,7 @@ bool HqlDllGenerator::doCompile(ICppCompiler * compiler)
         remove(temp.clear().append(wuname).append(".hpp").str());
         ForEachItemIn(i, sourceFiles)
         {
-            temp.clear().append(sourceFiles.item(i)).append(".cpp");
-            remove(temp.str());
+            remove(sourceFiles.item(i));
         }
     }
     return ok;
@@ -586,14 +607,8 @@ bool HqlDllGenerator::doCompile(ICppCompiler * compiler)
 
 void HqlDllGenerator::flushResources()
 {
-    StringBuffer resname(wuname);
-#ifdef _WIN32
-    resname.append(".res");
-#else
-    resname.append(".res.o");
-#endif
     if (code)
-        code->flushResources(resname.str(), ctxCallback);
+        code->flushResources(wuname, ctxCallback);
 }
 
 

+ 33 - 4
ecl/hqlcpp/hqlres.cpp

@@ -407,7 +407,7 @@ void ResourceManager::flushAsText(const char *filename)
     fclose(f);
 }
 
-void ResourceManager::flush(const char *filename, bool flushText, bool target64bit)
+bool ResourceManager::flush(StringBuffer &filename, const char *basename, bool flushText, bool target64bit)
 {
     finalize();
 
@@ -415,12 +415,15 @@ void ResourceManager::flush(const char *filename, bool flushText, bool target64b
     // or that we want to access without having to run the dll/so
     // In linux there is no .res concept but we can achieve the same effect by generating an object file with a specially-named section 
     // bintils tools can be used to extract the data externally (internally we just have a named symbol for it)
+    // Alternatively we can generate an assembler file to create the equivalent object file, if binutils is not available
+    bool isObjectFile = true;
 #ifdef _WIN32
+    filename.append(basename).append(".res");
     int h = _open(filename, _O_WRONLY|_O_CREAT|_O_TRUNC|_O_BINARY|_O_SEQUENTIAL, _S_IREAD | _S_IWRITE | _S_IEXEC);
     
     //assertex(h != HFILE_ERROR);
     if (h == HFILE_ERROR) // error can not be ignored!
-        throwError1(HQLERR_ResourceCreateFailed, filename);
+        throwError1(HQLERR_ResourceCreateFailed, filename.str());
 
     totalbytes = 0;
     putbytes(h, "\x00\x00\x00\x00\x20\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00"
@@ -458,6 +461,7 @@ void ResourceManager::flush(const char *filename, bool flushText, bool target64b
     }
     _close(h);
 #elif defined(_USE_BINUTILS)
+    filename.append(basename).append(".res.o");
     asymbol **syms = NULL;
     bfd *file = NULL;
     StringArray names;  // need to make sure that the strings we use in symbol table have appropriate lifetime 
@@ -522,17 +526,42 @@ void ResourceManager::flush(const char *filename, bool flushText, bool target64b
         E->Release();
         //translate the assert exceptions into something else...
         StringBuffer msg;
-        msg.appendf("%s: %s", filename, bfd_errmsg(bfd_get_error()));
+        msg.appendf("%s: %s", filename.str(), bfd_errmsg(bfd_get_error()));
         delete syms;
         if (file)
             bfd_close_all_done(file); // allow bfd to clean up memory
         throwError1(HQLERR_ResourceCreateFailed, msg.str());
     }
 #else
-    UNIMPLEMENTED;
+    isObjectFile = false;
+    filename.append(basename).append(".res.s");
+    FILE *f = fopen(filename, "wt");
+    if (!f)
+        throwError1(HQLERR_ResourceCreateFailed, filename.str());
+    ForEachItemIn(idx, resources)
+    {
+        ResourceItem &s = (ResourceItem &) resources.item(idx);
+        const char *type = s.type.str();
+        unsigned id = s.id;
+        VStringBuffer binfile("%s_%s_%u.bin", filename.str(), type, id);
+        fprintf(f, " .section __TEXT,%s_%u\n", type, id);
+        fprintf(f, " .global _%s_%u_txt_start\n", type, id);  // For some reason apple needs a leading underbar and linux does not
+        fprintf(f, "_%s_%u_txt_start:\n", type, id);
+        fprintf(f, " .incbin \"%s\"\n", binfile.str());
+        FILE *bin = fopen(binfile, "wb");
+        if (!bin)
+        {
+            fclose(f);
+            throwError1(HQLERR_ResourceCreateFailed, binfile.str());
+        }
+        fwrite(s.data.get(), 1, s.data.length(), bin);
+        fclose(bin);
+    }
+    fclose(f);
 #endif
     if (flushText)
         flushAsText(filename);
+    return isObjectFile;
 }
 
 

+ 1 - 1
ecl/hqlcpp/hqlres.hpp

@@ -39,7 +39,7 @@ public:
     void finalize();
 
     unsigned count();
-    void flush(const char *filename, bool flushText, bool target64bit);
+    bool flush(StringBuffer &filename, const char *basename, bool flushText, bool target64bit);
     void flushAsText(const char *filename);
     bool queryWriteText(StringBuffer & resTextName, const char * filename);
 private:

+ 3 - 3
ecl/hthor/hthor.cpp

@@ -72,7 +72,7 @@ IRowManager * queryRowManager()
 
 void throwOOMException(size_t size, char const * label)
 {
-    throw MakeStringException(0, "Out of Memory in hthor: trying to allocate %"I64F"u bytes for %s", (unsigned __int64) size, label);
+    throw MakeStringException(0, "Out of Memory in hthor: trying to allocate %" I64F "u bytes for %s", (unsigned __int64) size, label);
 }
 
 void * checked_malloc(size_t size, char const * label)
@@ -295,7 +295,7 @@ private:
     virtual void getTempFilename(StringAttr & out) const
     {
         StringBuffer buff;
-        agent.getTempfileBase(buff).appendf(".cluster_write_%p.%"I64F"d_%u", this, (__int64)GetCurrentThreadId(), GetCurrentProcessId());
+        agent.getTempfileBase(buff).appendf(".cluster_write_%p.%" I64F "d_%u", this, (__int64)GetCurrentThreadId(), GetCurrentProcessId());
         out.set(buff.str());
     }
 };
@@ -8586,7 +8586,7 @@ const void *CHThorDiskCountActivity::nextInGroup()
         {
             unsigned __int64 size = ldFile->getFileSize();
             if (size % fixedDiskRecordSize)
-                throw MakeStringException(0, "Physical file %s has size %"I64F"d which is not a multiple of record size %d", ldFile->queryLogicalName(), size, fixedDiskRecordSize);
+                throw MakeStringException(0, "Physical file %s has size %" I64F "d which is not a multiple of record size %d", ldFile->queryLogicalName(), size, fixedDiskRecordSize);
             totalCount = size / fixedDiskRecordSize;
         }
     }

+ 2 - 2
ecl/hthor/hthorkey.cpp

@@ -1837,7 +1837,7 @@ public:
                     else
                         expectedSize = props.getPropInt64("@size", -1);
                     if(thissize != expectedSize && expectedSize != -1)
-                        throw MakeStringException(0, "File size mismatch: file %s was supposed to be %"I64F"d bytes but appears to be %"I64F"d bytes", ifile->queryFilename(), expectedSize, thissize); 
+                        throw MakeStringException(0, "File size mismatch: file %s was supposed to be %" I64F "d bytes but appears to be %" I64F "d bytes", ifile->queryFilename(), expectedSize, thissize); 
                     if(blockcompressed)
                         rawFile.setown(createCompressedFileReader(ifile,eexp));
                     else
@@ -2018,7 +2018,7 @@ public:
     {
         PARTHANDLER * part = binsearch(rp, parts, numParts, this);
         if(!part)
-            throw MakeStringException(1002, "FETCH: file position %"I64F"d out of range", rp);
+            throw MakeStringException(1002, "FETCH: file position %" I64F "d out of range", rp);
         part->addRow(new REQUEST(left, rp, seq));
     }
 

+ 2 - 2
ecl/wutest/wujobqtest.cpp

@@ -275,7 +275,7 @@ static void cmd_list(IJobQueue *queue)
         IJobQueueItem &item = iter->query();
         StringBuffer eps;
         StringBuffer dts;
-        printf("%3d: %s owner=%s priority=%d session=%"I64F"x ep=%s port=%d enqueuedt=%s\n",n,item.queryWUID(),item.queryOwner(),item.getPriority(),item.getSessionId(),item.queryEndpoint().getUrlStr(eps).str(),item.getPort(),item.queryEnqueuedTime().getString(dts).str());
+        printf("%3d: %s owner=%s priority=%d session=%" I64F "x ep=%s port=%d enqueuedt=%s\n",n,item.queryWUID(),item.queryOwner(),item.getPriority(),item.getSessionId(),item.queryEndpoint().getUrlStr(eps).str(),item.getPort(),item.queryEnqueuedTime().getString(dts).str());
     }
 }
 
@@ -420,7 +420,7 @@ static void cmd_dequeue(IJobQueue *queue)
         return;
     }
     StringBuffer eps;
-    printf("%s owner=%s priority=%d session=%"I64F"x ep=%s port=%d\n",item->queryWUID(),item->queryOwner(),item->getPriority(),item->getSessionId(),item->queryEndpoint().getUrlStr(eps).str(),item->getPort());
+    printf("%s owner=%s priority=%d session=%" I64F "x ep=%s port=%d\n",item->queryWUID(),item->queryOwner(),item->getPriority(),item->getSessionId(),item->queryEndpoint().getUrlStr(eps).str(),item->getPort());
     queue->disconnect();
 }
 

+ 1 - 1
ecl/wutest/wutest.cpp

@@ -75,7 +75,7 @@ bool dump(IConstWorkUnit &w, IProperties *globals)
     else if (stricmp(action, "temporaries")==0)
     {
         Owned<IConstWUResult> r = w.getTemporaryByName("a8QL");
-        printf("%s = %"I64F"d\n", "a8QL", r->getResultInt());
+        printf("%s = %" I64F "d\n", "a8QL", r->getResultInt());
     }
     else if (stricmp(action, "get")==0)
     {

+ 10 - 0
ecllibrary/teststd/uni/TestEditDistanceWithinRadius.ecl

@@ -60,6 +60,16 @@ EXPORT TestEditDistanceWithinRadius := MODULE
     EXPORT Test24b := ASSERT(NOT Uni.EditDistanceWithinRadius(alpha,manyDigits+U'123456',254), CONST);
     EXPORT Test25a := ASSERT(Uni.EditDistanceWithinRadius(U'123456789',U'987654321',8), CONST);
     EXPORT Test25b := ASSERT(NOT Uni.EditDistanceWithinRadius(U'123456789',U'987654321',7), CONST);
+    EXPORT Test26a := ASSERT(Uni.EditDistanceWithinRadius(U'AVILÉS',U'AVILES',1), CONST);
+    EXPORT Test26b := ASSERT(Uni.EditDistanceWithinRadius(U'MOMBRU',U'MOMBRÚ',1), CONST);
+    EXPORT Test26c := ASSERT(Uni.EditDistanceWithinRadius(U'BLVAREZ',U'ÁLVAREZ',1), CONST);
+    // when character's encoding is from 0x00ffff - 0x10ffff range: 0x1D306 ; Description=TETRAGRAM FOR CENTER (Tai Xuan Jing Symbols)
+    // UTF-16 representation is xD834,xDF06 (2 16-bit surrogates)
+    EXPORT Test27a := ASSERT(Uni.EditDistanceWithinRadius(U'\uD834\uDF06XXX',U'XXXX',1), CONST);
+    // NFC (normalized form composed) for accented characters uses multiple 16-bit code units
+    // for example: Ḍ̛ is encoded as 0x1E0C,0x031B, and Ḍ̛̇ as 0x1E0C,0x031B,0x0307
+    // These are the cases where the fast function version (ToDo) does not work correctly, but this one does
+    EXPORT Test27b := ASSERT(Uni.EditDistanceWithinRadius(U'\u1E0C\u031BDDD',U'DDDD',1), CONST);
   END;
 
 END;

+ 2 - 2
esp/bindings/SOAP/Platform/soapbind.cpp

@@ -147,7 +147,7 @@ int CHttpSoapBinding::onSoapRequest(CHttpRequest* request, CHttpResponse* respon
     //response->setContentType(soapFault->get_content_type());
     response->setContentType(HTTP_TYPE_TEXT_XML_UTF8);
     response->setContent(soapFault->get_text());
-    DBGLOG("Sending SOAP Fault(%"I64F"d): %s", response->getContentLength(), response->queryContent());
+    DBGLOG("Sending SOAP Fault(%" I64F "d): %s", response->getContentLength(), response->queryContent());
     {
         EspTimeSection sendtime("send fault [CHttpSoapBinding::onSoapRequest]");
         response->send();
@@ -226,7 +226,7 @@ int CHttpSoapBinding::HandleSoapRequest(CHttpRequest* request, CHttpResponse* re
     response->setContentType(soapresponse->get_content_type());
     response->setContent(soapresponse->get_text());
     
-    DBGLOG("Sending SOAP Response(%"I64F"d)", response->getContentLength());
+    DBGLOG("Sending SOAP Response(%" I64F "d)", response->getContentLength());
     {
         EspTimeSection sendtime("send response [CHttpSoapBinding::HandleSoapRequest]");
         response->send();

+ 1 - 1
esp/bindings/http/platform/httpservice.cpp

@@ -489,7 +489,7 @@ int CEspHttpServer::processRequest()
         StringBuffer content_type;
         __int64 len = m_request->getContentLength();
         DBGLOG("Unknown Exception - processing request");
-        DBGLOG("METHOD: %s, PATH: %s, TYPE: %s, CONTENT-LENGTH: %"I64F"d", m_request->queryMethod(), m_request->queryPath(), m_request->getContentType(content_type).str(), len);
+        DBGLOG("METHOD: %s, PATH: %s, TYPE: %s, CONTENT-LENGTH: %" I64F "d", m_request->queryMethod(), m_request->queryPath(), m_request->getContentType(content_type).str(), len);
         if (len > 0)
             m_request->logMessage(LOGCONTENT, "HTTP request content received:\n");
         return 0;

+ 2 - 2
esp/bindings/http/platform/httptransport.cpp

@@ -599,7 +599,7 @@ int CHttpMessage::receive(bool alwaysReadContent, IMultiException *me)
         return -1;
 
     if (getEspLogLevel()>LogNormal)
-        DBGLOG("Headers processed! content_length = %"I64F"d", m_content_length);
+        DBGLOG("Headers processed! content_length = %" I64F "d", m_content_length);
     
     if (isUpload())
         return 0;
@@ -2323,7 +2323,7 @@ int CHttpResponse::receive(bool alwaysReadContent, IMultiException *me)
         return -1;
 
     if (getEspLogLevel()>LogNormal)
-        DBGLOG("Response headers processed! content_length = %"I64F"d", m_content_length);
+        DBGLOG("Response headers processed! content_length = %" I64F "d", m_content_length);
     
     char status_class = '2';
     if(m_status.length() > 0)

+ 1 - 1
esp/esdllib/CMakeLists.txt

@@ -47,7 +47,7 @@ HPCC_ADD_LIBRARY( esdllib SHARED ${SRCS}
 
 install ( TARGETS esdllib RUNTIME DESTINATION bin LIBRARY DESTINATION lib )
 
-add_dependencies ( esdllib jlib)
+add_dependencies ( esdllib jlib espscm)
 
 target_link_libraries ( esdllib
     jlib

+ 1 - 6
esp/esdllib/esdl_def.cpp

@@ -1793,7 +1793,6 @@ public:
         //DBGLOG("Loading Struct %s", struct_tag.getValue("name"));
         EsdlDefStruct *obj= new EsdlDefStruct(tag, def, tid);
         IEsdlDefObject*iobj = dynamic_cast<IEsdlDefObject*>(obj);
-        const char *objname = obj->queryName();
 
         def->objs.setValue(obj->queryName(), iobj);
         obj->load(def, xpp, tag);
@@ -2050,7 +2049,6 @@ esdl_decl IEsdlDefinition *createEsdlDefinition(const char *esdl_ns)
         }
         else
             return LINK<IEsdlDefinition>(*ptns);
-
     }
     else if (!default_ns)
         default_ns.setown(new EsdlDefinition());
@@ -2062,10 +2060,7 @@ esdl_decl IEsdlDefinition *createNewEsdlDefinition(const char *esdl_ns)
     if (esdl_ns && *esdl_ns)
         return createEsdlDefinition(esdl_ns);
     else
-    {
-        IEsdlDefinition *tns = new EsdlDefinition();
-        return LINK<IEsdlDefinition>(tns);
-    }
+        return new EsdlDefinition();
 }
 
 esdl_decl IEsdlDefinition *queryEsdlDefinition(const char *esdl_ns)

+ 17 - 22
esp/esdllib/esdl_transformer2.cpp

@@ -1317,8 +1317,8 @@ void Esdl2Response::process(Esdl2TransformerContext &ctx, const char *out_name,
 
                     if (ctx.schemaLocation.length() > 0 )
                     {
-                        ctx.writer->outputXmlns("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance");
-                        ctx.writer->outputXmlns("xsi:schemaLocation", ctx.schemaLocation.str());
+                        ctx.writer->outputXmlns("xsi", "http://www.w3.org/2001/XMLSchema-instance");
+                        ctx.writer->outputCString(ctx.schemaLocation.str(), "@xsi:schemaLocation");
                     }
 
                     ctx.do_output_ns=false;
@@ -1753,7 +1753,10 @@ void Esdl2Transformer::processHPCCResult(IEspContext &ctx, IEsdlDefMethod &mthde
     StartTag stag;
     int depth=1;
 
-    IEsdlDefinition *esdl = queryEsdlDefinition();
+    IEsdlDefinition *esdl = m_def.get();
+
+    if (!esdl)
+        throw MakeStringExceptionDirect(-1, "ESDL transformer error: could not access ESDL definition object");
 
     const char *restype = mthdef.queryResponseType();
     if (!restype)
@@ -1786,24 +1789,11 @@ void Esdl2Transformer::processHPCCResult(IEspContext &ctx, IEsdlDefMethod &mthde
     {
         while((dataset = gotoNextHPCCDataset(*xpp, stag)) != NULL)
         {
-            if (strieq(dataset, resdsname))
-            {
-                Esdl2TransformerContext tctx(*this, writer, *xpp, ctx.getClientVersion(), ctx.queryRequestParameters(), EsdlResponseMode, 0, ns,schema_location);
-                tctx.flags = flags | ESDL_TRANS_ROW_IN;
-                tctx.skip_root = !(flags & ESDL_TRANS_OUTPUT_ROOT);
-                tctx.root_type.set(restype);
-                Esdl2Base* root = queryType(restype);
-                if (root)
-                {
-                    Esdl2Response *resp = dynamic_cast<Esdl2Response *>(root);
-                    if (resp)
-                        resp->process(tctx, restype);
-                }
-            }
-            else if ((subresdsname && strieq(dataset, subresdsname)) //Only allow correctly named dataset?
-                     || stricmp(dataset, "FinalResults")==0
-                     || stricmp(dataset, "Results")==0
-                     )
+            if ( strieq(dataset, resdsname)
+                ||(subresdsname && strieq(dataset, subresdsname)) //Only allow correctly named dataset?
+                || stricmp(dataset, "FinalResults")==0
+                || stricmp(dataset, "Results")==0
+               )
             {
                 Esdl2TransformerContext tctx(*this, writer, *xpp, ctx.getClientVersion(), ctx.queryRequestParameters(), EsdlResponseMode, 0, ns,schema_location);
                 tctx.flags = flags | ESDL_TRANS_ROW_IN;
@@ -1814,7 +1804,12 @@ void Esdl2Transformer::processHPCCResult(IEspContext &ctx, IEsdlDefMethod &mthde
                 {
                     Esdl2Response *resp = dynamic_cast<Esdl2Response *>(root);
                     if (resp)
-                        resp->processChildNamedResponse(tctx, restype);
+                    {
+                        if (subresdsname)
+                            resp->processChildNamedResponse(tctx, restype);
+                        else
+                            resp->process(tctx, restype);
+                    }
                 }
             }
             else if (strnicmp(dataset, "VendorGatewayRecords", 20)==0)

+ 1 - 0
esp/scm/ws_fs.ecm

@@ -92,6 +92,7 @@ ESPStruct [nil_remove] GroupNode
 {
     string Name;
     string ClusterType;
+    bool ReplicateOutputs;
 };
 
 ESPStruct DFUException

+ 1 - 1
esp/services/WsDeploy/WsDeployEngine.cpp

@@ -550,7 +550,7 @@ void CWsDeployEngine::printStatus(IDeployTask* task)
     return;
 
   StringBuffer xpath;
-  xpath.appendf("Task[@id='%"I64F"d']", (__int64)task);
+  xpath.appendf("Task[@id='%" I64F "d']", (__int64)task);
   IPropertyTree* pTask = pTasks->queryPropTree(xpath.str());
 
   if (!pTask)

+ 39 - 39
esp/services/WsDeploy/WsDeployService.cpp

@@ -34,17 +34,17 @@
 #define STANDARD_CONFIG_SOURCEDIR CONFIG_DIR
 #define STANDARD_CONFIG_STAGED_PATH "/etc/HPCCSystems/environment.xml"
 
-#define DEFAULT_DIRECTORIES "<Directories name=\""DIR_NAME"\">\
-      <Category dir=\""EXEC_PREFIX"/log/[NAME]/[INST]\" name=\"log\"/>\
-      <Category dir=\""EXEC_PREFIX"/lib/[NAME]/[INST]\" name=\"run\"/>\
-      <Category dir=\""CONFIG_PREFIX"/[NAME]/[INST]\" name=\"conf\"/>\
-      <Category dir=\""EXEC_PREFIX"/lib/[NAME]/[INST]/temp\" name=\"temp\"/> \
-      <Category dir=\""EXEC_PREFIX"/lib/[NAME]/hpcc-data/[COMPONENT]\" name=\"data\"/> \
-      <Category dir=\""EXEC_PREFIX"/lib/[NAME]/hpcc-data2/[COMPONENT]\" name=\"data2\"/> \
-      <Category dir=\""EXEC_PREFIX"/lib/[NAME]/hpcc-data3/[COMPONENT]\" name=\"data3\"/> \
-      <Category dir=\""EXEC_PREFIX"/lib/[NAME]/hpcc-mirror/[COMPONENT]\" name=\"mirror\"/> \
-      <Category dir=\""EXEC_PREFIX"/lib/[NAME]/queries/[INST]\" name=\"query\"/> \
-      <Category dir=\""EXEC_PREFIX"/lock/[NAME]/[INST]\" name=\"lock\"/> \
+#define DEFAULT_DIRECTORIES "<Directories name=\"" DIR_NAME "\">\
+      <Category dir=\"" EXEC_PREFIX "/log/[NAME]/[INST]\" name=\"log\"/>\
+      <Category dir=\"" EXEC_PREFIX "/lib/[NAME]/[INST]\" name=\"run\"/>\
+      <Category dir=\"" CONFIG_PREFIX "/[NAME]/[INST]\" name=\"conf\"/>\
+      <Category dir=\"" EXEC_PREFIX "/lib/[NAME]/[INST]/temp\" name=\"temp\"/> \
+      <Category dir=\"" EXEC_PREFIX "/lib/[NAME]/hpcc-data/[COMPONENT]\" name=\"data\"/> \
+      <Category dir=\"" EXEC_PREFIX "/lib/[NAME]/hpcc-data2/[COMPONENT]\" name=\"data2\"/> \
+      <Category dir=\"" EXEC_PREFIX "/lib/[NAME]/hpcc-data3/[COMPONENT]\" name=\"data3\"/> \
+      <Category dir=\"" EXEC_PREFIX "/lib/[NAME]/hpcc-mirror/[COMPONENT]\" name=\"mirror\"/> \
+      <Category dir=\"" EXEC_PREFIX "/lib/[NAME]/queries/[INST]\" name=\"query\"/> \
+      <Category dir=\"" EXEC_PREFIX "/lock/[NAME]/[INST]\" name=\"lock\"/> \
       </Directories>"
 #include <vector>
 
@@ -1406,7 +1406,7 @@ bool CWsDeployFileInfo::saveSetting(IEspContext &context, IEspSaveSettingRequest
             IPropertyTree* pSrv = &iter->query();
 
             const char* pszName = pSrv->queryProp(XML_ATTR_NAME);
-            xpath.clear().appendf(XML_TAG_ROXIECLUSTER"[@name='%s']/"XML_TAG_ROXIE_SERVER"[@name='%s']/", pszCompName, pszName);
+            xpath.clear().appendf(XML_TAG_ROXIECLUSTER "[@name='%s']/" XML_TAG_ROXIE_SERVER "[@name='%s']/", pszCompName, pszName);
           
             IPropertyTree* pServer = pEnvSoftware->queryPropTree(xpath.str());
             if (pServer)
@@ -1784,7 +1784,7 @@ bool CWsDeployFileInfo::saveSetting(IEspContext &context, IEspSaveSettingRequest
       {
         if (!strcmp(pszAttrName, "name"))
         {
-          xpath.clear().appendf("%s["XML_ATTR_NAME"='%s']", pszSubType, pszNewValue);
+          xpath.clear().appendf("%s[" XML_ATTR_NAME "='%s']", pszSubType, pszNewValue);
 
           if (pEnvHardware->queryPropTree(xpath.str()))
             throw MakeStringException(-1, "Another item exists with the same name '%s'!  Please specify a unique name.", pszNewValue);
@@ -1841,18 +1841,18 @@ bool CWsDeployFileInfo::saveSetting(IEspContext &context, IEspSaveSettingRequest
           if (!strcmp(pszSubType, XML_TAG_COMPUTER))
           {
             UpdateRefAttributes(pEnvRoot, XML_TAG_SOFTWARE"//*", XML_ATTR_COMPUTER, pszOldValue, pszNewValue);
-            UpdateRefAttributes(pEnvRoot, XML_TAG_SOFTWARE"/"XML_TAG_DALISERVERPROCESS, XML_ATTR_BACKUPCOMPUTER, pszOldValue, pszNewValue);
+            UpdateRefAttributes(pEnvRoot, XML_TAG_SOFTWARE "/" XML_TAG_DALISERVERPROCESS, XML_ATTR_BACKUPCOMPUTER, pszOldValue, pszNewValue);
           }
           else if (!strcmp(pszSubType, XML_TAG_DOMAIN))
-            UpdateRefAttributes(pEnvRoot, XML_TAG_HARDWARE"/"XML_TAG_COMPUTER, XML_ATTR_DOMAIN, pszOldValue, pszNewValue);
+            UpdateRefAttributes(pEnvRoot, XML_TAG_HARDWARE "/" XML_TAG_COMPUTER, XML_ATTR_DOMAIN, pszOldValue, pszNewValue);
           else if (!strcmp(pszSubType, XML_TAG_SWITCH))
-            UpdateRefAttributes(pEnvRoot, XML_TAG_HARDWARE"/"XML_TAG_COMPUTER, XML_ATTR_SWITCH, pszOldValue, pszNewValue);
+            UpdateRefAttributes(pEnvRoot, XML_TAG_HARDWARE "/" XML_TAG_COMPUTER, XML_ATTR_SWITCH, pszOldValue, pszNewValue);
           else if (!strcmp(pszSubType, XML_TAG_COMPUTERTYPE))
-            UpdateRefAttributes(pEnvRoot, XML_TAG_HARDWARE"/"XML_TAG_COMPUTER, XML_ATTR_COMPUTERTYPE, pszOldValue, pszNewValue);
+            UpdateRefAttributes(pEnvRoot, XML_TAG_HARDWARE "/" XML_TAG_COMPUTER, XML_ATTR_COMPUTERTYPE, pszOldValue, pszNewValue);
         }
         else if (!strcmp(pszAttrName, "netAddress"))
         {
-          Owned<IPropertyTreeIterator> iter = pEnvRoot->getElements(XML_TAG_SOFTWARE"//*");
+          Owned<IPropertyTreeIterator> iter = pEnvRoot->getElements(XML_TAG_SOFTWARE "//*");
           for (iter->first(); iter->isValid(); iter->next())
           {
             IPropertyTree& node = iter->query();
@@ -2524,7 +2524,7 @@ bool CWsDeployFileInfo::getValue(IEspContext &context, IEspGetValueRequest &req,
       String str(szPath);
       Owned<IPropertyTreeIterator> iter; 
       if (str.startsWith(XML_TAG_SOFTWARE) || 
-        str.startsWith(XML_TAG_HARDWARE) || 
+        str.startsWith(XML_TAG_HARDWARE) ||
         str.startsWith(XML_TAG_PROGRAMS))
         iter.setown(pEnvRoot->getElements(szPath));
       else
@@ -2601,7 +2601,7 @@ bool CWsDeployFileInfo::getValue(IEspContext &context, IEspGetValueRequest &req,
   }
   else if(pszQueryType && !strcmp(pszQueryType, "DomainsAndComputerTypes"))
   {
-    xpath.clear().append(XML_TAG_HARDWARE"/"XML_TAG_DOMAIN);
+    xpath.clear().append(XML_TAG_HARDWARE "/" XML_TAG_DOMAIN);
     sbMultiple.append("<Domains>");
     bool flag = false;
     Owned<IPropertyTreeIterator> pDomains = pEnvRoot->getElements(xpath.str());
@@ -2618,7 +2618,7 @@ bool CWsDeployFileInfo::getValue(IEspContext &context, IEspGetValueRequest &req,
 
     flag = false;
 
-    xpath.clear().append(XML_TAG_HARDWARE"/"XML_TAG_COMPUTERTYPE);
+    xpath.clear().append(XML_TAG_HARDWARE "/" XML_TAG_COMPUTERTYPE);
     sbMultiple.append("<ComputerTypes>");
     Owned<IPropertyTreeIterator> pCTypes = pEnvRoot->getElements(xpath.str());
     ForEach(*pCTypes)
@@ -2643,13 +2643,13 @@ bool CWsDeployFileInfo::getValue(IEspContext &context, IEspGetValueRequest &req,
         xpath.append("/").append(pszBldSet);
 
     if (pszCompName)
-        xpath.appendf("["XML_ATTR_NAME"='%s']", pszCompName);
+        xpath.appendf("[" XML_ATTR_NAME "='%s']", pszCompName);
 
     if (pszSubType)
         xpath.append("/").append(pszSubType);
 
     if (pszSubTypeName)
-        xpath.appendf("["XML_ATTR_NAME"='%s']", pszSubTypeName);
+        xpath.appendf("[" XML_ATTR_NAME "='%s']", pszSubTypeName);
 
     if (pszAttrName)
         xpath.appendf("/@%s", pszAttrName);
@@ -2848,7 +2848,7 @@ void CWsDeployFileInfo::setEnvironment(IEspContext &context, IConstWsDeployReqIn
     if (reqInfo)
       sbUserWithLock.clear().append(reqInfo->getUserId());
     context.getPeer(sbUserIp);
-    sXML.appendf("<"XML_HEADER">\n<!-- Set via %s call by %s from ip %s on %s -->\n", fnName, sbUserWithLock.str(), sbUserIp.str(), tmp.str()); 
+    sXML.appendf("<" XML_HEADER ">\n<!-- Set via %s call by %s from ip %s on %s -->\n", fnName, sbUserWithLock.str(), sbUserIp.str(), tmp.str());
     toXML(pEnvRoot, sXML, 0, XML_SortTags | XML_Format);
     m_pFileIO->write(0, sXML.length(), sXML.str());
     m_lastSaved.clear();
@@ -4815,13 +4815,13 @@ bool CWsDeployFileInfo::handleComputer(IEspContext &context, IEspHandleComputerR
 
       const char* name = pComp->queryProp(XML_ATTR_NAME);
       if (!strcmp(type, XML_TAG_COMPUTER))
-        xpath.clear().appendf(XML_TAG_SOFTWARE"//["XML_ATTR_COMPUTER"=\"%s\"]", name);
+        xpath.clear().appendf(XML_TAG_SOFTWARE"//[" XML_ATTR_COMPUTER "=\"%s\"]", name);
       else if (!strcmp(type, XML_TAG_COMPUTERTYPE))
-        xpath.clear().appendf(XML_TAG_HARDWARE"//["XML_ATTR_COMPUTERTYPE"=\"%s\"]", name);
+        xpath.clear().appendf(XML_TAG_HARDWARE "//[" XML_ATTR_COMPUTERTYPE "=\"%s\"]", name);
       else if (!strcmp(type, XML_TAG_DOMAIN))
-        xpath.clear().appendf(XML_TAG_HARDWARE"//["XML_ATTR_DOMAIN"=\"%s\"]", name);
+        xpath.clear().appendf(XML_TAG_HARDWARE "//[" XML_ATTR_DOMAIN "=\"%s\"]", name);
       else if (!strcmp(type, XML_TAG_SWITCH))
-        xpath.clear().appendf(XML_TAG_HARDWARE"//["XML_ATTR_SWITCH"=\"%s\"]", name);
+        xpath.clear().appendf(XML_TAG_HARDWARE "//[" XML_ATTR_SWITCH "=\"%s\"]", name);
 
       Owned<IPropertyTreeIterator> iter = pEnvRoot->getElements(xpath.str());
 
@@ -4853,7 +4853,7 @@ bool CWsDeployFileInfo::handleComputer(IEspContext &context, IEspHandleComputerR
         ForEach (*iterComputers)
         {
           IPropertyTree* pComp = &iterComputers->query();
-          xpath.clear().appendf(XML_TAG_HARDWARE"/%s["XML_ATTR_NAME"=\"%s\"]", type, pComp->queryProp(XML_ATTR_NAME));
+          xpath.clear().appendf(XML_TAG_HARDWARE "/%s[" XML_ATTR_NAME "=\"%s\"]", type, pComp->queryProp(XML_ATTR_NAME));
           IPropertyTree* pTree = pEnvRoot->queryPropTree(xpath.str());
           sb.appendf("<Computer netAddress='%s'/>", pTree->queryProp(XML_ATTR_NETADDRESS));
         }
@@ -4869,7 +4869,7 @@ bool CWsDeployFileInfo::handleComputer(IEspContext &context, IEspHandleComputerR
       ForEach (*iterComputers)
       {
         IPropertyTree* pComp = &iterComputers->query();
-        xpath.clear().appendf(XML_TAG_HARDWARE"/%s["XML_ATTR_NAME"=\"%s\"]", type, pComp->queryProp(XML_ATTR_NAME));
+        xpath.clear().appendf(XML_TAG_HARDWARE "/%s[" XML_ATTR_NAME "=\"%s\"]", type, pComp->queryProp(XML_ATTR_NAME));
         IPropertyTree* pTree = pEnvRoot->queryPropTree(xpath.str());
         pEnvRoot->queryPropTree(XML_TAG_HARDWARE)->removeTree(pTree);
       }
@@ -4993,7 +4993,7 @@ bool CWsDeployFileInfo::handleTopology(IEspContext &context, IEspHandleTopologyR
   {
     if (!strcmp(compType, XML_TAG_THORCLUSTER))
     {
-        StringBuffer xpath("./"XML_TAG_THORCLUSTER);
+        StringBuffer xpath("./" XML_TAG_THORCLUSTER);
         xpath.appendf("[%s=\"%s\"]", XML_ATTR_PROCESS, name);
 
         IPropertyTree *pParent = pEnvRoot->queryPropTree(subPath.str());
@@ -5009,7 +5009,7 @@ bool CWsDeployFileInfo::handleTopology(IEspContext &context, IEspHandleTopologyR
     else
     {
         String sParent(buf.str());
-        StringBuffer sbParent(XML_TAG_SOFTWARE"/"XML_TAG_TOPOLOGY);
+        StringBuffer sbParent(XML_TAG_SOFTWARE "/" XML_TAG_TOPOLOGY);
         int idx = sParent.lastIndexOf('/');
 
         if (idx > 0)
@@ -5743,7 +5743,7 @@ void CWsDeployFileInfo::saveEnvironment(IEspContext* pContext, IConstWsDeployReq
 
     dt.setNow();
     dt.getString(tmp.clear());
-    sXML.appendf("<"XML_HEADER">\n<!-- Edited with ConfigMgr on ip %s on %s -->\n", m_userIp.str(), tmp.str()); 
+    sXML.appendf("<" XML_HEADER ">\n<!-- Edited with ConfigMgr on ip %s on %s -->\n", m_userIp.str(), tmp.str());
     toXML(pEnvRoot, sXML, 0, XML_SortTags | XML_Format);
 
     if (m_bCloud && pContext)
@@ -5916,7 +5916,7 @@ void CWsDeployFileInfo::unlockEnvironment(IEspContext* context, IConstWsDeployRe
       ForEach (*iter)
       {
         IPropertyTree* pComputer = &iter->query();
-        xpath.clear().appendf(XML_TAG_COMPUTER"["XML_ATTR_NETADDRESS"='%s']", pComputer->queryProp(XML_ATTR_NETADDRESS));
+        xpath.clear().appendf(XML_TAG_COMPUTER "[" XML_ATTR_NETADDRESS "='%s']", pComputer->queryProp(XML_ATTR_NETADDRESS));
 
         if (!m_lockedNodesBeforeEnv->queryPropTree(xpath.str()))
           lockComputers->addPropTree(XML_TAG_COMPUTER, createPTreeFromIPT(pComputer));
@@ -5931,7 +5931,7 @@ void CWsDeployFileInfo::unlockEnvironment(IEspContext* context, IConstWsDeployRe
       ForEach (*iter)
       {
         IPropertyTree* pComputer = &iter->query();
-        xpath.clear().appendf(XML_TAG_COMPUTER"["XML_ATTR_NETADDRESS"='%s']", pComputer->queryProp(XML_ATTR_NETADDRESS));
+        xpath.clear().appendf(XML_TAG_COMPUTER "[" XML_ATTR_NETADDRESS "='%s']", pComputer->queryProp(XML_ATTR_NETADDRESS));
 
         if (!pComputers->queryPropTree(xpath.str()))
           unlockComputers->addPropTree(XML_TAG_COMPUTER, createPTreeFromIPT(pComputer));
@@ -5955,7 +5955,7 @@ void CWsDeployFileInfo::unlockEnvironment(IEspContext* context, IConstWsDeployRe
       ForEach (*iter)
       {
         IPropertyTree* pComputer = &iter->query();
-        xpath.clear().appendf(XML_TAG_COMPUTER"["XML_ATTR_NETADDRESS"='%s']", pComputer->queryProp(XML_ATTR_NETADDRESS));
+        xpath.clear().appendf(XML_TAG_COMPUTER "[" XML_ATTR_NETADDRESS "='%s']", pComputer->queryProp(XML_ATTR_NETADDRESS));
 
         IPropertyTree* pDelComputer = m_lockedNodesBeforeEnv->queryPropTree(xpath.str());
         m_lockedNodesBeforeEnv->removeTree(pDelComputer);
@@ -7218,8 +7218,8 @@ CWsDeployExCE* createWsDeployEE(IPropertyTree *cfg, const char* name)
 CWsDeployExCE* createWsDeployCE(IPropertyTree *cfg, const char* name)
 {
   StringBuffer sb;
-  sb.append(XML_TAG_SOFTWARE"/"XML_TAG_ESPPROCESS"/"XML_TAG_ESPBINDING"/");
-  sb.appendf("["XML_ATTR_SERVICE"='%s']", name);
+  sb.append(XML_TAG_SOFTWARE "/" XML_TAG_ESPPROCESS "/" XML_TAG_ESPBINDING"/");
+  sb.appendf("[" XML_ATTR_SERVICE "='%s']", name);
   IPropertyTree* pTree = cfg->queryPropTree(sb.str());
   const char* ver = "CE";
   if (pTree)
@@ -7331,7 +7331,7 @@ bool CWsDeployFileInfo::checkForRequiredComponents(IPropertyTree* pEnvRoot, cons
       }
     }
 
-    xpath.clear().appendf(XML_TAG_INSTANCE"["XML_ATTR_NETADDRESS"='%s']", ip);
+    xpath.clear().appendf(XML_TAG_INSTANCE "[" XML_ATTR_NETADDRESS "='%s']", ip);
     IPropertyTree* pInst = pCompTree->queryPropTree(xpath.str());
 
     if (!pInst)

+ 5 - 5
esp/services/esdl_svc_engine/esdl_binding.cpp

@@ -771,7 +771,7 @@ EsdlBindingImpl::EsdlBindingImpl(IPropertyTree* cfg,
         if (!m_bndCfg)
             DBGLOG("ESDL Binding: Warning could not fetch ESDL bind information for this ESP Binding %s", binding);
 
-        m_esdl.setown(createEsdlDefinition());
+        m_esdl.setown(createNewEsdlDefinition());
         m_xsdgen.setown(createEsdlDefinitionHelper());
     }
     catch(IException* e)
@@ -2418,11 +2418,11 @@ void EsdlBindingImpl::CESDLBindingSubscription::notify(SubscriptionId id, const
 
     if (id != sub_id)
     {
-        DBGLOG("ESDL Binding %s.%s (Dali subscription (%"I64F"d)) received notification for unrecognized dali subscription id: (%"I64F"d)", thisBinding->m_processName.get(), thisBinding->m_bindingName.get(), (__int64) sub_id, (__int64) id);
+        DBGLOG("ESDL Binding %s.%s (Dali subscription (%" I64F "d)) received notification for unrecognized dali subscription id: (%" I64F "d)", thisBinding->m_processName.get(), thisBinding->m_bindingName.get(), (__int64) sub_id, (__int64) id);
         return;
     }
 
-    DBGLOG("ESDL binding change reported to %s.%s binding: (%"I64F"d) of %s - flags = %d", thisBinding->m_processName.get(), thisBinding->m_bindingName.get(), (__int64) id, xpath, flags);
+    DBGLOG("ESDL binding change reported to %s.%s binding: (%" I64F "d) of %s - flags = %d", thisBinding->m_processName.get(), thisBinding->m_bindingName.get(), (__int64) id, xpath, flags);
 
     StringBuffer parentElementXPath;
     //path is reported with sibbling number annotation ie /ESDL/Bindings/Binding[2]/...
@@ -2473,11 +2473,11 @@ void EsdlBindingImpl::CESDLDefinitionSubscription::notify(SubscriptionId id, con
 
     if (id != sub_id)
     {
-        DBGLOG("ESDL Binding %s.%s (Dali subscription (%"I64F"d)) received notification for unrecognized dali subscription id: (%"I64F"d)", thisBinding->m_processName.get(), thisBinding->m_bindingName.get(), (__int64) sub_id, (__int64) id);
+        DBGLOG("ESDL Binding %s.%s (Dali subscription (%" I64F "d)) received notification for unrecognized dali subscription id: (%" I64F "d)", thisBinding->m_processName.get(), thisBinding->m_bindingName.get(), (__int64) sub_id, (__int64) id);
         return;
     }
 
-    DBGLOG("ESDL definition change reported to %s.%s binding: (%"I64F"d) of %s - flags = %d", thisBinding->m_processName.get(), thisBinding->m_bindingName.get(), (__int64) id, xpath, flags);
+    DBGLOG("ESDL definition change reported to %s.%s binding: (%" I64F "d) of %s - flags = %d", thisBinding->m_processName.get(), thisBinding->m_bindingName.get(), (__int64) id, xpath, flags);
 
     StringBuffer parentElementXPath;
     //path is reported with sibbling number annotation ie /ESDL/Definitions/Definition[2]/...

+ 1 - 1
esp/services/ws_fileio/ws_fileioservice.cpp

@@ -253,7 +253,7 @@ bool CWsFileIOEx::onReadFileData(IEspContext &context, IEspReadFileDataRequest &
     __int64 size = io->size();
     if (offset >= size)
     {
-        result.appendf("Invalid offset: file size = %"I64F"d.", size);
+        result.appendf("Invalid offset: file size = %" I64F "d.", size);
         resp.setResult(result.str());
         return true;
     }

+ 6 - 3
esp/services/ws_fs/ws_fsService.cpp

@@ -3189,11 +3189,14 @@ bool CFileSprayEx::onDeleteDropZoneFiles(IEspContext &context, IEspDeleteDropZon
     return true;
 }
 
-void CFileSprayEx::appendGroupNode(IArrayOf<IEspGroupNode>& groupNodes, const char* nodeName, const char* clusterType)
+void CFileSprayEx::appendGroupNode(IArrayOf<IEspGroupNode>& groupNodes, const char* nodeName, const char* clusterType,
+    bool replicateOutputs)
 {
     Owned<IEspGroupNode> node = createGroupNode();
     node->setName(nodeName);
     node->setClusterType(clusterType);
+    if (replicateOutputs)
+        node->setReplicateOutputs(replicateOutputs);
     groupNodes.append(*node.getClear());
 }
 
@@ -3225,7 +3228,7 @@ bool CFileSprayEx::onGetSprayTargets(IEspContext &context, IEspGetSprayTargetsRe
 
             bool* found = uniqueThorClusterGroupNames.getValue(thorClusterGroupName.str());
             if (!found || !*found)
-                appendGroupNode(sprayTargets, thorClusterGroupName.str(), "thor");
+                appendGroupNode(sprayTargets, thorClusterGroupName.str(), "thor", cluster.getPropBool("@replicateOutputs", false));
         }
 
         //Fetch all the group names for all the hthor instances
@@ -3254,7 +3257,7 @@ bool CFileSprayEx::onGetSprayTargets(IEspContext &context, IEspGetSprayTargetsRe
                 if (ins>1)
                     gname.append('_').append(ins);
 
-                appendGroupNode(sprayTargets, gname.str(), "hthor");
+                appendGroupNode(sprayTargets, gname.str(), "hthor", false);
             }
         }
 

+ 1 - 1
esp/services/ws_fs/ws_fsService.hpp

@@ -112,7 +112,7 @@ protected:
     bool ParseLogicalPath(const char * pLogicalPath, StringBuffer &title);
     bool ParseLogicalPath(const char * pLogicalPath, const char *group, const char* cluster, StringBuffer &folder, StringBuffer &title, StringBuffer &defaultFolder, StringBuffer &defaultReplicateFolder);
     StringBuffer& getAcceptLanguage(IEspContext& context, StringBuffer& acceptLanguage);
-    void appendGroupNode(IArrayOf<IEspGroupNode>& groupNodes, const char* nodeName, const char* clusterType);
+    void appendGroupNode(IArrayOf<IEspGroupNode>& groupNodes, const char* nodeName, const char* clusterType, bool replicateOutputs);
 };
 
 #endif //_ESPWIZ_FileSpray_HPP__

+ 1 - 1
esp/services/ws_workunits/ws_workunitsQuerySets.cpp

@@ -1177,7 +1177,7 @@ bool addWUQSQueryFilterInt(WUQuerySortField *filters, unsigned short &count, Mem
 
 bool addWUQSQueryFilterInt64(WUQuerySortField *filters, unsigned short &count, MemoryBuffer &buff, __int64 value, WUQuerySortField name)
 {
-    VStringBuffer vBuf("%"I64F"d", value);
+    VStringBuffer vBuf("%" I64F "d", value);
     filters[count++] = name;
     buff.append(vBuf.str());
     return true;

+ 2 - 14
esp/services/ws_workunits/ws_workunitsService.cpp

@@ -883,18 +883,6 @@ bool CWsWorkunitsEx::onWUResubmit(IEspContext &context, IEspWUResubmitRequest &r
                 if(!cw)
                     throw MakeStringException(ECLWATCH_CANNOT_OPEN_WORKUNIT,"Cannot open workunit %s.",wuid.str());
 
-                //Dont allow resubmit of someone else's workunit
-                if (context.querySecManager())
-                {
-                    IUserDescriptor * owner = cw->queryUserDescriptor();
-                    if (!owner)
-                        throw MakeStringException(ECLWATCH_CANNOT_SUBMIT_WORKUNIT,"Workunit User Descriptor missing on %s", wuid.str());
-                    StringBuffer ownerUserName;
-                    owner->getUserName(ownerUserName);
-                    if (strcmp(context.queryUser()->getName(), ownerUserName.str()))
-                        throw MakeStringException(ECLWATCH_CANNOT_SUBMIT_WORKUNIT,"Cannot resubmit another user's workunit %s.", wuid.str());
-                }
-
                 WsWuHelpers::submitWsWorkunit(context, cw, NULL, NULL, 0, req.getRecompile(), req.getResetWorkflow(), false);
 
                 if (version < 1.40)
@@ -2825,7 +2813,7 @@ bool CWsWorkunitsEx::onWUResult(IEspContext &context, IEspWUResultRequest &req,
         unsigned seq = req.getSequence();
         bool inclXsd = !req.getSuppressXmlSchema();
 
-        VStringBuffer filter("start=%"I64F"d;count=%d", start, count);
+        VStringBuffer filter("start=%" I64F "d;count=%d", start, count);
         addToQueryString(filter, "clusterName", req.getCluster(), ';');
         addToQueryString(filter, "logicalName", req.getLogicalName(), ';');
         if (wuid && *wuid)
@@ -4100,7 +4088,7 @@ bool CWsWorkunitsEx::onWUCreateZAPInfo(IEspContext &context, IEspWUCreateZAPInfo
         nameStr.append("ZAPReport_").append(req.getWuid()).append('_').append(userName.str());
 
         //create a folder for WU ZAP files
-        const char* zipFolder = "tempzipfiles"PATHSEPSTR;
+        const char* zipFolder = "tempzipfiles" PATHSEPSTR;
         folderToZIP.append(zipFolder).append(nameStr.str());
         Owned<IFile> zipDir = createIFile(folderToZIP.str());
         if (!zipDir->exists())

+ 1 - 1
esp/src/dijit

@@ -1 +1 @@
-Subproject commit 14c9e5c6f9b0e58a5fbd56427ea337bfd9793606
+Subproject commit fe3c08c576b195e895f71b396b34c6705f6cef41

+ 1 - 1
esp/src/dojo

@@ -1 +1 @@
-Subproject commit 6a8b1f2a0ca37e1829bc92eb9ad78895c8b06236
+Subproject commit 705a57f0f51957b760e20c92a35b6ca74edb99a2

+ 1 - 1
esp/src/dojox

@@ -1 +1 @@
-Subproject commit 669da62f5b56baf5ca145997200d44079572c462
+Subproject commit 40a26d42949e576ef280c9f78bff12fe9d30853e

+ 3 - 4
esp/src/eclwatch/ESPUtil.js

@@ -34,12 +34,11 @@ define([
     "dgrid/Selection",
     "dgrid/extensions/ColumnResizer",
     "dgrid/extensions/ColumnHider",
-    "dgrid/extensions/ColumnReorder",
     "dgrid/extensions/DijitRegistry",
     "dgrid/extensions/Pagination"
 ], function (declare, lang, i18n, nlsHPCC, arrayUtil, domClass, Stateful, query, json, aspect,
     registry, Tooltip,
-    Grid, OnDemandGrid, Keyboard, Selection, ColumnResizer, ColumnHider, ColumnReorder, DijitRegistry, Pagination) {
+    Grid, OnDemandGrid, Keyboard, Selection, ColumnResizer, ColumnHider, DijitRegistry, Pagination) {
 
     var SingletonData = declare([Stateful], {
         //  Attributes  ---
@@ -263,7 +262,7 @@ define([
             var baseClass = [];
             var params = {};
             if (pagination) {
-                baseClass = [Grid, Pagination, ColumnResizer, ColumnHider, ColumnReorder, Keyboard, DijitRegistry];
+                baseClass = [Grid, Pagination, ColumnResizer, ColumnHider, Keyboard, DijitRegistry];
                 lang.mixin(params, {
                     rowsPerPage: 50,
                     pagingLinks: 1,
@@ -272,7 +271,7 @@ define([
                     pageSizeOptions: [25, 50, 100, 1000]
                 });
             } else {
-                baseClass = [OnDemandGrid, ColumnResizer, ColumnHider, ColumnReorder, Keyboard, DijitRegistry];
+                baseClass = [OnDemandGrid, ColumnResizer, ColumnHider, Keyboard, DijitRegistry];
             }
             if (selection) {
                 baseClass.push(Selection);

+ 8 - 0
esp/src/eclwatch/SFDetailsWidget.js

@@ -204,6 +204,9 @@ define([
                 },
                 store: this.subfilesStore
             }, this.id + "SubfilesGrid");
+            this.subfilesGrid.onSelectionChanged(function (event) {
+                context.refreshActionState();
+            });
             this.subfilesGrid.startup();
         },
 
@@ -256,6 +259,11 @@ define([
                 domClass.remove(this.id + "StateIdImage");
                 domClass.add(this.id + "StateIdImage", this.logicalFile.getStateIconClass());
             }
+        },
+
+        refreshActionState: function () {
+            var selection = this.subfilesGrid.getSelected();
+            registry.byId(this.id + "Remove").set("disabled", !selection.length);
         }
     });
 });

+ 4 - 0
esp/src/eclwatch/nls/hpcc.js

@@ -34,6 +34,7 @@ define({root:
     ArchivedWarning: "Warning: please specify a small date range. If not, it may take some time to retrieve the workunits and the browser may be timed out.",
     BinaryInstalls: "Binary Installs",
     AutoRefresh: "Auto Refresh",
+    Back: "Back",
     BannerColor: "Banner Colour",
     BannerMessage: "Banner Message",
     BannerScroll: "Banner Scroll",
@@ -89,6 +90,7 @@ define({root:
     DeleteSelectedUsers: "Delete selected user(s)?",
     DeleteSelectedWorkunits: "Delete Selected Workunits?",
     DeleteSuperfile: "Delete Superfile?",
+    DeleteSuperfile2: "Delete Superfile",
     DeleteThisPackage: "Delete this package?",
     Delimited: "Delimited",
     DenyAccess: "<center>Deny<br>Access</center>",
@@ -170,6 +172,7 @@ define({root:
     Fixed: "Fixed",
     Folder: "Folder",
     Format: "Format",
+    Forward: "Forward",
     FromDate: "From Date",
     FromSizes: "From Sizes",
     FullName: "Full Name",
@@ -375,6 +378,7 @@ define({root:
     RemoteDali: "Remote Dali",
     RemoteDaliIP: "Remote Dali IP Address",
     Remove: "Remove",
+    RemoveSubfiles: "Remove Subfile(s)",
     RemoveUser: "You are about to remove yourself from the group:",
     Rename: "Rename",
     RenderedSVG: "Rendered SVG",

+ 2 - 2
esp/src/eclwatch/templates/GraphWidget.html

@@ -3,8 +3,8 @@
         <div id="${id}ToolbarContentPane" class="${baseClass}ToolbarContentPane" style="padding: 0px; overflow: hidden" data-dojo-props="region: 'top'" data-dojo-type="dijit.layout.ContentPane">
             <div id="${id}Toolbar" class="topPanel dijit dijitToolbar" role="toolbar">
                 <div data-dojo-attach-event="onClick:_onClickRefresh" data-dojo-props="iconClass:'iconRefresh', showLabel:false" data-dojo-type="dijit.form.Button">${i18n.Refresh}</div>
-                <div id="${id}Previous" data-dojo-attach-event="onClick:_onClickPrevious" data-dojo-props="iconClass:'iconLeft', showLabel:false" data-dojo-type="dijit.form.Button">${i18n.Refresh}</div>
-                <div id="${id}Next" data-dojo-attach-event="onClick:_onClickNext" data-dojo-props="iconClass:'iconRight', showLabel:false" data-dojo-type="dijit.form.Button">${i18n.Refresh}</div>
+                <div id="${id}Previous" data-dojo-attach-event="onClick:_onClickPrevious" data-dojo-props="iconClass:'iconLeft', showLabel:false" data-dojo-type="dijit.form.Button">${i18n.Back}</div>
+                <div id="${id}Next" data-dojo-attach-event="onClick:_onClickNext" data-dojo-props="iconClass:'iconRight', showLabel:false" data-dojo-type="dijit.form.Button">${i18n.Forward}</div>
                 <span data-dojo-type="dijit.ToolbarSeparator"></span>
                 <div data-dojo-attach-event="onClick:_onClickZoomOrig" data-dojo-props="iconClass:'iconZoomOrig', showLabel:false" data-dojo-type="dijit.form.Button">${i18n.Zoom100Pct}</div>
                 <div data-dojo-attach-event="onClick:_onClickZoomAll" data-dojo-props="iconClass:'iconZoomAll', showLabel:false" data-dojo-type="dijit.form.Button">${i18n.ZoomAll}</div>

+ 2 - 2
esp/src/eclwatch/templates/SFDetailsWidget.html

@@ -6,7 +6,7 @@
                     <div id="${id}Refresh" data-dojo-attach-event="onClick:_onRefresh" data-dojo-props="iconClass:'iconRefresh'" data-dojo-type="dijit.form.Button">${i18n.Refresh}</div>
                     <span data-dojo-type="dijit.ToolbarSeparator"></span>
                     <div id="${id}Save" data-dojo-attach-event="onClick:_onSave" data-dojo-type="dijit.form.Button">${i18n.Save}</div>
-                    <div id="${id}Delete" data-dojo-attach-event="onClick:_onDelete" data-dojo-type="dijit.form.Button">${i18n.Delete}</div>
+                    <div id="${id}Delete" data-dojo-attach-event="onClick:_onDelete" data-dojo-type="dijit.form.Button">${i18n.DeleteSuperfile2}</div>
                     <span data-dojo-type="dijit.ToolbarSeparator"></span>
                     <div id="${id}NewPage" class="right" data-dojo-attach-event="onClick:_onNewPage" data-dojo-props="iconClass:'iconNewPage', showLabel:false" data-dojo-type="dijit.form.Button">${i18n.OpenInNewPage}</div>
                 </div>
@@ -29,7 +29,7 @@
                 </div>
                 <div style="width: 100%; height: 66%" data-dojo-props="region: 'bottom', splitter: true, minSize: 120" data-dojo-type="dijit.layout.BorderContainer">
                     <div class="topPanel" data-dojo-props="region: 'top'" data-dojo-type="dijit.Toolbar">
-                        <div id="${id}Remove" data-dojo-attach-event="onClick:_onRemove" data-dojo-type="dijit.form.Button">${i18n.Remove}</div>
+                        <div id="${id}Remove" data-dojo-attach-event="onClick:_onRemove" data-dojo-type="dijit.form.Button">${i18n.RemoveSubfiles}</div>
                     </div>
                     <div id="${id}SubfilesGridCP" style="padding: 0px; border:0px; border-color:none" data-dojo-props="region: 'center'" data-dojo-type="dijit.layout.ContentPane">
                         <div id="${id}SubfilesGrid">

+ 1 - 1
esp/src/util

@@ -1 +1 @@
-Subproject commit d6cb5639c09dc7699b6262c926cc79c9f2ab3a2d
+Subproject commit c43810d56d5f3bb4781e1a89a1c99535160264cb

+ 3 - 3
esp/test/httptest/httptest.hpp

@@ -48,10 +48,10 @@ public:
         fprintf(ofile, "Total hits:                       %d\n", numrequests);
         fprintf(ofile, "Time taken(millisecond):          %d\n", msecs);
         fprintf(ofile, "Hits per second:                  %3.1f\n", numrequests/(msecs*0.001));
-        fprintf(ofile, "Total data sent:                  %"I64F"d\n", totalreqlen);
-        fprintf(ofile, "Total data received:              %"I64F"d\n", totalresplen);
+        fprintf(ofile, "Total data sent:                  %" I64F "d\n", totalreqlen);
+        fprintf(ofile, "Total data received:              %" I64F "d\n", totalresplen);
         __int64 totallen = totalreqlen + totalresplen;
-        fprintf(ofile, "Total data transferred:           %"I64F"d\n", totallen);
+        fprintf(ofile, "Total data transferred:           %" I64F "d\n", totallen);
         fprintf(ofile, "Data transfered per second:       %5.1f\n", totallen/(msecs*0.001));
         fprintf(ofile, "Slowest round trip(millisecond):  %d\n", slowest);
         fprintf(ofile, "Fastest round trip(millisecond):  %d\n", fastest);

+ 2 - 2
esp/tools/soapplus/http.cpp

@@ -74,7 +74,7 @@ void HttpStat::printStat(FILE* ofile)
         {
             fprintf(ofile, "Slowest round trip(millisecond):  %d\n", slowest);
             fprintf(ofile, "Fastest round trip(millisecond):  %d\n", fastest);
-            fprintf(ofile, "Average round trip(millisecond):  %"I64F"d\n", totaltime/numrequests);
+            fprintf(ofile, "Average round trip(millisecond):  %" I64F "d\n", totaltime/numrequests);
         }
 
         if(http_tracelevel >= 5 && ofile==stdout && isatty(1))
@@ -1173,7 +1173,7 @@ int HttpClient::sendStressRequest(StringBuffer& request, HttpStat* stat)
     int duration = end - start;
 
     if(http_tracelevel >= 5)
-        fprintf(m_logfile, "Roundtrip Time (milli-second): %d, Bytes Sent: %d, Bytes Received: %"I64F"d\n", duration, sent, total_len);
+        fprintf(m_logfile, "Roundtrip Time (milli-second): %d, Bytes Sent: %d, Bytes Received: %" I64F "d\n", duration, sent, total_len);
 
     if(stat)
     {

+ 39 - 11
initfiles/bash/etc/init.d/hpcc_common.in

@@ -380,14 +380,6 @@ createRuntime() {
     chown -c $user:$group "${dir_return}"  1> /dev/null 2>/dev/null
     dir.getByName mirror
     chown -c $user:$group "${dir_return}"  1> /dev/null 2>/dev/null
-
-    # setting up ulimit for thor and other component which needs it.
-    ulimit -n 32768
-    ulimit -c unlimited
-    # for rtprio in Roxie
-    ulimit -Hr 4
-    # to enable, must also increase vm.nr_hugepages and/or vm.nr_overcommit_hugepages
-    ulimit -l unlimited
 }
 
 start_dafilesrv() {
@@ -402,8 +394,6 @@ start_dafilesrv() {
 
       noStatusCheck=1
       /etc/init.d/dafilesrv setup 1>/dev/null 2>/dev/null
-      ulimit -n 32768
-      ulimit -c unlimited
       startCmd ${compName} ${noStatusCheck}
       return $?
    else
@@ -445,6 +435,30 @@ startCmd() {
       fi
     fi
 
+    limits=(
+      MIN_Hn_nofile="32768"
+      MIN_Hc_core="unlimited"
+      MIN_Hu_nproc="8192"
+      MIN_Hr_rtprio="4"
+      MIN_Hl_memlock="unlimited" )
+
+    local i=0
+    for element in "${limits[@]}"; do
+      flag="-${element:4:2}"
+      value=${element##*"="}
+
+      default_value=$( ulimit $flag )
+      if [[ "$value" != "unlimited" ]] && ([[ "$default_value" == "unlimited" ]] || [[ "$default_value" -gt "$value" ]]); then
+        _temp=${element%%"="*}
+        _temp="${_temp}=${default_value}"
+        limits[i]=$_temp
+      fi
+      flag="-${element:5:1}"
+      ulimit $flag ${limits[i]##*"="}
+      i=$((i+1))
+    done
+
+
     UMASK_ARG=""
     if [ -n "${umask}" ]; then
         UMASK_ARG="--umask ${umask}"
@@ -476,17 +490,31 @@ startCmd() {
     fi
     eval $startcmd
 
+
     local WAITTIME=120
     local RCSTART=0
+    local COMPONENT_HAS_STARTED=0
+    local SENTINEL_CHECK=1
+
+    if [ ${compType} = "dafilesrv" ]; then
+      SENTINEL_CHECK=0
+    fi
 
     while [ ${WAITTIME} -gt 0 ]
     do
         WAITTIME=`expr ${WAITTIME} - 1`
-        check_status ${PIDPATH} ${LOCKPATH} ${COMPPIDPATH} 1
+        check_status ${PIDPATH} ${LOCKPATH} ${COMPPIDPATH} ${SENTINEL_CHECK}
         RCSTART=$?
         if [ ${RCSTART} -eq 0 ]; then
           log_success_msg
           return 0;
+        elif [ ${RCSTART} -eq 2 ]; then
+          COMPONENT_HAS_STARTED=1
+        else
+          if [ ${COMPONENT_HAS_STARTED} -eq 1 ]; then
+            log_failure_msg "${compName} failed to start cleanly"
+            return 0;
+          fi
         fi
         sleep 1
     done

+ 6 - 6
initfiles/bash/etc/init.d/pid.sh

@@ -138,7 +138,7 @@ checkPidExist() {
 #       1: Stopped Healthy
 #       2: Running w/ no sentinel file
 #       3: Stopped except sentinel orphaned
-#       4: Unhealthy, details in debug mode
+#       4: not yet in up state, details in debug mode
 check_status() {
     PIDFILEPATH=$1
     LOCKFILEPATH=$2
@@ -155,6 +155,8 @@ check_status() {
     local initRunning=$__pidExists
     checkPidExist $COMPPIDFILEPATH
     local compRunning=$__pidExists
+    checkSentinelFile
+    local sentinelFlag=$?
 
     # check if running and healthy
     if [ $pidfilepathExists -eq 1 ] && [ $comppidfilepathExists -eq 1 ] && [ $componentLocked -eq 1 ] && [ $initRunning -eq 1 ] && [ $compRunning -eq 1 ]; then
@@ -162,15 +164,14 @@ check_status() {
         echo "everything is up except sentinel"
       fi
       if [ ${SENTINELFILECHK} -eq 1 ]; then
-        checkSentinelFile
-        if [ $? -eq 0 ]; then
+        if [ ${sentinelFlag} -eq 0 ]; then
           if [ ${DEBUG} != "NO_DEBUG" ]; then
             echo "Sentinel is now up"
           fi
           return 0
         else
           if [ ${DEBUG} != "NO_DEBUG" ]; then
-            echo "Sentinel is currently down"
+            echo "Sentinel not yet located, process currently unhealthy"
           fi
           return 2
         fi
@@ -180,8 +181,7 @@ check_status() {
     # check if shutdown and healthy
     elif [ $pidfilepathExists -eq 0 ] && [ $comppidfilepathExists -eq 0 ] && [ $componentLocked -eq 0 ] && [ $initRunning -eq 0 ] && [ $compRunning -eq 0 ]; then
       if [ ${SENTINELFILECHK} -eq 1 ]; then
-        checkSentinelFile
-        if [ $? -eq 0 ]; then
+        if [ ${sentinelFlag} -eq 0 ]; then
           if [ ${DEBUG} != "NO_DEBUG" ]; then
             echo "Sentinel is up but orphaned"
           fi

+ 2 - 2
initfiles/bin/init_configesp

@@ -26,8 +26,8 @@ echo $$ > $INIT_PID_NAME
 export SENTINEL="configesp.sentinel"
 rm -f ${SENTINEL}
 
-ulimit -c unlimited
-ulimit -n 8192
+
+
 SNMPID=$$
 
 killed() {

+ 2 - 0
initfiles/bin/init_dafilesrv.in

@@ -44,8 +44,10 @@ killed(){
     kill_process ${SENTINEL} ${PID_NAME} 3
     exit 255
 }
+
 ulimit -c unlimited
 ulimit -n $handlelimit
+
 trap "killed" SIGINT SIGTERM SIGKILL
 dafilesrv -L $log -I ${INSTANCE_NAME} &
 echo $! > $PID_NAME

+ 2 - 2
initfiles/bin/init_dali

@@ -25,8 +25,8 @@ echo $$ > $INIT_PID_NAME
 export SENTINEL="daserver.sentinel"
 rm -f ${SENTINEL}
 
-ulimit -c unlimited
-ulimit -n 8192
+
+
 
 killed(){
     dalistop .

+ 3 - 3
initfiles/bin/init_dfuserver

@@ -25,9 +25,9 @@ echo $$ > $INIT_PID_NAME
 export SENTINEL="dfuserver.sentinel"
 rm -f ${SENTINEL}
 
-ulimit -c unlimited
-ulimit -n 8192
-ulimit -s 512
+
+
+
 
 killed() {
     dfuserver stop=1

+ 0 - 0
initfiles/bin/init_eclagent.in


Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio