]> SALOME platform Git repositories - tools/configuration.git/commitdiff
Salome HOME
[COTECH 88] Configuration repository
authoreap <eap@opencascade.com>
Wed, 15 Mar 2017 15:51:19 +0000 (18:51 +0300)
committereap <eap@opencascade.com>
Wed, 15 Mar 2017 15:51:19 +0000 (18:51 +0300)
XML file filled, pathches added

30 files changed:
config/patches/boost.001_fcontext.patch [new file with mode: 0644]
config/patches/boost.002_icu_formatter.patch [new file with mode: 0644]
config/patches/freeimage.001_sources.patch [new file with mode: 0644]
config/patches/freeimage.002_build_procedure.patch [new file with mode: 0644]
config/patches/freeimage.003_gcc47_compat.patch [new file with mode: 0644]
config/patches/freeimage.004_gcc66.patch [new file with mode: 0644]
config/patches/gl2ps.001_libs.patch [new file with mode: 0644]
config/patches/graphviz.001_build_procedure.patch [new file with mode: 0644]
config/patches/libxml2.001_64bits_crash.patch [new file with mode: 0755]
config/patches/matplotlib.001_build_procedure.patch [new file with mode: 0644]
config/patches/medfile.001_parallel.patch [new file with mode: 0644]
config/patches/medfile.002_gcc6.patch [new file with mode: 0644]
config/patches/netgen.001_sources.patch [new file with mode: 0644]
config/patches/omniorb.001_omninotify_compilation.patch [new file with mode: 0755]
config/patches/omniorb.002_omninotify_64bits.patch [new file with mode: 0755]
config/patches/opencv.001_compile.patch [new file with mode: 0644]
config/patches/opencv.002_gcc6.patch [new file with mode: 0644]
config/patches/paco++.001_gcc44_compat.patch [new file with mode: 0644]
config/patches/paraview.001_vtk_targets.patch [new file with mode: 0644]
config/patches/paraview.002_visitbridge.patch [new file with mode: 0644]
config/patches/paraview.003_surfacelic.patch [new file with mode: 0644]
config/patches/paraview.004_forwarding.patch [new file with mode: 0644]
config/patches/qt.001_proxy_factory.patch [new file with mode: 0644]
config/patches/qt.002_webview_include.patch [new file with mode: 0644]
config/patches/qt.003_webengine.patch [new file with mode: 0755]
config/patches/qt.004_blender_scene.patch [new file with mode: 0644]
config/patches/qt.005_null_ptr.patch [new file with mode: 0644]
config/patches/scotch.001_pthreads.patch [new file with mode: 0644]
config/patches/solvespace.001_nogui.patch [new file with mode: 0644]
config/salome.xml

diff --git a/config/patches/boost.001_fcontext.patch b/config/patches/boost.001_fcontext.patch
new file mode 100644 (file)
index 0000000..e1ea293
--- /dev/null
@@ -0,0 +1,11 @@
+diff -NaurwB boost-1.52.0__0/libs/context/src/fcontext.cpp boost-1.52.0__1/libs/context/src/fcontext.cpp
+--- boost-1.52.0__0/libs/context/src/fcontext.cpp      2012-09-18 13:06:47.000000000 +0400
++++ boost-1.52.0__1/libs/context/src/fcontext.cpp      2017-03-15 15:22:15.633793279 +0300
+@@ -9,6 +9,7 @@
+ #include <boost/context/fcontext.hpp>
+ #include <cstddef>
++#include <stdint.h>
+ #ifdef BOOST_HAS_ABI_HEADERS
+ #  include BOOST_ABI_PREFIX
diff --git a/config/patches/boost.002_icu_formatter.patch b/config/patches/boost.002_icu_formatter.patch
new file mode 100644 (file)
index 0000000..150fb96
--- /dev/null
@@ -0,0 +1,20 @@
+diff -NaurwB boost-1.52.0__0/libs/locale/src/icu/formatter.cpp boost-1.52.0__1/libs/locale/src/icu/formatter.cpp
+--- boost-1.52.0__0/libs/locale/src/icu/formatter.cpp  2017-03-15 15:24:10.538356909 +0300
++++ boost-1.52.0__1/libs/locale/src/icu/formatter.cpp  2017-03-15 15:24:39.902501313 +0300
+@@ -51,14 +51,14 @@
+             virtual string_type format(double value,size_t &code_points) const
+             {
+                 icu::UnicodeString tmp;
+-                icu_fmt_->format(value,tmp);
++                icu_fmt_->format(::int64_t(value),tmp);
+                 code_points=tmp.countChar32();
+                 return cvt_.std(tmp);
+             }
+             virtual string_type format(int64_t value,size_t &code_points) const
+             {
+                 icu::UnicodeString tmp;
+-                icu_fmt_->format(value,tmp);
++                icu_fmt_->format(::int64_t(value),tmp);
+                 code_points=tmp.countChar32();
+                 return cvt_.std(tmp);
+             }
diff --git a/config/patches/freeimage.001_sources.patch b/config/patches/freeimage.001_sources.patch
new file mode 100644 (file)
index 0000000..8bf79df
--- /dev/null
@@ -0,0 +1,25 @@
+diff -Naur --exclude=CVS freeimage-3.16.0_orig/Source/LibWebP/src/utils/bit_writer.c freeimage-3.16.0_patch/Source/LibWebP/src/utils/bit_writer.c
+--- freeimage-3.16.0_orig/Source/LibWebP/src/utils/bit_writer.c
++++ freeimage-3.16.0_patch/Source/LibWebP/src/utils/bit_writer.c
+@@ -226,6 +226,21 @@
+ #define htole16(x) (x)\r
+ #else     // pretty much all linux and/or glibc\r
+ #include <endian.h>\r
++#if !defined(htole32)
++# include <byteswap.h>
++# ifdef __USE_BSD
++/* Conversion interfaces.  */
++#if __BYTE_ORDER == __LITTLE_ENDIAN
++#define htole16(x) (x)
++#define htole32(x) (x)
++#define htole64(x) (x)
++#else
++#define htole16(x) __bswap_16 (x)
++#define htole32(x) __bswap_32 (x)
++#define htole64(x) __bswap_64 (x)
++#endif
++#endif
++#endif
+ #endif\r
\r
+ // Returns 1 on success.\r
diff --git a/config/patches/freeimage.002_build_procedure.patch b/config/patches/freeimage.002_build_procedure.patch
new file mode 100644 (file)
index 0000000..bcbaad3
--- /dev/null
@@ -0,0 +1,62 @@
+diff -NaurwB freeimage-3.16.0__0/Makefile.fip freeimage-3.16.0__1/Makefile.fip
+--- freeimage-3.16.0__0/Makefile.fip   2014-03-15 19:35:28.000000000 +0400
++++ freeimage-3.16.0__1/Makefile.fip   2017-03-15 15:05:20.396869687 +0300
+@@ -4,9 +4,9 @@
+ include fipMakefile.srcs\r
\r
+ # General configuration variables:\r
+-DESTDIR ?= /\r
+-INCDIR ?= $(DESTDIR)/usr/include\r
+-INSTALLDIR ?= $(DESTDIR)/usr/lib\r
++DESTDIR ?= /usr\r
++INCDIR ?= $(DESTDIR)/include\r
++INSTALLDIR ?= $(DESTDIR)/lib\r
\r
+ # Converts cr/lf to just lf\r
+ DOS2UNIX = dos2unix\r
+@@ -71,10 +71,12 @@
\r
+ install:\r
+       install -d $(INCDIR) $(INSTALLDIR)\r
+-      install -m 644 -o root -g root $(HEADER) $(INCDIR)\r
+-      install -m 644 -o root -g root $(HEADERFIP) $(INCDIR)\r
+-      install -m 644 -o root -g root $(STATICLIB) $(INSTALLDIR)\r
+-      install -m 755 -o root -g root $(SHAREDLIB) $(INSTALLDIR)\r
++      install -m 644 $(HEADER) $(INCDIR)\r
++      install -m 644 $(HEADERFIP) $(INCDIR)\r
++      install -m 644 $(STATICLIB) $(INSTALLDIR)\r
++      install -m 755 $(SHAREDLIB) $(INSTALLDIR)
++      ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(VERLIBNAME)
++      ln -sf $(VERLIBNAME) $(INSTALLDIR)/$(LIBNAME)\r
\r
+ clean:\r
+       rm -f core Dist/*.* u2dtmp* $(MODULES) $(STATICLIB) $(SHAREDLIB) $(LIBNAME)\r
+diff -NaurwB freeimage-3.16.0__0/Makefile.gnu freeimage-3.16.0__1/Makefile.gnu
+--- freeimage-3.16.0__0/Makefile.gnu   2014-03-16 00:02:08.000000000 +0400
++++ freeimage-3.16.0__1/Makefile.gnu   2017-03-15 15:05:20.384869623 +0300
+@@ -4,9 +4,9 @@
+ include Makefile.srcs\r
\r
+ # General configuration variables:\r
+-DESTDIR ?= /\r
+-INCDIR ?= $(DESTDIR)/usr/include\r
+-INSTALLDIR ?= $(DESTDIR)/usr/lib\r
++DESTDIR ?= /usr\r
++INCDIR ?= $(DESTDIR)/include\r
++INSTALLDIR ?= $(DESTDIR)/lib\r
\r
+ # Converts cr/lf to just lf\r
+ DOS2UNIX = dos2unix\r
+@@ -70,9 +70,9 @@
\r
+ install:\r
+       install -d $(INCDIR) $(INSTALLDIR)\r
+-      install -m 644 -o root -g root $(HEADER) $(INCDIR)\r
+-      install -m 644 -o root -g root $(STATICLIB) $(INSTALLDIR)\r
+-      install -m 755 -o root -g root $(SHAREDLIB) $(INSTALLDIR)\r
++      install -m 644 $(HEADER) $(INCDIR)\r
++      install -m 644 $(STATICLIB) $(INSTALLDIR)\r
++      install -m 755 $(SHAREDLIB) $(INSTALLDIR)\r
+       ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(VERLIBNAME)\r
+       ln -sf $(VERLIBNAME) $(INSTALLDIR)/$(LIBNAME)   \r
+ #     ldconfig\r
diff --git a/config/patches/freeimage.003_gcc47_compat.patch b/config/patches/freeimage.003_gcc47_compat.patch
new file mode 100644 (file)
index 0000000..516a499
--- /dev/null
@@ -0,0 +1,11 @@
+diff -NaurwB freeimage-3.16.0__0/Source/OpenEXR/IlmImf/ImfAutoArray.h freeimage-3.16.0__1/Source/OpenEXR/IlmImf/ImfAutoArray.h
+--- freeimage-3.16.0__0/Source/OpenEXR/IlmImf/ImfAutoArray.h   2014-03-08 01:31:08.000000000 +0400
++++ freeimage-3.16.0__1/Source/OpenEXR/IlmImf/ImfAutoArray.h   2017-03-15 14:10:35.682298047 +0300
+@@ -45,6 +45,7 @@
+ //-----------------------------------------------------------------------------
+ #include "OpenEXRConfig.h"
++#include <string.h>
+ #if !defined(_WIN32) || defined(__MINGW32__)
+ // needed for memset
+ #include <string.h>
diff --git a/config/patches/freeimage.004_gcc66.patch b/config/patches/freeimage.004_gcc66.patch
new file mode 100644 (file)
index 0000000..614a853
--- /dev/null
@@ -0,0 +1,71 @@
+diff -Naur freeimage-3.16.0_SRC_orig/Source/LibRawLite/dcraw/dcraw.c freeimage-3.16.0_SRC_patched/Source/LibRawLite/dcraw/dcraw.c
+--- freeimage-3.16.0_SRC_orig/Source/LibRawLite/dcraw/dcraw.c  2014-02-07 23:48:10.000000000 +0400
++++ freeimage-3.16.0_SRC_patched/Source/LibRawLite/dcraw/dcraw.c       2016-10-14 12:05:37.481253676 +0300
+@@ -4072,22 +4072,22 @@
+     -2,+0,+0,-1,0,0x06, -2,+0,+0,+0,1,0x02, -2,+0,+0,+1,0,0x03,\r
+     -2,+1,-1,+0,0,0x04, -2,+1,+0,-1,1,0x04, -2,+1,+0,+0,0,0x06,\r
+     -2,+1,+0,+1,0,0x02, -2,+2,+0,+0,1,0x04, -2,+2,+0,+1,0,0x04,\r
+-    -1,-2,-1,+0,0,0x80, -1,-2,+0,-1,0,0x01, -1,-2,+1,-1,0,0x01,\r
+-    -1,-2,+1,+0,1,0x01, -1,-1,-1,+1,0,0x88, -1,-1,+1,-2,0,0x40,\r
++    -1,-2,-1,+0,0,(signed char)0x80, -1,-2,+0,-1,0,0x01, -1,-2,+1,-1,0,0x01,\r
++    -1,-2,+1,+0,1,0x01, -1,-1,-1,+1,0,(signed char)0x88, -1,-1,+1,-2,0,0x40,\r
+     -1,-1,+1,-1,0,0x22, -1,-1,+1,+0,0,0x33, -1,-1,+1,+1,1,0x11,\r
+     -1,+0,-1,+2,0,0x08, -1,+0,+0,-1,0,0x44, -1,+0,+0,+1,0,0x11,\r
+     -1,+0,+1,-2,1,0x40, -1,+0,+1,-1,0,0x66, -1,+0,+1,+0,1,0x22,\r
+     -1,+0,+1,+1,0,0x33, -1,+0,+1,+2,1,0x10, -1,+1,+1,-1,1,0x44,\r
+     -1,+1,+1,+0,0,0x66, -1,+1,+1,+1,0,0x22, -1,+1,+1,+2,0,0x10,\r
+     -1,+2,+0,+1,0,0x04, -1,+2,+1,+0,1,0x04, -1,+2,+1,+1,0,0x04,\r
+-    +0,-2,+0,+0,1,0x80, +0,-1,+0,+1,1,0x88, +0,-1,+1,-2,0,0x40,\r
++    +0,-2,+0,+0,1,(signed char)0x80, +0,-1,+0,+1,1,(signed char)0x88, +0,-1,+1,-2,0,0x40,\r
+     +0,-1,+1,+0,0,0x11, +0,-1,+2,-2,0,0x40, +0,-1,+2,-1,0,0x20,\r
+     +0,-1,+2,+0,0,0x30, +0,-1,+2,+1,1,0x10, +0,+0,+0,+2,1,0x08,\r
+     +0,+0,+2,-2,1,0x40, +0,+0,+2,-1,0,0x60, +0,+0,+2,+0,1,0x20,\r
+     +0,+0,+2,+1,0,0x30, +0,+0,+2,+2,1,0x10, +0,+1,+1,+0,0,0x44,\r
+     +0,+1,+1,+2,0,0x10, +0,+1,+2,-1,1,0x40, +0,+1,+2,+0,0,0x60,\r
+-    +0,+1,+2,+1,0,0x20, +0,+1,+2,+2,0,0x10, +1,-2,+1,+0,0,0x80,\r
+-    +1,-1,+1,+1,0,0x88, +1,+0,+1,+2,0,0x08, +1,+0,+2,-1,0,0x40,\r
++    +0,+1,+2,+1,0,0x20, +0,+1,+2,+2,0,0x10, +1,-2,+1,+0,0,(signed char)0x80,\r
++    +1,-1,+1,+1,0,(signed char)0x88, +1,+0,+1,+2,0,0x08, +1,+0,+2,-1,0,0x40,\r
+     +1,+0,+2,+1,0,0x10\r
+   }, chood[] = { -1,-1, -1,0, -1,+1, 0,+1, +1,+1, +1,0, +1,-1, 0,-1 };\r
+   ushort (*brow[5])[4], *pix;\r
+diff -Naur freeimage-3.16.0_SRC_orig/Source/LibRawLite/internal/dcraw_common.cpp freeimage-3.16.0_SRC_patched/Source/LibRawLite/internal/dcraw_common.cpp
+--- freeimage-3.16.0_SRC_orig/Source/LibRawLite/internal/dcraw_common.cpp      2014-02-07 23:48:10.000000000 +0400
++++ freeimage-3.16.0_SRC_patched/Source/LibRawLite/internal/dcraw_common.cpp   2016-10-14 12:06:27.540395171 +0300
+@@ -3782,22 +3782,22 @@
+     -2,+0,+0,-1,0,0x06, -2,+0,+0,+0,1,0x02, -2,+0,+0,+1,0,0x03,\r
+     -2,+1,-1,+0,0,0x04, -2,+1,+0,-1,1,0x04, -2,+1,+0,+0,0,0x06,\r
+     -2,+1,+0,+1,0,0x02, -2,+2,+0,+0,1,0x04, -2,+2,+0,+1,0,0x04,\r
+-    -1,-2,-1,+0,0,0x80, -1,-2,+0,-1,0,0x01, -1,-2,+1,-1,0,0x01,\r
+-    -1,-2,+1,+0,1,0x01, -1,-1,-1,+1,0,0x88, -1,-1,+1,-2,0,0x40,\r
++    -1,-2,-1,+0,0,(signed char)0x80, -1,-2,+0,-1,0,0x01, -1,-2,+1,-1,0,0x01,\r
++    -1,-2,+1,+0,1,0x01, -1,-1,-1,+1,0,(signed char)0x88, -1,-1,+1,-2,0,0x40,\r
+     -1,-1,+1,-1,0,0x22, -1,-1,+1,+0,0,0x33, -1,-1,+1,+1,1,0x11,\r
+     -1,+0,-1,+2,0,0x08, -1,+0,+0,-1,0,0x44, -1,+0,+0,+1,0,0x11,\r
+     -1,+0,+1,-2,1,0x40, -1,+0,+1,-1,0,0x66, -1,+0,+1,+0,1,0x22,\r
+     -1,+0,+1,+1,0,0x33, -1,+0,+1,+2,1,0x10, -1,+1,+1,-1,1,0x44,\r
+     -1,+1,+1,+0,0,0x66, -1,+1,+1,+1,0,0x22, -1,+1,+1,+2,0,0x10,\r
+     -1,+2,+0,+1,0,0x04, -1,+2,+1,+0,1,0x04, -1,+2,+1,+1,0,0x04,\r
+-    +0,-2,+0,+0,1,0x80, +0,-1,+0,+1,1,0x88, +0,-1,+1,-2,0,0x40,\r
++    +0,-2,+0,+0,1,(signed char)0x80, +0,-1,+0,+1,1,(signed char)0x88, +0,-1,+1,-2,0,0x40,\r
+     +0,-1,+1,+0,0,0x11, +0,-1,+2,-2,0,0x40, +0,-1,+2,-1,0,0x20,\r
+     +0,-1,+2,+0,0,0x30, +0,-1,+2,+1,1,0x10, +0,+0,+0,+2,1,0x08,\r
+     +0,+0,+2,-2,1,0x40, +0,+0,+2,-1,0,0x60, +0,+0,+2,+0,1,0x20,\r
+     +0,+0,+2,+1,0,0x30, +0,+0,+2,+2,1,0x10, +0,+1,+1,+0,0,0x44,\r
+     +0,+1,+1,+2,0,0x10, +0,+1,+2,-1,1,0x40, +0,+1,+2,+0,0,0x60,\r
+-    +0,+1,+2,+1,0,0x20, +0,+1,+2,+2,0,0x10, +1,-2,+1,+0,0,0x80,\r
+-    +1,-1,+1,+1,0,0x88, +1,+0,+1,+2,0,0x08, +1,+0,+2,-1,0,0x40,\r
++    +0,+1,+2,+1,0,0x20, +0,+1,+2,+2,0,0x10, +1,-2,+1,+0,0,(signed char)0x80,\r
++    +1,-1,+1,+1,0,(signed char)0x88, +1,+0,+1,+2,0,0x08, +1,+0,+2,-1,0,0x40,\r
+     +1,+0,+2,+1,0,0x10\r
+   }, chood[] = { -1,-1, -1,0, -1,+1, 0,+1, +1,+1, +1,0, +1,-1, 0,-1 };\r
+   ushort (*brow[5])[4], *pix;\r
+@@ -7380,7 +7380,7 @@
+       { 8035,435,-962,-6001,13872,2320,-1159,3065,5434 } },\r
+     { "Phase One P65", 0, 0,\r
+       { 8035,435,-962,-6001,13872,2320,-1159,3065,5434 } },\r
+-    { "Red One", 704, 0xffff,         /* DJC */\r
++    { "Red One", 704, (short int)0xffff,              /* DJC */\r
+       { 21014,-7891,-2613,-3056,12201,856,-2203,5125,8042 } },\r
+     { "Samsung EK-GN120", 0, 0, /* Adobe; Galaxy NX */\r
+         { 7557,-2522,-739,-4679,12949,1894,-840,1777,5311 } },\r
diff --git a/config/patches/gl2ps.001_libs.patch b/config/patches/gl2ps.001_libs.patch
new file mode 100644 (file)
index 0000000..68168b3
--- /dev/null
@@ -0,0 +1,13 @@
+diff -NaurwB gl2ps-1.3.9__1/CMakeLists.txt gl2ps-1.3.9__0/CMakeLists.txt
+--- gl2ps-1.3.9__1/CMakeLists.txt      2017-03-15 14:16:29.548325553 +0300
++++ gl2ps-1.3.9__0/CMakeLists.txt      2017-03-15 14:17:13.060574241 +0300
+@@ -76,6 +76,9 @@
+   add_definitions(-DHAVE_NO_VSNPRINTF)
+ endif(NOT HAVE_VSNPRINTF)
++find_library(LIBM_LIBRARY NAMES m)
++list(APPEND EXTERNAL_LIBRARIES ${LIBM_LIBRARY})
++
+ find_package(OpenGL)
+ if(OPENGL_FOUND)
+   list(APPEND EXTERNAL_INCLUDES ${OPENGL_INCLUDE_DIR})
diff --git a/config/patches/graphviz.001_build_procedure.patch b/config/patches/graphviz.001_build_procedure.patch
new file mode 100644 (file)
index 0000000..ede5edd
--- /dev/null
@@ -0,0 +1,21 @@
+diff -NaurwB graphviz-2.38.0__1/configure graphviz-2.38.0__0/configure
+--- graphviz-2.38.0__0/configure       2017-03-15 14:22:15.286297951 +0300
++++ graphviz-2.38.0__1/configure       2017-03-15 14:23:12.054621051 +0300
+@@ -22415,7 +22415,7 @@
+       else
+         PYTHON_PREFIX=`$PYTHON -c "import sys; print sys.prefix"`
+         PYTHON_INCLUDES=-I$PYTHON_PREFIX/include/python$PYTHON_VERSION_SHORT
+-        PYTHON_LIBS="-lpython$PYTHON_VERSION_SHORT"
++        PYTHON_LIBS="-L$PYTHON_PREFIX/lib -lpython$PYTHON_VERSION_SHORT"
+         PYTHON_INSTALL_DIR="`$PYTHON $srcdir/config/config_python.py archsitelib`"
+         save_CPPFLAGS=$CPPFLAGS
+         CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES"
+@@ -23797,7 +23797,7 @@
+ fi
+ if test "x$use_tcl" = "x"; then
+-  TCL_VERSION_FOUND=`echo 'puts [info tclversion]' | $TCLSH`
++  TCL_VERSION_FOUND=`echo 'puts [info tclversion]' | $TCLSH 2>/dev/null | grep -E '^[0-9.]+$'`
+   # can't assume ksh on all architectures
+   # TCLSH_EXEC_PREFIX=${TCLSH%%/bin/tclsh.*}
diff --git a/config/patches/libxml2.001_64bits_crash.patch b/config/patches/libxml2.001_64bits_crash.patch
new file mode 100755 (executable)
index 0000000..f03153f
--- /dev/null
@@ -0,0 +1,13 @@
+--- libxml.h
++++ libxml.h
+@@ -13,6 +13,9 @@
+ #ifndef _LARGEFILE_SOURCE
+ #define _LARGEFILE_SOURCE
+ #endif
++#ifndef _LARGEFILE64_SOURCE
++#define _LARGEFILE64_SOURCE
++#endif
+ #ifndef _FILE_OFFSET_BITS
+ #define _FILE_OFFSET_BITS 64
+ #endif
+
diff --git a/config/patches/matplotlib.001_build_procedure.patch b/config/patches/matplotlib.001_build_procedure.patch
new file mode 100644 (file)
index 0000000..c74de89
--- /dev/null
@@ -0,0 +1,90 @@
+diff -NaurwB matplotlib-1.4.3__1/setup.cfg matplotlib-1.4.3__0/setup.cfg
+--- matplotlib-1.4.3__0/setup.cfg      1970-01-01 03:00:00.000000000 +0300
++++ matplotlib-1.4.3__1/setup.cfg      2017-03-15 14:42:36.569265032 +0300
+@@ -0,0 +1,86 @@
++# Rename this file to setup.cfg to modify matplotlib's
++# build options.
++
++[egg_info]
++tag_svn_revision = 1
++
++[directories]
++# Uncomment to override the default basedir in setupext.py.
++# This can be a single directory or a comma-delimited list of directories.
++#basedirlist = /usr
++
++[status]
++# To suppress display of the dependencies and their versions
++# at the top of the build log, uncomment the following line:
++#suppress = False
++
++[packages]
++# There are a number of subpackages of matplotlib that are considered
++# optional.  They are all installed by default, but they may be turned
++# off here.
++#
++tests = False
++sample_data = False
++toolkits = False
++# Tests for the toolkits are only automatically installed
++# if the tests and toolkits packages are also getting installed.
++#toolkits_tests = auto
++
++[gui_support]
++# Matplotlib supports multiple GUI toolkits, including Cocoa,
++# GTK, Fltk, MacOSX, Qt, Qt4, Tk, and WX. Support for many of
++# these toolkits requires AGG, the Anti-Grain Geometry library,
++# which is provided by matplotlib and built by default.
++#
++# Some backends are written in pure Python, and others require
++# extension code to be compiled. By default, matplotlib checks for
++# these GUI toolkits during installation and, if present, compiles the
++# required extensions to support the toolkit.
++#
++# - GTK 2.x support of any kind requires the GTK runtime environment
++#   headers and PyGTK.
++# - Tk support requires Tk development headers and Tkinter.
++# - Mac OSX backend requires the Cocoa headers included with XCode.
++# - Windowing is MS-Windows specific, and requires the "windows.h"
++#   header.
++#
++# The other GUI toolkits do not require any extension code, and can be
++# used as long as the libraries are installed on your system --
++# therefore they are installed unconditionally.
++#
++# You can uncomment any the following lines to change this
++# behavior. Acceptible values are:
++#
++#     True: build the extension. Exits with a warning if the
++#           required dependencies are not available
++#     False: do not build the extension
++#     auto: build if the required dependencies are available,
++#           otherwise skip silently. This is the default
++#           behavior
++#
++#agg = auto
++#cairo = auto
++#gtk = auto
++#gtk3agg = auto
++#gtk3cairo = auto
++#gtkagg = auto
++#macosx = auto
++#pyside = auto
++qt4agg = 
++#tkagg = auto
++#windowing = auto
++#wxagg = auto
++
++[rc_options]
++# User-configurable options
++#
++# Default backend, one of: Agg, Cairo, CocoaAgg, GTK, GTKAgg, GTKCairo,
++# FltkAgg, MacOSX, Pdf, Ps, QtAgg, Qt4Agg, SVG, TkAgg, WX, WXAgg.
++#
++# The Agg, Ps, Pdf and SVG backends do not require external
++# dependencies. Do not choose GTK, GTKAgg, GTKCairo, MacOSX, or TkAgg
++# if you have disabled the relevent extension modules.  Agg will be used
++# by default.
++#
++backend = 
++#
diff --git a/config/patches/medfile.001_parallel.patch b/config/patches/medfile.001_parallel.patch
new file mode 100644 (file)
index 0000000..a6ce332
--- /dev/null
@@ -0,0 +1,63 @@
+diff -NaurwB med-3.2.1__1/config/cmake_files/FindMedfileMPI.cmake med-3.2.1__0/config/cmake_files/FindMedfileMPI.cmake
+--- med-3.2.1__0/config/cmake_files/FindMedfileMPI.cmake       2017-03-15 14:49:45.411703541 +0300
++++ med-3.2.1__1/config/cmake_files/FindMedfileMPI.cmake       2017-03-15 14:50:25.683932187 +0300
+@@ -83,6 +83,8 @@
+   SET(MED_DEFINE_MED_HAVE_MPI "#define MED_HAVE_MPI")
++  SET(MED_DEFINE_MED_HAVE_MPI "#define MED_HAVE_MPI")
++
+ ELSE(MPI_FOUND OR MPIEXEC)
+   MESSAGE(STATUS "MPI was not found.")  
+ ENDIF(MPI_FOUND OR MPIEXEC)
+diff -NaurwB med-3.2.1__1/python/CMakeLists.txt med-3.2.1__0/python/CMakeLists.txt
+--- med-3.2.1__1/python/CMakeLists.txt 2017-03-15 14:49:45.643704857 +0300
++++ med-3.2.1__0/python/CMakeLists.txt 2017-03-15 14:50:25.675932142 +0300
+@@ -6,6 +6,7 @@
+   ${PROJECT_BINARY_DIR}/include
+   ${HDF5_INCLUDE_DIRS}
+   ${MPI_INCLUDE_DIRS}
++  ${MPI_INCLUDE_DIRS}
+   )
+ SET(_swig_files 
+diff -NaurwB med-3.2.1__1/src/cfi/CMakeLists.txt med-3.2.1__0/src/cfi/CMakeLists.txt
+--- med-3.2.1__1/src/cfi/CMakeLists.txt        2017-03-15 14:49:45.679705061 +0300
++++ med-3.2.1__0/src/cfi/CMakeLists.txt        2017-03-15 14:50:25.695932256 +0300
+@@ -21,6 +21,10 @@
+   LIST(APPEND cfi_SOURCES parfilecf.c)
+ ENDIF(MEDFILE_USE_MPI)
++IF(MEDFILE_USE_MPI)
++  LIST(APPEND cfi_SOURCES parfilecf.c)
++ENDIF(MEDFILE_USE_MPI)
++
+ ADD_DEFINITIONS(-DNOGDI)
+   
+ # Intermediary target
+diff -NaurwB med-3.2.1__1/src/fi/CMakeLists.txt med-3.2.1__0/src/fi/CMakeLists.txt
+--- med-3.2.1__1/src/fi/CMakeLists.txt 2017-03-15 14:49:45.679705061 +0300
++++ med-3.2.1__0/src/fi/CMakeLists.txt 2017-03-15 14:50:25.699932278 +0300
+@@ -20,4 +20,8 @@
+ LIST(APPEND fi_SOURCES medparfile.f)
+ ENDIF(MEDFILE_USE_MPI)
++IF(MEDFILE_USE_MPI)
++LIST(APPEND fi_SOURCES medparfile.f)
++ENDIF(MEDFILE_USE_MPI)
++
+ ADD_LIBRARY(_fi        OBJECT ${fi_SOURCES})
+diff -NaurwB med-3.2.1__1/src/hdfi/CMakeLists.txt med-3.2.1__0/src/hdfi/CMakeLists.txt
+--- med-3.2.1__1/src/hdfi/CMakeLists.txt       2017-03-15 14:49:45.671705017 +0300
++++ med-3.2.1__0/src/hdfi/CMakeLists.txt       2017-03-15 14:50:25.707932324 +0300
+@@ -66,6 +66,10 @@
+ IF(MEDFILE_USE_MPI)
+   LIST(APPEND hdfi_SOURCES _MEDparFileOpen.c _MEDparFileCreate.c)
+ ENDIF(MEDFILE_USE_MPI)
++
++IF(MEDFILE_USE_MPI)
++  LIST(APPEND hdfi_SOURCES _MEDparFileOpen.c _MEDparFileCreate.c)
++ENDIF(MEDFILE_USE_MPI)
+   
+ ADD_LIBRARY(_hdfi OBJECT ${hdfi_SOURCES})
+  
diff --git a/config/patches/medfile.002_gcc6.patch b/config/patches/medfile.002_gcc6.patch
new file mode 100644 (file)
index 0000000..7f61fc8
--- /dev/null
@@ -0,0 +1,16 @@
+diff -Naur med-3.2.0_SRC_orig/include/H5public_extract.h.in med-3.2.0_SRC_modif/include/H5public_extract.h.in
+--- med-3.2.0_SRC_orig/include/H5public_extract.h.in   2016-01-14 18:55:27.000000000 +0300
++++ med-3.2.0_SRC_modif/include/H5public_extract.h.in  2016-10-18 10:12:45.177767056 +0300
+@@ -28,9 +28,9 @@
+ @HDF5_TYPEDEF_HID_T@
+ @HDF5_TYPEDEF_HSIZE_T@
+-#typedef int herr_t;
+-#typedef int hid_t;
+-#typedef unsigned long long   hsize_t;
++//#typedef int herr_t;
++//#typedef int hid_t;
++//#typedef unsigned long long   hsize_t;
+ #ifdef __cplusplus
+ }
diff --git a/config/patches/netgen.001_sources.patch b/config/patches/netgen.001_sources.patch
new file mode 100644 (file)
index 0000000..ccd4e8c
--- /dev/null
@@ -0,0 +1,1455 @@
+diff -NaurwB netgen-5.3.1_orig/Makefile.am netgen-5.3.1_new/Makefile.am
+--- netgen-5.3.1_orig/Makefile.am      2016-10-21 17:32:01.000000000 +0300
++++ netgen-5.3.1_new/Makefile.am       2016-10-21 17:31:54.000000000 +0300
+@@ -2,7 +2,7 @@
+ METASOURCES = AUTO
+-SUBDIRS = libsrc ng tutorials doc windows nglib
++SUBDIRS = libsrc nglib #tutorials doc windows nglib
+ # TESTS = ng/netgen -batchmode
+diff -NaurwB netgen-5.3.1_orig/Makefile.in netgen-5.3.1_new/Makefile.in
+--- netgen-5.3.1_orig/Makefile.in      2014-10-06 15:04:37.000000000 +0400
++++ netgen-5.3.1_new/Makefile.in       2016-10-03 16:17:10.164707368 +0300
+@@ -280,7 +280,7 @@
+ top_srcdir = @top_srcdir@
+ ACLOCAL_AMFLAGS = -I m4
+ METASOURCES = AUTO
+-SUBDIRS = libsrc ng tutorials doc windows nglib
++SUBDIRS = libsrc nglib #tutorials doc windows nglib
+ all: config.h
+       $(MAKE) $(AM_MAKEFLAGS) all-recursive
+diff -NaurwB netgen-5.3.1_orig/configure.ac netgen-5.3.1_new/configure.ac
+--- netgen-5.3.1_orig/configure.ac     2014-10-06 15:00:17.000000000 +0400
++++ netgen-5.3.1_new/configure.ac      2016-09-29 14:34:11.957389447 +0300
+@@ -20,7 +20,7 @@
+ CXXFLAGS="$CXXFLAGS $OPENMP_CXXFLAGS"
+ # LDFLAGS="$LDFLAGS $OPENMP_CXXFLAGS"
+-AM_PROG_AR
++m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
+ AC_PROG_LIBTOOL
+ LT_INIT
+@@ -42,8 +42,8 @@
+ if test a$occon = atrue ; then
+-      AC_SUBST([OCCFLAGS], ["-DOCCGEOMETRY -I$occdir/inc -I/usr/include/opencascade"])
+-      AC_SUBST([OCCLIBS], ["-L$occdir/lib -lTKernel -lTKGeomBase -lTKMath -lTKG2d -lTKG3d -lTKXSBase -lTKOffset -lTKFillet -lTKShHealing -lTKMesh -lTKMeshVS -lTKTopAlgo -lTKGeomAlgo -lTKBool -lTKPrim -lTKBO -lTKIGES -lTKBRep -lTKSTEPBase -lTKSTEP -lTKSTL -lTKSTEPAttr -lTKSTEP209 -lTKXDESTEP -lTKXDEIGES -lTKXCAF -lTKLCAF -lFWOSPlugin"])
++      AC_SUBST([OCCFLAGS], ["-DOCCGEOMETRY -I$occdir/include/opencascade"])
++      AC_SUBST([OCCLIBS], ["-L$occdir/lib -lTKernel -lTKGeomBase -lTKMath -lTKG2d -lTKG3d -lTKXSBase -lTKOffset -lTKFillet -lTKShHealing -lTKMesh -lTKMeshVS -lTKTopAlgo -lTKGeomAlgo -lTKBool -lTKPrim -lTKBO -lTKIGES -lTKBRep -lTKSTEPBase -lTKSTEP -lTKSTL -lTKSTEPAttr -lTKSTEP209 -lTKXDESTEP -lTKXDEIGES -lTKXCAF -lTKLCAF"])
+ #  -lTKDCAF
+diff -NaurwB netgen-5.3.1_orig/libsrc/meshing/findip.hpp netgen-5.3.1_new/libsrc/meshing/findip.hpp
+--- netgen-5.3.1_orig/libsrc/meshing/findip.hpp        2014-08-29 13:54:05.000000000 +0400
++++ netgen-5.3.1_new/libsrc/meshing/findip.hpp 2016-09-30 20:38:56.662234111 +0300
+@@ -75,6 +75,9 @@
+   static int timer = NgProfiler::CreateTimer ("FindInnerPoint");
+   NgProfiler::RegionTimer reg (timer);
++  if ( points.Size() < 3 )
++    return 0;
++
+   Array<Vec3d> a;
+   Array<double> c;
+   Mat<3> m, inv;
+diff -NaurwB netgen-5.3.1_orig/libsrc/meshing/improve3.cpp netgen-5.3.1_new/libsrc/meshing/improve3.cpp
+--- netgen-5.3.1_orig/libsrc/meshing/improve3.cpp      2014-08-29 13:54:05.000000000 +0400
++++ netgen-5.3.1_new/libsrc/meshing/improve3.cpp       2016-10-03 16:16:57.636639300 +0300
+@@ -1219,6 +1219,7 @@
+             tetused = 0;
+             tetused[0] = 1;
++              int nbtetused = 0;
+             for (int l = 2; l < nsuround; l++)
+               {
+@@ -1239,10 +1240,12 @@
+                             
+                             tetused[k] = 1; 
+                             suroundpts[l] = newpi;
++                              ++nbtetused;
+                           }                   
+                     }
+               }
+-
++              if ( nbtetused < nsuround )
++                continue;
+             
+             bad1 = 0;
+             for (int k = 0; k < nsuround; k++)
+diff -NaurwB netgen-5.3.1_orig/libsrc/meshing/meshtype.cpp netgen-5.3.1_new/libsrc/meshing/meshtype.cpp
+--- netgen-5.3.1_orig/libsrc/meshing/meshtype.cpp      2014-08-29 13:54:05.000000000 +0400
++++ netgen-5.3.1_new/libsrc/meshing/meshtype.cpp       2016-09-29 14:04:51.500148293 +0300
+@@ -1,4 +1,5 @@
+ #include <mystdlib.h>
++#include <float.h> // to get DBL_MIN defined
+ #include "meshing.hpp"  
+@@ -666,7 +667,8 @@
+         double det = trans.Det();
+-        if (det <= 0)
++        // if (det <= 0)
++        if (det <= DBL_MIN) // avoid FPE
+           err += 1e12;
+         else
+           err += frob * frob / det;
+@@ -722,7 +724,8 @@
+             double det = trans(0,0)*trans(1,1)-trans(1,0)*trans(0,1);
+-            if (det <= 0)
++            // if (det <= 0)
++            if (det <= DBL_MIN)  // avoid FPE
+               {
+                 dd = 0;
+                 return 1e12;
+@@ -806,7 +809,8 @@
+           = dtrans(0,0) * trans(1,1) - trans(0,1) * dtrans(1,0)
+           + trans(0,0) * dtrans(1,1) - dtrans(0,1) * trans(1,0);
+-        if (det <= 0)
++        // if (det <= 0)
++        if (det <= DBL_MIN) // avoid FPE
+           err += 1e12;
+         else
+           {
+@@ -856,7 +860,8 @@
+         frob /= 2;
+         double det = trans.Det();
+-        if (det <= 0)
++        //if (det <= 0)
++        if (det <= DBL_MIN) // avoid FPE
+           err += 1e12;
+         else
+           err += frob * frob / det;
+@@ -1864,7 +1869,8 @@
+       case PYRAMID:
+         {
+           double noz = 1-p(2);
+-          if (noz == 0.0) noz = 1e-10;
++          //if (noz == 0.0) noz = 1e-10;
++          if (noz <= DBL_MIN) noz = 1e-10; // avoid FPE
+           double xi  = p(0) / noz;
+           double eta = p(1) / noz;
+@@ -2030,7 +2036,8 @@
+         double det = -trans.Det();
+       
+-        if (det <= 0)
++        //if (det <= 0)
++        if (det <= DBL_MIN) // avoid FPE
+           err += 1e12;
+         else
+           err += frob * frob * frob / det;
+@@ -2102,7 +2109,8 @@
+         ddet *= -1;
+       
+-        if (det <= 0)
++        //if (det <= 0)
++        if (det <= DBL_MIN) // avoid FPE
+           err += 1e12;
+         else
+           {
+@@ -2184,7 +2192,7 @@
+       
+         det *= -1;
+       
+-        if (det <= 0)
++        if (det <= DBL_MIN)
+           err += 1e12;
+         else
+           {
+diff -NaurwB netgen-5.3.1_orig/libsrc/meshing/meshtype.hpp netgen-5.3.1_new/libsrc/meshing/meshtype.hpp
+--- netgen-5.3.1_orig/libsrc/meshing/meshtype.hpp      2014-08-29 13:54:05.000000000 +0400
++++ netgen-5.3.1_new/libsrc/meshing/meshtype.hpp       2016-09-30 14:28:09.147575801 +0300
+@@ -15,6 +15,7 @@
+     Classes for NETGEN
+   */
++class Mesh; // added due to compilation errors on some platforms
+   enum ELEMENT_TYPE { 
+@@ -360,7 +361,7 @@
+         {
+ #ifdef DEBUG
+           if (typ != QUAD && typ != QUAD6 && typ != QUAD8)
+-            PrintSysError ("element2d::GetNV not implemented for typ", typ)
++            PrintSysError ("element2d::GetNV not implemented for typ", typ);
+ #endif
+           return 4;
+         }
+@@ -618,7 +619,7 @@
+         return 8;
+       default:
+ #ifdef DEBUG
+-        PrintSysError ("Element3d::GetNV not implemented for typ ", typ)
++        PrintSysError ("Element3d::GetNV not implemented for typ ", typ);
+ #endif
+           ;
+       }
+@@ -682,7 +683,7 @@
+       case PRISM12: return 5;
+       default:
+ #ifdef DEBUG
+-        PrintSysError ("element3d::GetNFaces not implemented for typ", typ)
++        PrintSysError ("element3d::GetNFaces not implemented for typ", typ);
+ #endif
+           ;
+       }
+diff -NaurwB netgen-5.3.1_orig/libsrc/occ/Partition_Inter2d.cxx netgen-5.3.1_new/libsrc/occ/Partition_Inter2d.cxx
+--- netgen-5.3.1_orig/libsrc/occ/Partition_Inter2d.cxx 2014-08-29 13:54:03.000000000 +0400
++++ netgen-5.3.1_new/libsrc/occ/Partition_Inter2d.cxx  2016-09-29 14:44:01.996464598 +0300
+@@ -47,9 +47,7 @@
+ #include <TopOpeBRep_EdgesIntersector.hxx>
+ #include <TopOpeBRep_Point2d.hxx>
+ #include <TopTools_ListIteratorOfListOfShape.hxx>
+-#include <TopTools_ListOfShape.hxx>
+ #include <TopTools_MapIteratorOfMapOfShape.hxx>
+-#include <TopTools_MapOfShape.hxx>
+ #include <TopoDS.hxx>
+ #include <TopoDS_Edge.hxx>
+ #include <TopoDS_Vertex.hxx>
+diff -NaurwB netgen-5.3.1_orig/libsrc/occ/Partition_Inter2d.hxx netgen-5.3.1_new/libsrc/occ/Partition_Inter2d.hxx
+--- netgen-5.3.1_orig/libsrc/occ/Partition_Inter2d.hxx 2014-08-29 13:54:03.000000000 +0400
++++ netgen-5.3.1_new/libsrc/occ/Partition_Inter2d.hxx  2016-09-29 14:44:01.996464598 +0300
+@@ -27,7 +27,9 @@
+ #ifndef _Partition_Inter2d_HeaderFile
+ #define _Partition_Inter2d_HeaderFile
+-#ifndef _Handle_BRepAlgo_AsDes_HeaderFile
++#include <Standard_Version.hxx>
++
++#if OCC_VERSION_MAJOR < 7
+ #include <Handle_BRepAlgo_AsDes.hxx>
+ #endif
+ #ifndef _Standard_Real_HeaderFile
+@@ -36,11 +38,13 @@
+ #ifndef _Standard_Boolean_HeaderFile
+ #include <Standard_Boolean.hxx>
+ #endif
++
++#include <TopTools_MapOfShape.hxx>
++#include <TopTools_ListOfShape.hxx>
++
+ class BRepAlgo_AsDes;
+ class TopoDS_Face;
+-class TopTools_MapOfShape;
+ class TopoDS_Vertex;
+-class TopTools_ListOfShape;
+ class TopoDS_Edge;
+diff -NaurwB netgen-5.3.1_orig/libsrc/occ/Partition_Inter3d.cxx netgen-5.3.1_new/libsrc/occ/Partition_Inter3d.cxx
+--- netgen-5.3.1_orig/libsrc/occ/Partition_Inter3d.cxx 2014-08-29 13:54:03.000000000 +0400
++++ netgen-5.3.1_new/libsrc/occ/Partition_Inter3d.cxx  2016-09-29 14:44:02.000464619 +0300
+@@ -48,7 +48,6 @@
+ #include <TopOpeBRepTool_BoxSort.hxx>
+ #include <TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx>
+ #include <TopTools_ListIteratorOfListOfShape.hxx>
+-#include <TopTools_ListOfShape.hxx>
+ #include <TopoDS.hxx>
+ #include <TopoDS_Compound.hxx>
+ #include <TopoDS_Edge.hxx>
+@@ -206,7 +205,7 @@
+   Handle (Geom_Surface) S   = BRep_Tool::Surface(F,L);
+   if (S->IsKind(STANDARD_TYPE(Geom_RectangularTrimmedSurface))) {
+-    S = (*(Handle_Geom_RectangularTrimmedSurface*)&S)->BasisSurface();
++    S = Handle(Geom_RectangularTrimmedSurface)::DownCast (S)->BasisSurface();
+   }
+   if (!S->IsUPeriodic() && !S->IsVPeriodic())
+     return;
+diff -NaurwB netgen-5.3.1_orig/libsrc/occ/Partition_Inter3d.hxx netgen-5.3.1_new/libsrc/occ/Partition_Inter3d.hxx
+--- netgen-5.3.1_orig/libsrc/occ/Partition_Inter3d.hxx 2014-08-29 13:54:03.000000000 +0400
++++ netgen-5.3.1_new/libsrc/occ/Partition_Inter3d.hxx  2016-09-29 14:44:02.000464619 +0300
+@@ -27,7 +27,9 @@
+ #ifndef _Partition_Inter3d_HeaderFile
+ #define _Partition_Inter3d_HeaderFile
+-#ifndef _Handle_BRepAlgo_AsDes_HeaderFile
++#include <Standard_Version.hxx>
++
++#if OCC_VERSION_MAJOR < 7
+ #include <Handle_BRepAlgo_AsDes.hxx>
+ #endif
+ #ifndef _TopTools_DataMapOfShapeListOfShape_HeaderFile
+@@ -36,6 +38,9 @@
+ #ifndef _TopTools_MapOfShape_HeaderFile
+ #include <TopTools_MapOfShape.hxx>
+ #endif
++#ifndef _TopTools_ListOfShape_HeaderFile
++#include <TopTools_ListOfShape.hxx>
++#endif
+ #ifndef _TopTools_DataMapOfShapeShape_HeaderFile
+ #include <TopTools_DataMapOfShapeShape.hxx>
+ #endif
+@@ -43,10 +48,7 @@
+ #include <Standard_Boolean.hxx>
+ #endif
+ class BRepAlgo_AsDes;
+-class TopTools_ListOfShape;
+-class TopTools_DataMapOfShapeShape;
+ class TopoDS_Face;
+-class TopTools_MapOfShape;
+ class TopoDS_Shape;
+ class TopoDS_Vertex;
+ class TopoDS_Edge;
+@@ -83,13 +85,13 @@
+    void FacesPartition(const TopoDS_Face& F1,const TopoDS_Face& F2) ;
+    Standard_Boolean IsDone(const TopoDS_Face& F1,const TopoDS_Face& F2) const;
+    TopTools_MapOfShape& TouchedFaces() ;
+-   Handle_BRepAlgo_AsDes AsDes() const;
++   Handle(BRepAlgo_AsDes) AsDes() const;
+    TopTools_MapOfShape& NewEdges() ;
+    Standard_Boolean HasSameDomainF(const TopoDS_Shape& F) const;
+    Standard_Boolean IsSameDomainF(const TopoDS_Shape& F1,const TopoDS_Shape& F2) const;
+    const TopTools_ListOfShape& SameDomain(const TopoDS_Face& F) const;
+    TopoDS_Vertex ReplaceSameDomainV(const TopoDS_Vertex& V,const TopoDS_Edge& E) const;
+-   Handle_BRepAlgo_AsDes SectionEdgesAD() const;
++   Handle(BRepAlgo_AsDes) SectionEdgesAD() const;
+    Standard_Boolean IsSectionEdge(const TopoDS_Edge& E) const;
+    Standard_Boolean HasSectionEdge(const TopoDS_Face& F) const;
+    Standard_Boolean IsSplitOn(const TopoDS_Edge& NewE,const TopoDS_Edge& OldE,const TopoDS_Face& F) const;
+@@ -121,11 +123,11 @@
+    // Fields PRIVATE
+    //
+-   Handle_BRepAlgo_AsDes myAsDes;
++   Handle(BRepAlgo_AsDes) myAsDes;
+    TopTools_DataMapOfShapeListOfShape myDone;
+    TopTools_MapOfShape myTouched;
+    TopTools_MapOfShape myNewEdges;
+-   Handle_BRepAlgo_AsDes mySectionEdgesAD;
++   Handle(BRepAlgo_AsDes) mySectionEdgesAD;
+    TopTools_DataMapOfShapeListOfShape mySameDomainFM;
+    TopTools_DataMapOfShapeShape mySameDomainVM;
+diff -NaurwB netgen-5.3.1_orig/libsrc/occ/Partition_Loop.hxx netgen-5.3.1_new/libsrc/occ/Partition_Loop.hxx
+--- netgen-5.3.1_orig/libsrc/occ/Partition_Loop.hxx    2014-08-29 13:54:03.000000000 +0400
++++ netgen-5.3.1_new/libsrc/occ/Partition_Loop.hxx     2016-09-29 14:44:02.000464619 +0300
+@@ -38,8 +38,6 @@
+ #endif
+ class TopoDS_Face;
+ class TopoDS_Edge;
+-class TopTools_ListOfShape;
+-
+ #ifndef _Standard_HeaderFile
+ #include <Standard.hxx>
+diff -NaurwB netgen-5.3.1_orig/libsrc/occ/Partition_Loop2d.cxx netgen-5.3.1_new/libsrc/occ/Partition_Loop2d.cxx
+--- netgen-5.3.1_orig/libsrc/occ/Partition_Loop2d.cxx  2014-08-29 13:54:03.000000000 +0400
++++ netgen-5.3.1_new/libsrc/occ/Partition_Loop2d.cxx   2016-09-29 14:04:51.504148314 +0300
+@@ -210,7 +210,7 @@
+     Cc->D1(uc, PC, CTg1);
+     if (!isForward) CTg1.Reverse();
+-    Standard_Real anglemin = 3 * PI, tolAng = 1.e-8;
++    Standard_Real anglemin = 3 * M_PI, tolAng = 1.e-8;
+     // select an edge whose first derivative is most left of CTg1
+     // ie an angle between Tg1 and CTg1 is least
+@@ -234,7 +234,7 @@
+       // -PI < angle < PI
+       Standard_Real angle = Tg1.Angle(CTg1);
+-      if (PI - Abs(angle) <= tolAng)
++      if (M_PI - Abs(angle) <= tolAng)
+       {
+         // an angle is too close to PI; assure that an angle sign really
+         // reflects an edge position: +PI - an edge is worst,
+diff -NaurwB netgen-5.3.1_orig/libsrc/occ/Partition_Loop2d.hxx netgen-5.3.1_new/libsrc/occ/Partition_Loop2d.hxx
+--- netgen-5.3.1_orig/libsrc/occ/Partition_Loop2d.hxx  2014-08-29 13:54:03.000000000 +0400
++++ netgen-5.3.1_new/libsrc/occ/Partition_Loop2d.hxx   2016-09-29 14:44:02.000464619 +0300
+@@ -24,7 +24,6 @@
+ #endif
+ class TopoDS_Face;
+ class TopoDS_Edge;
+-class TopTools_ListOfShape;
+ class BRepAlgo_Image;
+diff -NaurwB netgen-5.3.1_orig/libsrc/occ/Partition_Loop3d.hxx netgen-5.3.1_new/libsrc/occ/Partition_Loop3d.hxx
+--- netgen-5.3.1_orig/libsrc/occ/Partition_Loop3d.hxx  2014-08-29 13:54:03.000000000 +0400
++++ netgen-5.3.1_new/libsrc/occ/Partition_Loop3d.hxx   2016-09-29 14:44:02.000464619 +0300
+@@ -13,6 +13,9 @@
+ #ifndef _TopTools_ListOfShape_HeaderFile
+ #include <TopTools_ListOfShape.hxx>
+ #endif
++#ifndef _TopTools_MapOfOrientedShape_HeaderFile
++#include <TopTools_MapOfOrientedShape.hxx>
++#endif
+ #ifndef _TopTools_IndexedDataMapOfShapeListOfShape_HeaderFile
+ #include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
+ #endif
+@@ -23,8 +26,6 @@
+ #include <Standard_Real.hxx>
+ #endif
+ class TopoDS_Shape;
+-class TopTools_ListOfShape;
+-class TopTools_MapOfOrientedShape;
+ class TopoDS_Edge;
+ class TopoDS_Face;
+ class gp_Vec;
+diff -NaurwB netgen-5.3.1_orig/libsrc/occ/Partition_Spliter.cxx netgen-5.3.1_new/libsrc/occ/Partition_Spliter.cxx
+--- netgen-5.3.1_orig/libsrc/occ/Partition_Spliter.cxx 2014-08-29 13:54:03.000000000 +0400
++++ netgen-5.3.1_new/libsrc/occ/Partition_Spliter.cxx  2016-09-29 14:44:02.000464619 +0300
+@@ -48,7 +48,6 @@
+ #include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
+ #include <TopTools_IndexedMapOfShape.hxx>
+ #include <TopTools_ListIteratorOfListOfShape.hxx>
+-#include <TopTools_ListOfShape.hxx>
+ #include <TopTools_MapIteratorOfMapOfShape.hxx>
+ #include <TopTools_SequenceOfShape.hxx>
+diff -NaurwB netgen-5.3.1_orig/libsrc/occ/Partition_Spliter.hxx netgen-5.3.1_new/libsrc/occ/Partition_Spliter.hxx
+--- netgen-5.3.1_orig/libsrc/occ/Partition_Spliter.hxx 2014-08-29 13:54:03.000000000 +0400
++++ netgen-5.3.1_new/libsrc/occ/Partition_Spliter.hxx  2016-09-29 14:44:02.004464639 +0300
+@@ -28,9 +28,6 @@
+ #ifndef _TopTools_DataMapOfShapeShape_HeaderFile
+ #include <TopTools_DataMapOfShapeShape.hxx>
+ #endif
+-#ifndef _Handle_BRepAlgo_AsDes_HeaderFile
+-#include <Handle_BRepAlgo_AsDes.hxx>
+-#endif
+ #ifndef _BRepAlgo_Image_HeaderFile
+ #include <BRepAlgo_Image.hxx>
+ #endif
+@@ -45,7 +42,6 @@
+ #endif
+ class BRepAlgo_AsDes;
+ class TopoDS_Shape;
+-class TopTools_ListOfShape;
+ class TopoDS_Edge;
+@@ -129,7 +125,7 @@
+    TopTools_DataMapOfShapeShape myFaceShapeMap;
+    TopTools_DataMapOfShapeShape myInternalFaces;
+    TopTools_DataMapOfShapeShape myIntNotClFaces;
+-   Handle_BRepAlgo_AsDes myAsDes;
++   Handle(BRepAlgo_AsDes) myAsDes;
+    BRepAlgo_Image myImagesFaces;
+    BRepAlgo_Image myImagesEdges;
+    BRepAlgo_Image myImageShape;
+diff -NaurwB netgen-5.3.1_orig/libsrc/occ/occconstruction.cpp netgen-5.3.1_new/libsrc/occ/occconstruction.cpp
+--- netgen-5.3.1_orig/libsrc/occ/occconstruction.cpp   2014-08-29 13:54:03.000000000 +0400
++++ netgen-5.3.1_new/libsrc/occ/occconstruction.cpp    2016-09-29 14:04:51.500148293 +0300
+@@ -28,7 +28,7 @@
+ #include <BRepAlgoAPI_Common.hxx>
+ #include <BRepAlgoAPI_Fuse.hxx>
+ #include <BRepAlgoAPI_Section.hxx>
+-#include <BRepOffsetAPI_Sewing.hxx>
++//#include <BRepOffsetAPI_Sewing.hxx>
+ //#include <BRepAlgo_Sewing.hxx>
+ #include <BRepOffsetAPI_MakeOffsetShape.hxx>
+ #include <ShapeFix_Shape.hxx>
+diff -NaurwB netgen-5.3.1_orig/libsrc/occ/occgenmesh.cpp netgen-5.3.1_new/libsrc/occ/occgenmesh.cpp
+--- netgen-5.3.1_orig/libsrc/occ/occgenmesh.cpp        2014-08-29 13:54:03.000000000 +0400
++++ netgen-5.3.1_new/libsrc/occ/occgenmesh.cpp 2016-09-29 14:04:51.500148293 +0300
+@@ -171,8 +171,8 @@
+          if(h < 1e-4*maxside)\r
+             return;\r
\r
+-\r
+-         if (h > 30) return;\r
++         // commented to restrict H on a large sphere for example
++         //if (h > 30) return;
+       }\r
\r
+       if (h < maxside && depth < 10)\r
+@@ -250,8 +250,8 @@
+       hvalue[0] = 0;\r
+       pnt = c->Value(s0);\r
\r
+-      double olddist = 0;\r
+-      double dist = 0;\r
++      //double olddist = 0; -- useless variables
++      //double dist = 0;
\r
+       int tmpVal = (int)(DIVIDEEDGESECTIONS);\r
\r
+@@ -259,15 +259,19 @@
+       {\r
+          oldpnt = pnt;\r
+          pnt = c->Value(s0+(i/double(DIVIDEEDGESECTIONS))*(s1-s0));\r
++         // -- no more than 1 segment per <edge length>/DIVIDEEDGESECTIONS
+          hvalue[i] = hvalue[i-1] +\r
++         //   1.0/mesh.GetH(Point3d(pnt.X(), pnt.Y(), pnt.Z()))*
++         //   pnt.Distance(oldpnt);
++           min( 1.0,
+             1.0/mesh.GetH(Point3d(pnt.X(), pnt.Y(), pnt.Z()))*\r
+-            pnt.Distance(oldpnt);\r
++                pnt.Distance(oldpnt));
\r
+          //(*testout) << "mesh.GetH(Point3d(pnt.X(), pnt.Y(), pnt.Z())) " << mesh.GetH(Point3d(pnt.X(), pnt.Y(), pnt.Z()))\r
+          //      <<  " pnt.Distance(oldpnt) " << pnt.Distance(oldpnt) << endl;\r
\r
+-         olddist = dist;\r
+-         dist = pnt.Distance(oldpnt);\r
++         //olddist = dist; -- useless variables
++         //dist = pnt.Distance(oldpnt);
+       }\r
\r
+       //  nsubedges = int(ceil(hvalue[DIVIDEEDGESECTIONS]));\r
+@@ -282,7 +286,10 @@
+       {\r
+          if (hvalue[i1]/hvalue[DIVIDEEDGESECTIONS]*nsubedges >= i)\r
+          {\r
+-            params[i] = s0+(i1/double(DIVIDEEDGESECTIONS))*(s1-s0);\r
++            // -- for nsubedges comparable to DIVIDEEDGESECTIONS
++            //params[i] = s0+(i1/double(DIVIDEEDGESECTIONS))*(s1-s0);
++            double d1 = i1 - (hvalue[i1] - i*hvalue[DIVIDEEDGESECTIONS]/nsubedges)/(hvalue[i1]-hvalue[i1-1]);
++            params[i] = s0+(d1/double(DIVIDEEDGESECTIONS))*(s1-s0);
+             pnt = c->Value(params[i]);\r
+             ps[i-1] = MeshPoint (Point3d(pnt.X(), pnt.Y(), pnt.Z()));\r
+             i++;\r
+@@ -326,6 +333,9 @@
+       (*testout) << "nedges = " << nedges << endl;\r
\r
+       double eps = 1e-6 * geom.GetBoundingBox().Diam();\r
++      const double eps2 = eps * eps; // -- small optimization
++
++      int first_vp = mesh.GetNP()+1; // -- to support SALOME sub-meshes
\r
+       for (int i = 1; i <= nvertices; i++)\r
+       {\r
+@@ -335,7 +345,8 @@
+          bool exists = 0;\r
+          if (merge_solids)\r
+             for (PointIndex pi = 1; pi <= mesh.GetNP(); pi++)\r
+-               if ( Dist2 (mesh[pi], Point<3>(mp)) < eps*eps)\r
++               //if ( Dist2 (mesh[pi], Point<3>(mp)) < eps*eps)              
++               if ( Dist2 (mesh[pi], Point<3>(mp)) < eps2 ) // -- small optimization
+                {\r
+                   exists = 1;\r
+                   break;\r
+@@ -365,6 +376,7 @@
+          {\r
+             TopoDS_Face face = TopoDS::Face(exp1.Current());\r
+             int facenr = geom.fmap.FindIndex(face);\r
++            if ( facenr < 1 ) continue; // -- to support SALOME sub-meshes
\r
+             if (face2solid[0][facenr-1] == 0)\r
+                face2solid[0][facenr-1] = solidnr;\r
+@@ -384,6 +396,7 @@
+       int facenr = 0;\r
+       int edgenr = 0;\r
\r
++      edgenr = mesh.GetNSeg(); // to support SALOME sub-meshes
\r
+       (*testout) << "faces = " << geom.fmap.Extent() << endl;\r
+       int curr = 0;\r
+@@ -445,6 +458,7 @@
+                   //(*testout) << "ignoring degenerated edge" << endl;\r
+                   continue;\r
+                }\r
++               if ( geom.emap.FindIndex(edge) < 1 ) continue; // to support SALOME sub-meshes
\r
+                if (geom.vmap.FindIndex(TopExp::FirstVertex (edge)) ==\r
+                   geom.vmap.FindIndex(TopExp::LastVertex (edge)))\r
+@@ -477,20 +491,104 @@
\r
+                if (!merge_solids)\r
+                {\r
+-                  pnums[0] = geom.vmap.FindIndex (TopExp::FirstVertex (edge));\r
+-                  pnums[pnums.Size()-1] = geom.vmap.FindIndex (TopExp::LastVertex (edge));\r
++                 //pnums[0] = geom.vmap.FindIndex (TopExp::FirstVertex (edge));
++                 //pnums[pnums.Size()-1] = geom.vmap.FindIndex (TopExp::LastVertex (edge));
++                 MeshPoint dfltP ( Point<3> ( 0, 0, 0 ) );
++                 int *ipp[] = { &pnums[0], &pnums[pnums.Size()-1] };
++                 TopoDS_Iterator vIt( edge, false );
++                 TopoDS_Vertex v[2];
++                 v[0] = TopoDS::Vertex( vIt.Value() ); vIt.Next();
++                 v[1] = TopoDS::Vertex( vIt.Value() );
++                 if ( v[0].Orientation() == TopAbs_REVERSED )
++                   std::swap( v[0], v[1] );
++                 for ( int i = 0; i < 2; ++i)
++                 {
++                   int &ip = *ipp[i];
++                   ip = geom.vmap.FindIndex ( v[i] );
++                   if ( ip == 0 || ip > nvertices )
++                   {
++                     int iv = ip;
++                     if ( ip == 0 )
++                       ip = iv = geom.vmap.Add( v[i] );
++                     gp_Pnt pnt = BRep_Tool::Pnt( v[i] );
++                     MeshPoint mp( Point<3>(pnt.X(), pnt.Y(), pnt.Z()) );
++                     for (PointIndex pi = 1; pi < first_vp; pi++)
++                       if ( Dist2 (mesh.Point(pi), Point<3>(mp)) < 1e-100 )
++                       {
++                         ip = pi;
++                         if ( mesh.Point(ip).GetLayer() != dfltP.GetLayer() && mesh.Point(ip).GetLayer() != iv )
++                           continue;
++                         if ( mesh.Point(ip).GetLayer() == dfltP.GetLayer())
++                           mesh.Point(ip) = MeshPoint( mesh.Point(ip), iv );
++                         break;
++                       }
+                }\r
+                else\r
+                {\r
+-                  Point<3> fp = occ2ng (BRep_Tool::Pnt (TopExp::FirstVertex (edge)));\r
+-                  Point<3> lp = occ2ng (BRep_Tool::Pnt (TopExp::LastVertex (edge)));\r
++                     ip += first_vp - 1;
++                   }
++                 }
++               }
++               else
++               {
++                 TopoDS_Iterator vIt( edge, false );
++                 TopoDS_Vertex v1 = TopoDS::Vertex( vIt.Value() ); vIt.Next();
++                 TopoDS_Vertex v2 = TopoDS::Vertex( vIt.Value() );
++                 if ( v1.Orientation() == TopAbs_REVERSED )
++                   std::swap( v1, v2 );
++                 const bool isClosedEdge = v1.IsSame( v2 );
++                 
++                  Point<3> fp = occ2ng (BRep_Tool::Pnt (v1));
++                  Point<3> lp = occ2ng (BRep_Tool::Pnt (v2));
++                  double tol2 = std::min( eps*eps, 1e-6 * Dist2( fp, lp ));
++                  if ( isClosedEdge )
++                    tol2 = BRep_Tool::Tolerance( v1 ) * BRep_Tool::Tolerance( v1 );
\r
+                   pnums[0] = -1;\r
+                   pnums.Last() = -1;\r
+                   for (PointIndex pi = 1; pi < first_ep; pi++)\r
+                   {\r
+-                     if (Dist2 (mesh[pi], fp) < eps*eps) pnums[0] = pi;\r
+-                     if (Dist2 (mesh[pi], lp) < eps*eps) pnums.Last() = pi;\r
++                    if (Dist2 (mesh[pi], fp) < tol2) pnums[0] = pi;
++                    if (Dist2 (mesh[pi], lp) < tol2) pnums.Last() = pi;
++                  }
++                  if (( isClosedEdge && pnums[0] != pnums.Last() ) ||
++                      ( !isClosedEdge && pnums[0] == pnums.Last() ))
++                    pnums[0] = pnums.Last() = -1;
++                  if ( pnums[0] == -1 || pnums.Last() == -1 )
++                  {
++                    // take into account a possible large gap between a vertex and an edge curve
++                    // end and a large vertex tolerance covering the whole edge
++                    if ( pnums[0] == -1 )
++                    {
++                      double tol = BRep_Tool::Tolerance( v1 );
++                      for (PointIndex pi = 1; pi < first_ep; pi++)
++                        if (pi != pnums.Last() && Dist2 (mesh[pi], fp) < 2*tol*tol)
++                          pnums[0] = pi;
++
++                      if ( pnums[0] == -1 )
++                        pnums[0] = first_ep-1- nvertices + geom.vmap.FindIndex ( v1 );
++                    }
++                    if ( isClosedEdge )
++                    {
++                      pnums.Last() = pnums[0];
++                    }
++                    else
++                    {
++                      if ( pnums.Last() == -1 )
++                      {
++                        double tol = BRep_Tool::Tolerance( v2 );
++                        for (PointIndex pi = 1; pi < first_ep; pi++)
++                          if (pi != pnums[0] && Dist2 (mesh[pi], lp) < 2*tol*tol)
++                            pnums.Last() = pi;
++
++                        if ( pnums.Last() == -1 )
++                          pnums.Last() = first_ep-1-nvertices + geom.vmap.FindIndex ( v2 );
++                      }
++
++                      if ( Dist2( fp, mesh[PointIndex(pnums[0])]) >
++                           Dist2( lp, mesh[PointIndex(pnums.Last())]))
++                      std::swap( pnums[0], pnums.Last() );
++                    }
+                   }\r
+                }\r
\r
+@@ -500,17 +598,20 @@
+                   bool exists = 0;\r
+                   int j;\r
+                   for (j = first_ep; j <= mesh.GetNP(); j++)\r
++                  {
++                     if (!merge_solids && mesh.Point(j).GetLayer() != geomedgenr ) continue; // to support SALOME fuse edges
+                      if ((mesh.Point(j)-Point<3>(mp[i-1])).Length() < eps)\r
+                      {\r
+                         exists = 1;\r
+                         break;\r
+                      }\r
++                  }
\r
+                      if (exists)\r
+                         pnums[i] = j;\r
+                      else\r
+                      {\r
+-                        mesh.AddPoint (mp[i-1]);\r
++                        mesh.AddPoint (mp[i-1], geomedgenr); // to support SALOME fuse edges
+                         (*testout) << "add meshpoint " << mp[i-1] << endl;\r
+                         pnums[i] = mesh.GetNP();\r
+                      }\r
+@@ -594,6 +695,8 @@
+       //              (*testout) << "edge " << mesh.LineSegment(i).edgenr << " face " << mesh.LineSegment(i).si\r
+       //                              << " p1 " << mesh.LineSegment(i)[0] << " p2 " << mesh.LineSegment(i)[1] << endl;\r
+       //      exit(10);\r
++      for (int j = 1; j <= mesh.GetNP(); j++) // to support SALOME fuse edges: set level to zero
++        mesh.Point(j) = MeshPoint( (Point<3>&) mesh.Point(j) );
\r
+       mesh.CalcSurfacesOfNode();\r
+       multithread.task = savetask;\r
+diff -NaurwB netgen-5.3.1_orig/libsrc/occ/occgeom.cpp netgen-5.3.1_new/libsrc/occ/occgeom.cpp
+--- netgen-5.3.1_orig/libsrc/occ/occgeom.cpp   2014-08-29 13:54:03.000000000 +0400
++++ netgen-5.3.1_new/libsrc/occ/occgeom.cpp    2016-09-29 16:22:31.636328123 +0300
+@@ -8,6 +8,8 @@
+ #include "ShapeAnalysis_CheckSmallFace.hxx"\r
+ #include "ShapeAnalysis_DataMapOfShapeListOfReal.hxx"\r
+ #include "ShapeAnalysis_Surface.hxx"\r
++#include <BRepTopAdaptor_FClass2d.hxx> // -- to optimize Project() and FastProject()
++#include <TopAbs_State.hxx>
+ #include "BRepAlgoAPI_Fuse.hxx"\r
+ #include "BRepCheck_Analyzer.hxx"\r
+ #include "BRepLib.hxx"\r
+@@ -16,9 +18,16 @@
+ #include "ShapeFix_FixSmallFace.hxx"\r
+ #include "Partition_Spliter.hxx"\r
\r
+-\r
+ namespace netgen\r
+ {\r
++  // free data used to optimize Project() and FastProject()
++  OCCGeometry::~OCCGeometry()
++  {
++    NCollection_DataMap<int,BRepTopAdaptor_FClass2d*>::Iterator it(fclsmap);
++    for (; it.More(); it.Next())
++      delete it.Value();
++  }
++
+    void OCCGeometry :: PrintNrShapes ()\r
+    {\r
+       TopExp_Explorer e;\r
+@@ -112,7 +121,7 @@
+       double surfacecont = 0;\r
\r
+       {\r
+-         Handle_ShapeBuild_ReShape rebuild = new ShapeBuild_ReShape;\r
++         Handle(ShapeBuild_ReShape) rebuild = new ShapeBuild_ReShape;
+          rebuild->Apply(shape);\r
+          for (exp1.Init (shape, TopAbs_EDGE); exp1.More(); exp1.Next())\r
+          {\r
+@@ -143,7 +152,7 @@
+          cout << endl << "- repairing faces" << endl;\r
\r
+          Handle(ShapeFix_Face) sff;\r
+-         Handle_ShapeBuild_ReShape rebuild = new ShapeBuild_ReShape;\r
++         Handle(ShapeBuild_ReShape) rebuild = new ShapeBuild_ReShape;
+          rebuild->Apply(shape);\r
\r
\r
+@@ -200,7 +209,7 @@
\r
\r
+       {\r
+-         Handle_ShapeBuild_ReShape rebuild = new ShapeBuild_ReShape;\r
++         Handle(ShapeBuild_ReShape) rebuild = new ShapeBuild_ReShape;
+          rebuild->Apply(shape);\r
+          for (exp1.Init (shape, TopAbs_EDGE); exp1.More(); exp1.Next())\r
+          {\r
+@@ -217,7 +226,7 @@
+          cout << endl << "- fixing small edges" << endl;\r
\r
+          Handle(ShapeFix_Wire) sfw;\r
+-         Handle_ShapeBuild_ReShape rebuild = new ShapeBuild_ReShape;\r
++         Handle(ShapeBuild_ReShape) rebuild = new ShapeBuild_ReShape;
+          rebuild->Apply(shape);\r
\r
\r
+@@ -284,7 +293,7 @@
\r
+          {\r
+             BuildFMap();\r
+-            Handle_ShapeBuild_ReShape rebuild = new ShapeBuild_ReShape;\r
++            Handle(ShapeBuild_ReShape) rebuild = new ShapeBuild_ReShape;
+             rebuild->Apply(shape);\r
\r
+             for (exp1.Init (shape, TopAbs_EDGE); exp1.More(); exp1.Next())\r
+@@ -312,7 +321,7 @@
\r
\r
+          {\r
+-            Handle_ShapeBuild_ReShape rebuild = new ShapeBuild_ReShape;\r
++            Handle(ShapeBuild_ReShape) rebuild = new ShapeBuild_ReShape;
+             rebuild->Apply(shape);\r
+             for (exp1.Init (shape, TopAbs_EDGE); exp1.More(); exp1.Next())\r
+             {\r
+@@ -438,7 +447,7 @@
\r
\r
+       {\r
+-         Handle_ShapeBuild_ReShape rebuild = new ShapeBuild_ReShape;\r
++         Handle(ShapeBuild_ReShape) rebuild = new ShapeBuild_ReShape;
+          rebuild->Apply(shape);\r
+          for (exp1.Init (shape, TopAbs_EDGE); exp1.More(); exp1.Next())\r
+          {\r
+@@ -483,7 +492,7 @@
+                   TopoDS_Solid solid = TopoDS::Solid(exp0.Current());\r
+                   TopoDS_Solid newsolid = solid;\r
+                   BRepLib::OrientClosedSolid (newsolid);\r
+-                  Handle_ShapeBuild_ReShape rebuild = new ShapeBuild_ReShape;\r
++                  Handle(ShapeBuild_ReShape) rebuild = new ShapeBuild_ReShape;
+                   //            rebuild->Apply(shape);\r
+                   rebuild->Replace(solid, newsolid, Standard_False);\r
+                   TopoDS_Shape newshape = rebuild->Apply(shape, TopAbs_COMPSOLID);//, 1);\r
+@@ -906,7 +915,7 @@
+             TopoDS_Solid solid = TopoDS::Solid(exp0.Current());\r
+             TopoDS_Solid newsolid = solid;\r
+             BRepLib::OrientClosedSolid (newsolid);\r
+-            Handle_ShapeBuild_ReShape rebuild = new ShapeBuild_ReShape;\r
++            Handle(ShapeBuild_ReShape) rebuild = new ShapeBuild_ReShape;
+             rebuild->Replace(solid, newsolid, Standard_False);\r
\r
+             TopoDS_Shape newshape = rebuild->Apply(shape, TopAbs_SHAPE, 1);\r
+@@ -951,25 +960,58 @@
+    }\r
\r
\r
++   // returns a projector and a classifier for the given surface
++   void OCCGeometry::GetFaceTools(int surfi, Handle(ShapeAnalysis_Surface)& proj,
++                                  BRepTopAdaptor_FClass2d*& cls) const
++   {
++     //MSV: organize caching projector in the map
++     if (fprjmap.IsBound(surfi))
++     {
++       proj = fprjmap.Find(surfi);
++       cls = fclsmap.Find(surfi);
++     }
++     else
++     {
++       const TopoDS_Face& aFace = TopoDS::Face(fmap(surfi));
++       Handle(Geom_Surface) aSurf = BRep_Tool::Surface(aFace);
++       proj = new ShapeAnalysis_Surface(aSurf);
++       fprjmap.Bind(surfi, proj);
++       cls = new BRepTopAdaptor_FClass2d(aFace,Precision::Confusion());
++       fclsmap.Bind(surfi, cls);
++     }
++   }
\r
+-\r
+-   void OCCGeometry :: Project (int surfi, Point<3> & p) const\r
++   // void OCCGeometry :: Project (int surfi, Point<3> & p) const
++   bool OCCGeometry :: Project (int surfi, Point<3> & p, double& u, double& v) const
+    {\r
+       static int cnt = 0;\r
+       if (++cnt % 1000 == 0) cout << "Project cnt = " << cnt << endl;\r
\r
+       gp_Pnt pnt(p(0), p(1), p(2));\r
\r
+-      double u,v;\r
+-      Handle( Geom_Surface ) thesurf = BRep_Tool::Surface(TopoDS::Face(fmap(surfi)));\r
+-      Handle( ShapeAnalysis_Surface ) su = new ShapeAnalysis_Surface( thesurf );\r
+-      gp_Pnt2d suval = su->ValueOfUV ( pnt, BRep_Tool::Tolerance( TopoDS::Face(fmap(surfi)) ) );\r
+-      suval.Coord( u, v);\r
+-      pnt = thesurf->Value( u, v );\r
++      // -- Optimization: use cached projector and classifier
++      // double u,v;
++      // Handle( Geom_Surface ) thesurf = BRep_Tool::Surface(TopoDS::Face(fmap(surfi)));
++      // Handle( ShapeAnalysis_Surface ) su = new ShapeAnalysis_Surface( thesurf );
++      // gp_Pnt2d suval = su->ValueOfUV ( pnt, BRep_Tool::Tolerance( TopoDS::Face(fmap(surfi)) ) );
++      // suval.Coord( u, v);
++      // pnt = thesurf->Value( u, v );  
++
++      Handle(ShapeAnalysis_Surface) proj;
++      BRepTopAdaptor_FClass2d *cls;
++      GetFaceTools(surfi, proj, cls);
\r
++      gp_Pnt2d p2d = proj->ValueOfUV(pnt, Precision::Confusion());
++      if (cls->Perform(p2d) == TopAbs_OUT)
++      {
++        return false;
++      }
++      pnt = proj->Value(p2d);
++      p2d.Coord(u, v);
\r
+       p = Point<3> (pnt.X(), pnt.Y(), pnt.Z());\r
\r
++      return true;
+    }\r
\r
\r
+@@ -979,54 +1021,69 @@
+    {\r
+       gp_Pnt p(ap(0), ap(1), ap(2));\r
\r
+-      Handle(Geom_Surface) surface = BRep_Tool::Surface(TopoDS::Face(fmap(surfi)));\r
+-\r
+-      gp_Pnt x = surface->Value (u,v);\r
+-\r
+-      if (p.SquareDistance(x) <= sqr(PROJECTION_TOLERANCE)) return true;\r
+-\r
+-      gp_Vec du, dv;\r
++      // -- Optimization: use cached projector and classifier
++      // Handle(Geom_Surface) surface = BRep_Tool::Surface(TopoDS::Face(fmap(surfi)));
++      // 
++      // gp_Pnt x = surface->Value (u,v);
++      // 
++      // if (p.SquareDistance(x) <= sqr(PROJECTION_TOLERANCE)) return true;
++      // 
++      // gp_Vec du, dv;
++      // 
++      // surface->D1(u,v,x,du,dv);
++      // 
++      // int count = 0;
++      // 
++      // gp_Pnt xold;
++      // gp_Vec n;
++      // double det, lambda, mu;
++      // 
++      // do {
++      //    count++;
++      // 
++      //    n = du^dv;
++      // 
++      //    det = Det3 (n.X(), du.X(), dv.X(),
++      //       n.Y(), du.Y(), dv.Y(),
++      //       n.Z(), du.Z(), dv.Z());
++      // 
++      //    if (det < 1e-15) return false;
++      // 
++      //    lambda = Det3 (n.X(), p.X()-x.X(), dv.X(),
++      //       n.Y(), p.Y()-x.Y(), dv.Y(),
++      //       n.Z(), p.Z()-x.Z(), dv.Z())/det;
++      // 
++      //    mu     = Det3 (n.X(), du.X(), p.X()-x.X(),
++      //       n.Y(), du.Y(), p.Y()-x.Y(),
++      //       n.Z(), du.Z(), p.Z()-x.Z())/det;
++      // 
++      //    u += lambda;
++      //    v += mu;
++      // 
++      //    xold = x;
++      //    surface->D1(u,v,x,du,dv);
++      // 
++      // } while (xold.SquareDistance(x) > sqr(PROJECTION_TOLERANCE) && count < 50);
++      // 
++      // //    (*testout) << "FastProject count: " << count << endl;
++      // 
++      // if (count == 50) return false;
++      // 
++      // ap = Point<3> (x.X(), x.Y(), x.Z());
++      Handle(ShapeAnalysis_Surface) proj;
++      BRepTopAdaptor_FClass2d *cls;
++      GetFaceTools(surfi, proj, cls);
\r
+-      surface->D1(u,v,x,du,dv);\r
+-\r
+-      int count = 0;\r
+-\r
+-      gp_Pnt xold;\r
+-      gp_Vec n;\r
+-      double det, lambda, mu;\r
+-\r
+-      do {\r
+-         count++;\r
+-\r
+-         n = du^dv;\r
+-\r
+-         det = Det3 (n.X(), du.X(), dv.X(),\r
+-            n.Y(), du.Y(), dv.Y(),\r
+-            n.Z(), du.Z(), dv.Z());\r
+-\r
+-         if (det < 1e-15) return false;\r
+-\r
+-         lambda = Det3 (n.X(), p.X()-x.X(), dv.X(),\r
+-            n.Y(), p.Y()-x.Y(), dv.Y(),\r
+-            n.Z(), p.Z()-x.Z(), dv.Z())/det;\r
+-\r
+-         mu     = Det3 (n.X(), du.X(), p.X()-x.X(),\r
+-            n.Y(), du.Y(), p.Y()-x.Y(),\r
+-            n.Z(), du.Z(), p.Z()-x.Z())/det;\r
+-\r
+-         u += lambda;\r
+-         v += mu;\r
+-\r
+-         xold = x;\r
+-         surface->D1(u,v,x,du,dv);\r
+-\r
+-      } while (xold.SquareDistance(x) > sqr(PROJECTION_TOLERANCE) && count < 50);\r
+-\r
+-      //    (*testout) << "FastProject count: " << count << endl;\r
+-\r
+-      if (count == 50) return false;\r
++      gp_Pnt2d p2d = proj->NextValueOfUV(gp_Pnt2d(u,v), p, Precision::Confusion());
++      if (cls->Perform(p2d) == TopAbs_OUT)
++      {
++        //cout << "Projection fails" << endl;
++        return false;
++      }
\r
+-      ap = Point<3> (x.X(), x.Y(), x.Z());\r
++      p = proj->Value(p2d);
++      p2d.Coord(u, v);
++      ap = Point<3> (p.X(), p.Y(), p.Z());
\r
+       return true;\r
+    }\r
+@@ -1038,9 +1095,9 @@
+    {\r
+       cout << "writing stl..."; cout.flush();\r
+       StlAPI_Writer writer;\r
+-      writer.RelativeMode() = Standard_False;\r
++      //writer.RelativeMode() = Standard_False;
\r
+-      writer.SetDeflection(0.02);\r
++      //writer.SetDeflection(0.02);
+       writer.Write(shape,filename);\r
\r
+       cout << "done" << endl;\r
+@@ -1059,10 +1116,10 @@
+       occgeo = new OCCGeometry;\r
\r
+       // Initiate a dummy XCAF Application to handle the IGES XCAF Document\r
+-      static Handle_XCAFApp_Application dummy_app = XCAFApp_Application::GetApplication();\r
++      static Handle(XCAFApp_Application) dummy_app = XCAFApp_Application::GetApplication();
\r
+       // Create an XCAF Document to contain the IGES file itself\r
+-      Handle_TDocStd_Document iges_doc;\r
++      Handle(TDocStd_Document) iges_doc;
\r
+       // Check if a IGES File is already open under this handle, if so, close it to prevent\r
+       // Segmentation Faults when trying to create a new document\r
+@@ -1089,8 +1146,8 @@
+       reader.Transfer(iges_doc);\r
\r
+       // Read in the shape(s) and the colours present in the IGES File\r
+-      Handle_XCAFDoc_ShapeTool iges_shape_contents = XCAFDoc_DocumentTool::ShapeTool(iges_doc->Main());\r
+-      Handle_XCAFDoc_ColorTool iges_colour_contents = XCAFDoc_DocumentTool::ColorTool(iges_doc->Main());\r
++      Handle(XCAFDoc_ShapeTool) iges_shape_contents = XCAFDoc_DocumentTool::ShapeTool(iges_doc->Main());
++      Handle(XCAFDoc_ColorTool) iges_colour_contents = XCAFDoc_DocumentTool::ColorTool(iges_doc->Main());
\r
+       TDF_LabelSequence iges_shapes;\r
+       iges_shape_contents->GetShapes(iges_shapes);\r
+@@ -1137,10 +1194,10 @@
+       occgeo = new OCCGeometry;\r
\r
+       // Initiate a dummy XCAF Application to handle the STEP XCAF Document\r
+-      static Handle_XCAFApp_Application dummy_app = XCAFApp_Application::GetApplication();\r
++      static Handle(XCAFApp_Application) dummy_app = XCAFApp_Application::GetApplication();
\r
+       // Create an XCAF Document to contain the STEP file itself\r
+-      Handle_TDocStd_Document step_doc;\r
++      Handle(TDocStd_Document) step_doc;
\r
+       // Check if a STEP File is already open under this handle, if so, close it to prevent\r
+       // Segmentation Faults when trying to create a new document\r
+@@ -1167,8 +1224,8 @@
+       reader.Transfer(step_doc);\r
\r
+       // Read in the shape(s) and the colours present in the STEP File\r
+-      Handle_XCAFDoc_ShapeTool step_shape_contents = XCAFDoc_DocumentTool::ShapeTool(step_doc->Main());\r
+-      Handle_XCAFDoc_ColorTool step_colour_contents = XCAFDoc_DocumentTool::ColorTool(step_doc->Main());\r
++      Handle(XCAFDoc_ShapeTool) step_shape_contents = XCAFDoc_DocumentTool::ShapeTool(step_doc->Main());
++      Handle(XCAFDoc_ColorTool) step_colour_contents = XCAFDoc_DocumentTool::ColorTool(step_doc->Main());
\r
+       TDF_LabelSequence step_shapes;\r
+       step_shape_contents->GetShapes(step_shapes);\r
+@@ -1221,7 +1278,7 @@
+       // Fixed a bug in the OpenCascade XDE Colour handling when \r
+       // opening BREP Files, since BREP Files have no colour data.\r
+       // Hence, the face_colours Handle needs to be created as a NULL handle.\r
+-      occgeo->face_colours = Handle_XCAFDoc_ColorTool();\r
++      occgeo->face_colours = Handle(XCAFDoc_ColorTool)();
+       occgeo->face_colours.Nullify();\r
+       occgeo->changed = 1;\r
+       occgeo->BuildFMap();\r
+diff -NaurwB netgen-5.3.1_orig/libsrc/occ/occgeom.hpp netgen-5.3.1_new/libsrc/occ/occgeom.hpp
+--- netgen-5.3.1_orig/libsrc/occ/occgeom.hpp   2014-08-29 13:54:03.000000000 +0400
++++ netgen-5.3.1_new/libsrc/occ/occgeom.hpp    2016-09-29 14:44:01.996464598 +0300
+@@ -15,8 +15,8 @@
+ #include "Geom_Curve.hxx"\r
+ #include "Geom2d_Curve.hxx"\r
+ #include "Geom_Surface.hxx"\r
+-#include "GeomAPI_ProjectPointOnSurf.hxx"\r
+-#include "GeomAPI_ProjectPointOnCurve.hxx"\r
++// #include "GeomAPI_ProjectPointOnSurf.hxx"
++// #include "GeomAPI_ProjectPointOnCurve.hxx"
+ #include "BRepTools.hxx"\r
+ #include "TopExp.hxx"\r
+ #include "BRepBuilderAPI_MakeVertex.hxx"\r
+@@ -42,8 +42,8 @@
+ #include "Geom_Curve.hxx"\r
+ #include "Geom2d_Curve.hxx"\r
+ #include "Geom_Surface.hxx"\r
+-#include "GeomAPI_ProjectPointOnSurf.hxx"\r
+-#include "GeomAPI_ProjectPointOnCurve.hxx"\r
++// #include "GeomAPI_ProjectPointOnSurf.hxx"
++// #include "GeomAPI_ProjectPointOnCurve.hxx"
+ #include "TopoDS_Wire.hxx"\r
+ #include "BRepTools_WireExplorer.hxx"\r
+ #include "BRepTools.hxx"\r
+@@ -68,18 +68,26 @@
+ #include "IGESToBRep_Reader.hxx"\r
+ #include "Interface_Static.hxx"\r
+ #include "GeomAPI_ExtremaCurveCurve.hxx"\r
+-#include "Standard_ErrorHandler.hxx"\r
++//#include "Standard_ErrorHandler.hxx"
+ #include "Standard_Failure.hxx"\r
+ #include "ShapeUpgrade_ShellSewing.hxx"\r
+ #include "ShapeFix_Shape.hxx"\r
+ #include "ShapeFix_Wireframe.hxx"\r
++#include <Standard_Version.hxx>
++#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) <= 0x060702
++// porting to OCCT6.7.3
+ #include "BRepMesh.hxx"\r
++#endif
+ #include "BRepMesh_IncrementalMesh.hxx"\r
+ #include "BRepBndLib.hxx"\r
+ #include "Bnd_Box.hxx"\r
+ #include "ShapeAnalysis.hxx"\r
+ #include "ShapeBuild_ReShape.hxx"\r
\r
++// -- Optimization: to use cached projector and classifier
++#include <NCollection_DataMap.hxx>
++class ShapeAnalysis_Surface;
++class BRepTopAdaptor_FClass2d;
\r
+ // Philippose - 29/01/2009\r
+ // OpenCascade XDE Support\r
+@@ -192,6 +200,9 @@
+    class OCCGeometry : public NetgenGeometry\r
+    {\r
+       Point<3> center;\r
++      // -- Optimization: to use cached projector and classifier
++      mutable NCollection_DataMap<int,Handle(ShapeAnalysis_Surface)> fprjmap;
++      mutable NCollection_DataMap<int,BRepTopAdaptor_FClass2d*> fclsmap;
\r
+    public:\r
+       TopoDS_Shape shape;\r
+@@ -203,7 +214,7 @@
+       // OpenCascade XDE Support\r
+       // XCAF Handle to make the face colours available to the rest of\r
+       // the system\r
+-      Handle_XCAFDoc_ColorTool face_colours;\r
++      Handle(XCAFDoc_ColorTool) face_colours;
\r
+      mutable int changed;\r
+       Array<int> facemeshstatus;\r
+@@ -247,6 +258,8 @@
+      virtual void Save (string filename) const;\r
\r
\r
++      ~OCCGeometry();      // -- to free cached projector and classifier
++
+       void BuildFMap();\r
\r
+       Box<3> GetBoundingBox()\r
+@@ -266,9 +279,14 @@
+       Point<3> Center()\r
+       {  return center;}\r
\r
+-      void Project (int surfi, Point<3> & p) const;\r
++      // void Project (int surfi, Point<3> & p) const; -- optimization
++      bool Project (int surfi, Point<3> & p, double& u, double& v) const;
+       bool FastProject (int surfi, Point<3> & ap, double& u, double& v) const;\r
\r
++      // -- Optimization: to use cached projector and classifier
++      void GetFaceTools(int surfi, Handle(ShapeAnalysis_Surface)& proj,
++                        BRepTopAdaptor_FClass2d*& cls) const;
++
+       OCCSurface GetSurface (int surfi)\r
+       {\r
+          cout << "OCCGeometry::GetSurface using PLANESPACE" << endl;\r
+diff -NaurwB netgen-5.3.1_orig/libsrc/occ/occmeshsurf.cpp netgen-5.3.1_new/libsrc/occ/occmeshsurf.cpp
+--- netgen-5.3.1_orig/libsrc/occ/occmeshsurf.cpp       2014-08-29 13:54:03.000000000 +0400
++++ netgen-5.3.1_new/libsrc/occ/occmeshsurf.cpp        2016-09-29 14:08:00.045144560 +0300
+@@ -6,6 +6,7 @@
+ #include <meshing.hpp>
+ #include <GeomLProp_SLProps.hxx>
+ #include <ShapeAnalysis_Surface.hxx>
++#include <GeomAPI_ProjectPointOnCurve.hxx> // -- moved here from occgeom.hpp
+ namespace netgen
+@@ -96,13 +97,16 @@
+       n.Normalize();
+       }
+-    else
++    else if ( lprop.IsNormalDefined() )
+       {
+       n(0)=lprop.Normal().X();
+       n(1)=lprop.Normal().Y();
+       n(2)=lprop.Normal().Z();
+       }
+-
++    else
++      {
++        n = 0;
++      }
+     if(glob_testout)
+       {
+       (*testout) << "u " << geominfo.u << " v " << geominfo.v 
+@@ -434,23 +435,33 @@
+   void MeshOptimize2dOCCSurfaces :: ProjectPoint (INDEX surfind, Point<3> & p) const
+   {
+-    geometry.Project (surfind, p);
++    // geometry.Project (surfind, p); -- signature of Project() changed for optimization
++    double u, v;
++    geometry.Project (surfind, p, u, v);
+   }
+   int MeshOptimize2dOCCSurfaces :: ProjectPointGI (INDEX surfind, Point<3> & p, PointGeomInfo & gi) const
+   {
+-    double u = gi.u;
+-    double v = gi.v;
++    //double u = gi.u;
++    //double v = gi.v;
+     Point<3> hp = p;
+-    if (geometry.FastProject (surfind, hp, u, v))
+-      {
++    // -- u and v are computed by FastProject() and Project(), no need to call CalcPointGeomInfo()
++    // if (geometry.FastProject (surfind, hp, u, v))
++    //   {
++    //    p = hp;
++    //    return 1;
++    //   }
++    // ProjectPoint (surfind, p); 
++    // return CalcPointGeomInfo (surfind, gi, p); 
++    bool ok;
++    if (gi.trignum > 0)
++      ok = geometry.FastProject (surfind, hp, gi.u, gi.v);
++    else
++      ok = geometry.Project (surfind, hp, gi.u, gi.v);
+       p = hp;
+-      return 1;
+-      }
+-    ProjectPoint (surfind, p); 
+-    return CalcPointGeomInfo (surfind, gi, p); 
++    return ok;
+   }
+@@ -680,7 +691,8 @@
+       if (!geometry.FastProject (surfi, hnewp, u, v))
+         {
+         //  cout << "Fast projection to surface fails! Using OCC projection" << endl;
+-          geometry.Project (surfi, hnewp);
++          // geometry.Project (surfi, hnewp); -- Project() changed for optimization
++          geometry.Project (surfi, hnewp, u, v);
+         }
+       newgi.trignum = 1;
+@@ -689,7 +701,7 @@
+       }
+   
+     newp = hnewp;
+-  }
++  }//; -- to compile with -Wall -pedantic
+   void OCCRefinementSurfaces :: 
+@@ -708,14 +720,18 @@
+     hnewp = Point<3> (pnt.X(), pnt.Y(), pnt.Z());
+     newp = hnewp;
+     newgi = ap1;
+-  };
++  }//; -- to compile with -Wall -pedantic
+   void OCCRefinementSurfaces :: ProjectToSurface (Point<3> & p, int surfi) const
+   {
+     if (surfi > 0)
+-      geometry.Project (surfi, p);
+-  };
++      //geometry.Project (surfi, p);
++    {
++      double u, v;
++      geometry.Project (surfi, p, u, v);
++    }
++  }//; -- to compile with -Wall -pedantic
+   void OCCRefinementSurfaces :: ProjectToSurface (Point<3> & p, int surfi, PointGeomInfo & gi) const
+   {
+@@ -723,9 +739,10 @@
+       if (!geometry.FastProject (surfi, p, gi.u, gi.v))
+       {
+         cout << "Fast projection to surface fails! Using OCC projection" << endl;
+-        geometry.Project (surfi, p);
++          double u, v;
++        geometry.Project (surfi, p, u, v);
++      }
+       }
+-  };
+diff -NaurwB netgen-5.3.1_orig/libsrc/occ/utilities.h netgen-5.3.1_new/libsrc/occ/utilities.h
+--- netgen-5.3.1_orig/libsrc/occ/utilities.h   2014-08-29 13:54:03.000000000 +0400
++++ netgen-5.3.1_new/libsrc/occ/utilities.h    2016-09-29 14:04:51.504148314 +0300
+@@ -33,6 +33,7 @@
+ #include <string>
+ #include <iostream>
++#include <iomanip>
+ #include <cstdlib>
+ // #include "SALOME_Log.hxx"
+diff -NaurwB netgen-5.3.1_orig/nglib/nglib.h netgen-5.3.1_new/nglib/nglib.h
+--- netgen-5.3.1_orig/nglib/nglib.h    2014-08-29 13:54:00.000000000 +0400
++++ netgen-5.3.1_new/nglib/nglib.h     2016-09-29 14:04:51.504148314 +0300
+@@ -24,7 +24,7 @@
+ // Philippose - 14.02.2009\r
+ // Modifications for creating a DLL in Windows\r
+ #ifdef WIN32\r
+-   #ifdef NGLIB_EXPORTS || nglib_EXPORTS\r
++   #if defined NGLIB_EXPORTS || defined nglib_EXPORTS
+       #define DLL_HEADER   __declspec(dllexport)\r
+    #else\r
+       #define DLL_HEADER   __declspec(dllimport)\r
+diff -Naur netgen-5.3.1_orig/libsrc/csg/Makefile.am netgen-5.3.1_new/libsrc/csg/Makefile.am
+--- netgen-5.3.1_orig/libsrc/csg/Makefile.am   2014-08-29 13:54:06.000000000 +0400
++++ netgen-5.3.1_new/libsrc/csg/Makefile.am    2016-11-08 17:48:02.000000000 +0300
+@@ -8,7 +8,7 @@
+ AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include  $(TCL_INCLUDES)
+ METASOURCES = AUTO
+-lib_LTLIBRARIES = libcsg.la
++noinst_LTLIBRARIES = libcsg.la
+ libcsg_la_SOURCES = algprim.cpp brick.cpp   \
+@@ -17,12 +17,9 @@
+ manifold.cpp meshsurf.cpp polyhedra.cpp revolution.cpp singularref.cpp \
+ solid.cpp specpoin.cpp spline3d.cpp surface.cpp triapprox.cpp
+-libcsg_la_LIBADD =  $(top_builddir)/libsrc/meshing/libmesh.la
+-
+-
+ if NGGUI
+-lib_LTLIBRARIES += libcsgvis.la 
++lib_LTLIBRARIES = libcsgvis.la 
+ libcsgvis_la_SOURCES = vscsg.cpp csgpkg.cpp
+ libcsgvis_la_LIBADD = libcsg.la
+diff -Naur netgen-5.3.1_orig/libsrc/geom2d/Makefile.am netgen-5.3.1_new/libsrc/geom2d/Makefile.am
+--- netgen-5.3.1_orig/libsrc/geom2d/Makefile.am        2014-08-29 13:54:06.000000000 +0400
++++ netgen-5.3.1_new/libsrc/geom2d/Makefile.am 2016-11-08 17:49:13.000000000 +0300
+@@ -4,16 +4,15 @@
+ METASOURCES = AUTO
+-lib_LTLIBRARIES = libgeom2d.la 
++noinst_LTLIBRARIES = libgeom2d.la 
+ if NGGUI
+-lib_LTLIBRARIES += libgeom2dvis.la 
++lib_LTLIBRARIES = libgeom2dvis.la 
+ endif
+ libgeom2d_la_SOURCES = genmesh2d.cpp geom2dmesh.cpp geometry2d.cpp
+-libgeom2d_la_LIBADD =         $(top_builddir)/libsrc/meshing/libmesh.la
+ libgeom2dvis_la_SOURCES = geom2dpkg.cpp vsgeom2d.cpp
+ libgeom2dvis_la_LIBADD = libgeom2d.la
+diff -Naur netgen-5.3.1_orig/libsrc/interface/Makefile.am netgen-5.3.1_new/libsrc/interface/Makefile.am
+--- netgen-5.3.1_orig/libsrc/interface/Makefile.am     2014-08-29 13:54:02.000000000 +0400
++++ netgen-5.3.1_new/libsrc/interface/Makefile.am      2016-11-08 17:49:26.000000000 +0300
+@@ -2,14 +2,11 @@
+ AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include -I$(top_srcdir)/libsrc/interface  $(MPI_INCLUDES) $(TCL_INCLUDES) -DOPENGL
+ METASOURCES = AUTO
+-lib_LTLIBRARIES = libinterface.la
++noinst_LTLIBRARIES = libinterface.la
+ libinterface_la_SOURCES = nginterface.cpp nginterface_v2.cpp \
+       read_fnf_mesh.cpp readtetmesh.cpp readuser.cpp writeabaqus.cpp writediffpack.cpp \
+       writedolfin.cpp writeelmer.cpp writefeap.cpp writefluent.cpp writegmsh.cpp writejcm.cpp \
+       writepermas.cpp writetecplot.cpp writetet.cpp writetochnog.cpp writeuser.cpp \
+       wuchemnitz.cpp writegmsh2.cpp writeOpenFOAM15x.cpp 
+-
+-libinterface_la_LIBADD = $(top_builddir)/libsrc/meshing/libmesh.la
+-
+ # libinterface_la_LDFLAGS = -rdynamic
+diff -Naur netgen-5.3.1_orig/libsrc/meshing/Makefile.am netgen-5.3.1_new/libsrc/meshing/Makefile.am
+--- netgen-5.3.1_orig/libsrc/meshing/Makefile.am       2014-08-29 13:54:05.000000000 +0400
++++ netgen-5.3.1_new/libsrc/meshing/Makefile.am        2016-11-08 17:48:44.000000000 +0300
+@@ -15,7 +15,7 @@
+ METASOURCES = AUTO
+-lib_LTLIBRARIES = libmesh.la
++noinst_LTLIBRARIES = libmesh.la
+ libmesh_la_SOURCES = adfront2.cpp adfront3.cpp bisect.cpp boundarylayer.cpp \
+       clusters.cpp curvedelems.cpp delaunay.cpp delaunay2d.cpp            \
+@@ -30,8 +30,5 @@
+       topology.cpp triarls.cpp validate.cpp zrefine.cpp bcfunctions.cpp   \
+       parallelmesh.cpp  paralleltop.cpp  paralleltop.hpp basegeom.cpp 
+-libmesh_la_LIBADD =  $(top_builddir)/libsrc/linalg/libla.la \
+-      $(top_builddir)/libsrc/gprim/libgprim.la \
+-      $(top_builddir)/libsrc/general/libgen.la \
+-      -lz
++libmesh_la_LIBADD = -lz
+diff -Naur netgen-5.3.1_orig/libsrc/occ/Makefile.am netgen-5.3.1_new/libsrc/occ/Makefile.am
+--- netgen-5.3.1_orig/libsrc/occ/Makefile.am   2014-08-29 13:54:03.000000000 +0400
++++ netgen-5.3.1_new/libsrc/occ/Makefile.am    2016-11-08 17:30:53.000000000 +0300
+@@ -14,10 +14,10 @@
+ METASOURCES = AUTO
+-lib_LTLIBRARIES = libocc.la
++noinst_LTLIBRARIES = libocc.la
+ if NGGUI
+-lib_LTLIBRARIES += liboccvis.la 
++lib_LTLIBRARIES = liboccvis.la 
+ endif
+diff -Naur netgen-5.3.1_orig/libsrc/stlgeom/Makefile.am netgen-5.3.1_new/libsrc/stlgeom/Makefile.am
+--- netgen-5.3.1_orig/libsrc/stlgeom/Makefile.am       2014-08-29 13:54:05.000000000 +0400
++++ netgen-5.3.1_new/libsrc/stlgeom/Makefile.am        2016-11-08 18:28:09.000000000 +0300
+@@ -4,10 +4,10 @@
+ AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include $(TCL_INCLUDES)
+ METASOURCES = AUTO
+-lib_LTLIBRARIES = libstl.la 
++noinst_LTLIBRARIES = libstl.la 
+ if NGGUI
+-lib_LTLIBRARIES += libstlvis.la 
++lib_LTLIBRARIES = libstlvis.la 
+ endif
+ libstl_la_SOURCES = meshstlsurface.cpp stlgeom.cpp stlgeomchart.cpp \
+@@ -16,6 +16,5 @@
+ libstlvis_la_SOURCES = stlpkg.cpp vsstl.cpp
+ libstlvis_la_LIBADD = libstl.la
+-libstl_la_LIBADD =  $(top_builddir)/libsrc/meshing/libmesh.la
+ # libstlvis_la_LIBADD = libstl.la $(top_builddir)/libsrc/linalg/libla.la 
+diff -Naur netgen-5.3.1_orig/nglib/Makefile.am netgen-5.3.1_new/nglib/Makefile.am
+--- netgen-5.3.1_orig/nglib/Makefile.am        2014-08-29 13:54:00.000000000 +0400
++++ netgen-5.3.1_new/nglib/Makefile.am 2016-11-08 19:01:17.000000000 +0300
+@@ -14,6 +14,9 @@
+       $(top_builddir)/libsrc/stlgeom/libstl.la \
+       $(top_builddir)/libsrc/occ/libocc.la \
+       $(top_builddir)/libsrc/meshing/libmesh.la \
++      $(top_builddir)/libsrc/general/libgen.la \
++      $(top_builddir)/libsrc/gprim/libgprim.la \
++      $(top_builddir)/libsrc/linalg/libla.la
+       $(OCCLIBS) $(MPI_LIBS)
+ libnglib_la_LDFLAGS = -avoid-version
diff --git a/config/patches/omniorb.001_omninotify_compilation.patch b/config/patches/omniorb.001_omninotify_compilation.patch
new file mode 100755 (executable)
index 0000000..6ee139f
--- /dev/null
@@ -0,0 +1,4584 @@
+diff -Naur --exclude=CVS omniNotify-2.1.orig/examples/all_cosnotify_clients.cc omniNotify-2.1.new/examples/all_cosnotify_clients.cc
+--- omniNotify-2.1.orig/examples/all_cosnotify_clients.cc      2003-10-23 08:39:11.000000000 +0400
++++ omniNotify-2.1.new/examples/all_cosnotify_clients.cc       2009-06-28 17:19:34.000000000 +0400
+@@ -41,7 +41,7 @@
+     num_con_events = 6 * num_events;
+     // (2) Obtain reference to notification channel
+-    if (verbose) cout << "Obtaining reference to notification channel" << endl;
++    if (verbose) std::cout << "Obtaining reference to notification channel" << std::endl;
+     CosNA::EventChannel_ptr channel = getchan_from_ns(orb, channel_name, verbose);
+     if (CORBA::is_nil(channel)) { // name service lookup failed
+       channel = getchan_from_iorfile(orb, ior_file, verbose);
+@@ -51,7 +51,7 @@
+     }
+     // (3) Create all 12 CosNotify-style clients
+-    if (verbose) cout << "Creating 12 clients" << endl;
++    if (verbose) std::cout << "Creating 12 clients" << std::endl;
+     // (3.1) any_push_consumer
+     PushConsumer_i* a_push_c =
+@@ -59,7 +59,7 @@
+                            "", "", sample_consume_any_fn, sample_offer_change_fn,
+                            &evs, constraint_expr, millisecs, delay_millisecs, verbose);
+     if (! a_push_c) {
+-      cerr << "Constructing any_push_consumer failed" << endl;
++      std::cerr << "Constructing any_push_consumer failed" << std::endl;
+       goto error_return; // failed to create a client
+     }
+     CosNotifyComm::PushConsumer_var my_a_push_c = a_push_c->_this();
+@@ -71,7 +71,7 @@
+                                      "", "", sample_consume_structured_fn, sample_offer_change_fn,
+                                      &evs, constraint_expr, millisecs, delay_millisecs, verbose);
+     if (! s_push_c) {
+-      cerr << "Constructing struct_push_consumer failed" << endl;
++      std::cerr << "Constructing struct_push_consumer failed" << std::endl;
+       goto error_return; // failed to create a client
+     }
+     CosNotifyComm::StructuredPushConsumer_var my_s_push_c = s_push_c->_this();
+@@ -83,7 +83,7 @@
+                                    "", "", sample_consume_batch_fn, sample_offer_change_fn,
+                                    &evs, constraint_expr, millisecs, delay_millisecs, verbose);
+     if (! b_push_c) {
+-      cerr << "Constructing batch_push_consumer failed" << endl;
++      std::cerr << "Constructing batch_push_consumer failed" << std::endl;
+       goto error_return; // failed to create a client
+     }
+     CosNotifyComm::SequencePushConsumer_var my_b_push_c = b_push_c->_this();
+@@ -95,7 +95,7 @@
+                            "", "", sample_consume_any_fn, sample_offer_change_fn,
+                            &evs, constraint_expr, millisecs, delay_millisecs, verbose);
+     if (! a_pull_c) {
+-      cerr << "Constructing any_pull_consumer failed" << endl;
++      std::cerr << "Constructing any_pull_consumer failed" << std::endl;
+       goto error_return; // failed to create a client
+     }
+     CosNotifyComm::PullConsumer_var my_a_pull_c = a_pull_c->_this();
+@@ -107,7 +107,7 @@
+                                      "", "", sample_consume_structured_fn, sample_offer_change_fn,
+                                      &evs, constraint_expr, millisecs, delay_millisecs, verbose);
+     if (! s_pull_c) {
+-      cerr << "Constructing struct_pull_consumer failed" << endl;
++      std::cerr << "Constructing struct_pull_consumer failed" << std::endl;
+       goto error_return; // failed to create a client
+     }
+     CosNotifyComm::StructuredPullConsumer_var my_s_pull_c = s_pull_c->_this();
+@@ -119,7 +119,7 @@
+                                    "", "", sample_consume_batch_fn, sample_offer_change_fn,
+                                    &evs, constraint_expr, millisecs, delay_millisecs, verbose);
+     if (! b_pull_c) {
+-      cerr << "Constructing batch_pull_consumer failed" << endl;
++      std::cerr << "Constructing batch_pull_consumer failed" << std::endl;
+       goto error_return; // failed to create a client
+     }
+     CosNotifyComm::SequencePullConsumer_var my_b_pull_c = b_pull_c->_this();
+@@ -131,7 +131,7 @@
+                            "", "", sample_supply_any_fn, sample_subscription_change_fn,
+                            &evs, constraint_expr, millisecs, delay_millisecs, verbose);
+     if (! a_push_s) {
+-      cerr << "Constructing any_push_supplier failed" << endl;
++      std::cerr << "Constructing any_push_supplier failed" << std::endl;
+       goto error_return; // failed to create a client
+     }
+     CosNotifyComm::PushSupplier_var my_a_push_s = a_push_s->_this();
+@@ -143,7 +143,7 @@
+                                      "", "", sample_supply_structured_fn, sample_subscription_change_fn,
+                                      &evs, constraint_expr, millisecs, delay_millisecs, verbose);
+     if (! s_push_s) {
+-      cerr << "Constructing struct_push_supplier failed" << endl;
++      std::cerr << "Constructing struct_push_supplier failed" << std::endl;
+       goto error_return; // failed to create a client
+     }
+     CosNotifyComm::StructuredPushSupplier_var my_s_push_s = s_push_s->_this();
+@@ -155,7 +155,7 @@
+                                    "", "", sample_supply_batch_fn, sample_subscription_change_fn,
+                                    &evs, constraint_expr, millisecs, delay_millisecs, verbose);
+     if (! b_push_s) {
+-      cerr << "Constructing batch_push_supplier failed" << endl;
++      std::cerr << "Constructing batch_push_supplier failed" << std::endl;
+       goto error_return; // failed to create a client
+     }
+     CosNotifyComm::SequencePushSupplier_var my_b_push_s = b_push_s->_this();
+@@ -167,7 +167,7 @@
+                            "", "", sample_supply_any_fn, sample_subscription_change_fn,
+                            &evs, constraint_expr, millisecs, delay_millisecs, verbose);
+     if (! a_pull_s) {
+-      cerr << "Constructing any_pull_supplier failed" << endl;
++      std::cerr << "Constructing any_pull_supplier failed" << std::endl;
+       goto error_return; // failed to create a client
+     }
+     CosNotifyComm::PullSupplier_var my_a_pull_s = a_pull_s->_this();
+@@ -179,7 +179,7 @@
+                                      "", "", sample_supply_structured_fn, sample_subscription_change_fn,
+                                      &evs, constraint_expr, millisecs, delay_millisecs, verbose);
+     if (! s_pull_s) {
+-      cerr << "Constructing struct_pull_supplier failed" << endl;
++      std::cerr << "Constructing struct_pull_supplier failed" << std::endl;
+       goto error_return; // failed to create a client
+     }
+     CosNotifyComm::StructuredPullSupplier_var my_s_pull_s = s_pull_s->_this();
+@@ -191,75 +191,75 @@
+                                    "", "", sample_supply_batch_fn, sample_subscription_change_fn,
+                                    &evs, constraint_expr, millisecs, delay_millisecs, verbose);
+     if (! b_pull_s) {
+-      cerr << "Constructing batch_pull_supplier failed" << endl;
++      std::cerr << "Constructing batch_pull_supplier failed" << std::endl;
+       goto error_return; // failed to create a client
+     }
+     CosNotifyComm::SequencePullSupplier_var my_b_pull_s = b_pull_s->_this();
+     b_pull_s->_remove_ref(); // enables POA cleanup of servant
+     // (4) Tell POA we are ready to go
+-    if (verbose) cout << "Activating POA manager" << endl;
++    if (verbose) std::cout << "Activating POA manager" << std::endl;
+     PortableServer::POAManager_var pman = poa->the_POAManager();
+     pman->activate();
+     // (5) Connect clients to their proxies -- consumers first
+-    if (verbose) cout << "Connecting consumer clients to proxies" << endl;
++    if (verbose) std::cout << "Connecting consumer clients to proxies" << std::endl;
+     if (a_push_c->connect()) {
+-      cerr << "Connecting any_push_consumer failed" << endl;
++      std::cerr << "Connecting any_push_consumer failed" << std::endl;
+       goto error_return;
+     }
+     if (s_push_c->connect()) {
+-      cerr << "Connecting struct_push_consumer failed" << endl;
++      std::cerr << "Connecting struct_push_consumer failed" << std::endl;
+       goto error_return;
+     }
+     if (b_push_c->connect()) {
+-      cerr << "Connecting batch_push_consumer failed" << endl;
++      std::cerr << "Connecting batch_push_consumer failed" << std::endl;
+       goto error_return;
+     }
+     if (a_pull_c->connect()) {
+-      cerr << "Connecting any_pull_consumer failed" << endl;
++      std::cerr << "Connecting any_pull_consumer failed" << std::endl;
+       goto error_return;
+     }
+     if (s_pull_c->connect()) {
+-      cerr << "Connecting struct_pull_consumer failed" << endl;
++      std::cerr << "Connecting struct_pull_consumer failed" << std::endl;
+       goto error_return;
+     }
+     if (b_pull_c->connect()) {
+-      cerr << "Connecting batch_pull_consumer failed" << endl;
++      std::cerr << "Connecting batch_pull_consumer failed" << std::endl;
+       goto error_return;
+     }
+-    if (verbose) cout << "Connecting supplier clients to proxies" << endl;
++    if (verbose) std::cout << "Connecting supplier clients to proxies" << std::endl;
+     if (a_push_s->connect()) {
+-      cerr << "Connecting any_push_supplier failed" << endl;
++      std::cerr << "Connecting any_push_supplier failed" << std::endl;
+       goto error_return;
+     }
+     if (s_push_s->connect()) {
+-      cerr << "Connecting struct_push_supplier failed" << endl;
++      std::cerr << "Connecting struct_push_supplier failed" << std::endl;
+       goto error_return;
+     }
+     if (b_push_s->connect()) {
+-      cerr << "Connecting batch_push_supplier failed" << endl;
++      std::cerr << "Connecting batch_push_supplier failed" << std::endl;
+       goto error_return;
+     }
+     if (a_pull_s->connect()) {
+-      cerr << "Connecting any_pull_supplier failed" << endl;
++      std::cerr << "Connecting any_pull_supplier failed" << std::endl;
+       goto error_return;
+     }
+     if (s_pull_s->connect()) {
+-      cerr << "Connecting struct_pull_supplier failed" << endl;
++      std::cerr << "Connecting struct_pull_supplier failed" << std::endl;
+       goto error_return;
+     }
+     if (b_pull_s->connect()) {
+-      cerr << "Connecting batch_pull_supplier failed" << endl;
++      std::cerr << "Connecting batch_pull_supplier failed" << std::endl;
+       goto error_return;
+     }
+-    if (verbose) cout << "Waiting for all 12 clients to finish" << endl;
++    if (verbose) std::cout << "Waiting for all 12 clients to finish" << std::endl;
+     CORBA::Boolean a_push_c_err = a_push_c->wait_done();
+     CORBA::Boolean s_push_c_err = s_push_c->wait_done();
+     CORBA::Boolean b_push_c_err = b_push_c->wait_done();
+@@ -291,10 +291,10 @@
+       b_pull_s_err;
+     if (com_err && (num_events > 0)) {
+-      if (verbose) cout << "Communication error -- probably did not process desired # of events" << endl;
++      if (verbose) std::cout << "Communication error -- probably did not process desired # of events" << std::endl;
+     }
+-    if (verbose) cout << "Cleaning up" << endl;
++    if (verbose) std::cout << "Cleaning up" << std::endl;
+     if (!a_push_c_err) { a_push_c->cleanup(); }
+     if (!s_push_c_err) { s_push_c->cleanup(); }
+@@ -315,25 +315,25 @@
+     goto normal_return;
+   }
+   catch(CORBA::SystemException&) {                     
+-    cerr << "main caught CORBA::SystemException." << endl;  
++    std::cerr << "main caught CORBA::SystemException." << std::endl;  
+   }                                                    
+   catch(CORBA::Exception&) {                           
+-    cerr << "main caught CORBA::Exception." << endl;        
++    std::cerr << "main caught CORBA::Exception." << std::endl;        
+   }                                                    
+ #if defined(__OMNIORB3__) || defined(__OMNIORB4__)
+   catch(omniORB::fatalException& fe) {                 
+-    cerr << "main caught omniORB::fatalException:" << endl; 
+-    cerr << "  file: " << fe.file() << endl;           
+-    cerr << "  line: " << fe.line() << endl;           
+-    cerr << "  mesg: " << fe.errmsg() << endl;         
++    std::cerr << "main caught omniORB::fatalException:" << std::endl; 
++    std::cerr << "  file: " << fe.file() << std::endl;           
++    std::cerr << "  line: " << fe.line() << std::endl;           
++    std::cerr << "  mesg: " << fe.errmsg() << std::endl;         
+   }                                                    
+ #endif
+   catch(...) {                                         
+     // nameclt comment says it is a bad idea to report an error here 
+   }
+-  cerr << "main caught an exception." << endl;       
++  std::cerr << "main caught an exception." << std::endl;       
+  error_return:
+-  cerr << "QUITTING due to error" << endl;
++  std::cerr << "QUITTING due to error" << std::endl;
+   // orb->destroy();
+   return -1;
+  normal_return:
+diff -Naur --exclude=CVS omniNotify-2.1.orig/examples/demo_add_filter.cc omniNotify-2.1.new/examples/demo_add_filter.cc
+--- omniNotify-2.1.orig/examples/demo_add_filter.cc    2003-10-12 22:51:18.000000000 +0400
++++ omniNotify-2.1.new/examples/demo_add_filter.cc     2009-06-28 17:20:35.000000000 +0400
+@@ -1,5 +1,5 @@
+ #include <stdlib.h>
+-#include <iostream.h>
++#include <iostream>
+ #include <stdio.h>
+ #include "CosNotifyShorthands.h"
+@@ -25,14 +25,14 @@
+                                CORBA::Boolean verbose);
+ void usage(char* pname) {
+-  cerr << "Usage: " << pname << " [-n name] [-f file] -p file" << endl << endl;
+-  cout << "  -n name  : channel name" << endl;
+-  cout << "               => use event service to lookup this name" << endl;
+-  cout << "  -f file  : file containing channel IOR" << endl;
+-  cout << "               => use string_to_object on the IOR" << endl;
+-  cout << "  -p file  : file with stringified IOR of proxy to be" << endl;
+-  cout << "               sent add_filter messages (REQUIRED)" << endl;
+-  cout << "(The channel is needed to obtain its default filter factory)" << endl;
++  std::cerr << "Usage: " << pname << " [-n name] [-f file] -p file" << std::endl << std::endl;
++  std::cout << "  -n name  : channel name" << std::endl;
++  std::cout << "               => use event service to lookup this name" << std::endl;
++  std::cout << "  -f file  : file containing channel IOR" << std::endl;
++  std::cout << "               => use string_to_object on the IOR" << std::endl;
++  std::cout << "  -p file  : file with stringified IOR of proxy to be" << std::endl;
++  std::cout << "               sent add_filter messages (REQUIRED)" << std::endl;
++  std::cout << "(The channel is needed to obtain its default filter factory)" << std::endl;
+ }
+@@ -84,11 +84,11 @@
+     char buf[8096];
+     FILE* ifile;
+     if (! (ifile = fopen(proxy_ior_file, "r")) ) {
+-      cerr << "Failed to open file " << proxy_ior_file << " for reading" << endl;
++      std::cerr << "Failed to open file " << proxy_ior_file << " for reading" << std::endl;
+       goto cleanup;
+     }
+     if (fscanf(ifile, "%s", buf) != 1) {
+-      cerr << "Failed to get an IOR from file " << proxy_ior_file << endl;
++      std::cerr << "Failed to get an IOR from file " << proxy_ior_file << std::endl;
+       fclose(ifile);
+       goto cleanup;
+     }
+@@ -97,32 +97,32 @@
+     try {
+       CORBA::Object_var proxy_ref = orb->string_to_object(buf);
+       if ( CORBA::is_nil(proxy_ref) ) {
+-      cerr << "Failed to turn IOR in file " << proxy_ior_file << " into object" << endl;
++      std::cerr << "Failed to turn IOR in file " << proxy_ior_file << " into object" << std::endl;
+       goto cleanup;
+       }
+       proxy = CosNF::FilterAdmin::_narrow(proxy_ref);
+       if ( CORBA::is_nil(proxy) ) {
+-      cerr << "Failed to narrow object from IOR in file " << proxy_ior_file << endl;
++      std::cerr << "Failed to narrow object from IOR in file " << proxy_ior_file << std::endl;
+       goto cleanup;
+       }
+     } catch (...) {
+-      cerr << "Failed to convert to object from IOR in file " << proxy_ior_file << endl;
++      std::cerr << "Failed to convert to object from IOR in file " << proxy_ior_file << std::endl;
+       goto cleanup;
+     }
+     CosNF::Filter_ptr filter = CosNF::Filter::_nil();
+     while (1) {
+-      cout << endl << "Enter a constraint ('exit' to quit, 'remove' to remove all filters): " << endl <<  flush;
++      std::cout << std::endl << "Enter a constraint ('exit' to quit, 'remove' to remove all filters): " << std::endl <<  std::flush;
+       if (!(fgets(buf, 8090, stdin))) break;
+       if (strlen(buf) < 2) continue; // skip empty lines
+       buf[strlen(buf)-1] = '\0'; // strip newline from end
+       if (strcmp(buf, "exit") == 0) {
+       break;
+       }
+-      cout << "Calling remove_all_filters on the proxy" << endl;
++      std::cout << "Calling remove_all_filters on the proxy" << std::endl;
+       proxy->remove_all_filters();
+       if (!CORBA::is_nil(filter)) {
+-      cout << "Destroying the previous filter, which is no longer in use" << endl;
++      std::cout << "Destroying the previous filter, which is no longer in use" << std::endl;
+       filter->destroy();
+       filter = CosNF::Filter::_nil();
+       }
+@@ -134,27 +134,27 @@
+       evs.length(0);
+       sample_add_filter(channel, proxy, evs, buf, "demo_add_filter", filter, 1);
+       }
+-      cout << endl << "---------------------------------------------------------" << endl;
++      std::cout << std::endl << "---------------------------------------------------------" << std::endl;
+     }
+     orb->destroy();
+     return 0; // success
+   }
+   catch(CORBA::SystemException&) {                     
+-    cerr << "Caught CORBA::SystemException." << endl;  
++    std::cerr << "Caught CORBA::SystemException." << std::endl;  
+   }                                                    
+   catch(CORBA::Exception&) {                           
+-    cerr << "Caught CORBA::Exception." << endl;        
++    std::cerr << "Caught CORBA::Exception." << std::endl;        
+   }                                                    
+ #if defined(__OMNIORB3__) || defined(__OMNIORB4__)
+   catch(omniORB::fatalException& fe) {                 
+-    cerr << "Caught omniORB::fatalException:" << endl; 
+-    cerr << "  file: " << fe.file() << endl;           
+-    cerr << "  line: " << fe.line() << endl;           
+-    cerr << "  mesg: " << fe.errmsg() << endl;         
++    std::cerr << "Caught omniORB::fatalException:" << std::endl; 
++    std::cerr << "  file: " << fe.file() << std::endl;           
++    std::cerr << "  line: " << fe.line() << std::endl;           
++    std::cerr << "  mesg: " << fe.errmsg() << std::endl;         
+   }                                                    
+ #endif
+   catch(...) {                                         
+-    cerr << "Caught unknown exception." << endl;       
++    std::cerr << "Caught unknown exception." << std::endl;       
+   }
+  cleanup:
+   orb->destroy();
+diff -Naur --exclude=CVS omniNotify-2.1.orig/examples/demo_offer_change.cc omniNotify-2.1.new/examples/demo_offer_change.cc
+--- omniNotify-2.1.orig/examples/demo_offer_change.cc  2003-10-12 22:51:18.000000000 +0400
++++ omniNotify-2.1.new/examples/demo_offer_change.cc   2009-06-28 17:21:48.000000000 +0400
+@@ -1,5 +1,5 @@
+ #include <stdlib.h>
+-#include <iostream.h>
++#include <iostream>
+ #include <stdio.h>
+ #include "CosNotifyShorthands.h"
+@@ -58,9 +58,9 @@
+ }
+ void usage(char* pname) {
+-  cerr << "Usage: " << pname << " -p file" << endl << endl;
+-  cout << "  -p file  : file with stringified IOR of proxy to be" << endl;
+-  cout << "               sent offer_change messages (REQUIRED)" << endl;
++  std::cerr << "Usage: " << pname << " -p file" << std::endl << std::endl;
++  std::cout << "  -p file  : file with stringified IOR of proxy to be" << std::endl;
++  std::cout << "               sent offer_change messages (REQUIRED)" << std::endl;
+ }
+ int main(int argc, char** argv)
+@@ -96,11 +96,11 @@
+     char buf2[8096];
+     FILE* ifile;
+     if (! (ifile = fopen(proxy_ior_file, "r")) ) {
+-      cerr << "Failed to open file " << proxy_ior_file << " for reading" << endl;
++      std::cerr << "Failed to open file " << proxy_ior_file << " for reading" << std::endl;
+       goto cleanup;
+     }
+     if (fscanf(ifile, "%s", buf) != 1) {
+-      cerr << "Failed to get an IOR from file " << proxy_ior_file << endl;
++      std::cerr << "Failed to get an IOR from file " << proxy_ior_file << std::endl;
+       fclose(ifile);
+       goto cleanup;
+     }
+@@ -109,69 +109,69 @@
+     try {
+       CORBA::Object_var proxy_ref = orb->string_to_object(buf);
+       if ( CORBA::is_nil(proxy_ref) ) {
+-      cerr << "Failed to turn IOR in file " << proxy_ior_file << " into object" << endl;
++      std::cerr << "Failed to turn IOR in file " << proxy_ior_file << " into object" << std::endl;
+       goto cleanup;
+       }
+       proxy = CosNC::NotifyPublish::_narrow(proxy_ref);
+       if ( CORBA::is_nil(proxy) ) {
+-      cerr << "Failed to narrow object from IOR in file " << proxy_ior_file << endl;
++      std::cerr << "Failed to narrow object from IOR in file " << proxy_ior_file << std::endl;
+       goto cleanup;
+       }
+     } catch (...) {
+-      cerr << "Failed to convert to object from IOR in file " << proxy_ior_file << endl;
++      std::cerr << "Failed to convert to object from IOR in file " << proxy_ior_file << std::endl;
+       goto cleanup;
+     }
+     while (1) {
+       added.length(0);
+       deled.length(0);
+-      cout << endl << "Enter list of removals (or empty for none): " << endl <<  flush;
++      std::cout << std::endl << "Enter list of removals (or empty for none): " << std::endl <<  std::flush;
+       if (!(fgets(buf, 8090, stdin))) break;
+       if (strlen(buf) < 1) break;
+       buf[strlen(buf)-1] = '\0'; // strip newline from end
+       if (strcmp(buf, "exit") == 0) break;
+       if (strlen(buf)) {
+       if (parse_etype_list(buf, deled)) {
+-        cerr << "Failed to parse the input as an event type list" << endl;
++        std::cerr << "Failed to parse the input as an event type list" << std::endl;
+         continue;
+       }
+       }
+-      cout << endl << "Enter list of additions (or empty for none): " << endl <<  flush;
++      std::cout << std::endl << "Enter list of additions (or empty for none): " << std::endl <<  std::flush;
+       if (!(fgets(buf2, 8090, stdin))) break;
+       if (strlen(buf2) < 1) break;
+       buf2[strlen(buf2)-1] = '\0'; // strip newline from end
+       if (strcmp(buf2, "exit") == 0) break;
+       if (strlen(buf2)) {
+       if (parse_etype_list(buf2, added)) {
+-        cerr << "Failed to parse the input as an event type list" << endl;
++        std::cerr << "Failed to parse the input as an event type list" << std::endl;
+         continue;
+       }
+       }
+-      cout << "Calling offer_change on the proxy" << endl;
++      std::cout << "Calling offer_change on the proxy" << std::endl;
+       proxy->offer_change(added, deled);
+-      cout << endl << "---------------------------------------------------------" << endl;
++      std::cout << std::endl << "---------------------------------------------------------" << std::endl;
+     }
+     orb->destroy();
+     return 0; // success
+   }
+   catch(CORBA::SystemException&) {                     
+-    cerr << "Caught CORBA::SystemException." << endl;  
++    std::cerr << "Caught CORBA::SystemException." << std::endl;  
+   }                                                    
+   catch(CORBA::Exception&) {                           
+-    cerr << "Caught CORBA::Exception." << endl;        
++    std::cerr << "Caught CORBA::Exception." << std::endl;        
+   }                                                    
+ #if defined(__OMNIORB3__) || defined(__OMNIORB4__)
+   catch(omniORB::fatalException& fe) {                 
+-    cerr << "Caught omniORB::fatalException:" << endl; 
+-    cerr << "  file: " << fe.file() << endl;           
+-    cerr << "  line: " << fe.line() << endl;           
+-    cerr << "  mesg: " << fe.errmsg() << endl;         
++    std::cerr << "Caught omniORB::fatalException:" << std::endl; 
++    std::cerr << "  file: " << fe.file() << std::endl;           
++    std::cerr << "  line: " << fe.line() << std::endl;           
++    std::cerr << "  mesg: " << fe.errmsg() << std::endl;         
+   }                                                    
+ #endif
+   catch(...) {                                         
+-    cerr << "Caught unknown exception." << endl;       
++    std::cerr << "Caught unknown exception." << std::endl;       
+   }
+  cleanup:
+   orb->destroy();
+diff -Naur --exclude=CVS omniNotify-2.1.orig/examples/demo_subscription_change.cc omniNotify-2.1.new/examples/demo_subscription_change.cc
+--- omniNotify-2.1.orig/examples/demo_subscription_change.cc   2003-10-12 22:51:18.000000000 +0400
++++ omniNotify-2.1.new/examples/demo_subscription_change.cc    2009-06-28 17:23:49.000000000 +0400
+@@ -1,5 +1,5 @@
+ #include <stdlib.h>
+-#include <iostream.h>
++#include <iostream>
+ #include <stdio.h>
+ #include "CosNotifyShorthands.h"
+@@ -58,9 +58,9 @@
+ }
+ void usage(char* pname) {
+-  cerr << "Usage: " << pname << " -p file" << endl << endl;
+-  cout << "  -p file  : file with stringified IOR of proxy to be" << endl;
+-  cout << "               sent subscription_change messages (REQUIRED)" << endl;
++  std::cerr << "Usage: " << pname << " -p file" << std::endl << std::endl;
++  std::cout << "  -p file  : file with stringified IOR of proxy to be" << std::endl;
++  std::cout << "               sent subscription_change messages (REQUIRED)" << std::endl;
+ }
+ int main(int argc, char** argv)
+@@ -96,11 +96,11 @@
+     char buf2[8096];
+     FILE* ifile;
+     if (! (ifile = fopen(proxy_ior_file, "r")) ) {
+-      cerr << "Failed to open file " << proxy_ior_file << " for reading" << endl;
++      std::cerr << "Failed to open file " << proxy_ior_file << " for reading" << std::endl;
+       goto cleanup;
+     }
+     if (fscanf(ifile, "%s", buf) != 1) {
+-      cerr << "Failed to get an IOR from file " << proxy_ior_file << endl;
++      std::cerr << "Failed to get an IOR from file " << proxy_ior_file << std::endl;
+       fclose(ifile);
+       goto cleanup;
+     }
+@@ -109,69 +109,69 @@
+     try {
+       CORBA::Object_var proxy_ref = orb->string_to_object(buf);
+       if ( CORBA::is_nil(proxy_ref) ) {
+-      cerr << "Failed to turn IOR in file " << proxy_ior_file << " into object" << endl;
++      std::cerr << "Failed to turn IOR in file " << proxy_ior_file << " into object" << std::endl;
+       goto cleanup;
+       }
+       proxy = CosNC::NotifySubscribe::_narrow(proxy_ref);
+       if ( CORBA::is_nil(proxy) ) {
+-      cerr << "Failed to narrow object from IOR in file " << proxy_ior_file << endl;
++      std::cerr << "Failed to narrow object from IOR in file " << proxy_ior_file << std::endl;
+       goto cleanup;
+       }
+     } catch (...) {
+-      cerr << "Failed to convert to object from IOR in file " << proxy_ior_file << endl;
++      std::cerr << "Failed to convert to object from IOR in file " << proxy_ior_file << std::endl;
+       goto cleanup;
+     }
+     while (1) {
+       added.length(0);
+       deled.length(0);
+-      cout << endl << "Enter list of removals (or empty for none): " << endl <<  flush;
++      std::cout << std::endl << "Enter list of removals (or empty for none): " << std::endl <<  std::flush;
+       if (!(fgets(buf, 8090, stdin))) break;
+       if (strlen(buf) < 1) break;
+       buf[strlen(buf)-1] = '\0'; // strip newline from end
+       if (strcmp(buf, "exit") == 0) break;
+       if (strlen(buf)) {
+       if (parse_etype_list(buf, deled)) {
+-        cerr << "Failed to parse the input as an event type list" << endl;
++        std::cerr << "Failed to parse the input as an event type list" << std::endl;
+         continue;
+       }
+       }
+-      cout << endl << "Enter list of additions (or empty for none): " << endl <<  flush;
++      std::cout << std::endl << "Enter list of additions (or empty for none): " << std::endl <<  std::flush;
+       if (!(fgets(buf2, 8090, stdin))) break;
+       if (strlen(buf2) < 1) break;
+       buf2[strlen(buf2)-1] = '\0'; // strip newline from end
+       if (strcmp(buf2, "exit") == 0) break;
+       if (strlen(buf2)) {
+       if (parse_etype_list(buf2, added)) {
+-        cerr << "Failed to parse the input as an event type list" << endl;
++        std::cerr << "Failed to parse the input as an event type list" << std::endl;
+         continue;
+       }
+       }
+-      cout << "Calling subscription_change on the proxy" << endl;
++      std::cout << "Calling subscription_change on the proxy" << std::endl;
+       proxy->subscription_change(added, deled);
+-      cout << endl << "---------------------------------------------------------" << endl;
++      std::cout << std::endl << "---------------------------------------------------------" << std::endl;
+     }
+     orb->destroy();
+     return 0; // success
+   }
+   catch(CORBA::SystemException&) {                     
+-    cerr << "Caught CORBA::SystemException." << endl;  
++    std::cerr << "Caught CORBA::SystemException." << std::endl;  
+   }                                                    
+   catch(CORBA::Exception&) {                           
+-    cerr << "Caught CORBA::Exception." << endl;        
++    std::cerr << "Caught CORBA::Exception." << std::endl;        
+   }                                                    
+ #if defined(__OMNIORB3__) || defined(__OMNIORB4__)
+   catch(omniORB::fatalException& fe) {                 
+-    cerr << "Caught omniORB::fatalException:" << endl; 
+-    cerr << "  file: " << fe.file() << endl;           
+-    cerr << "  line: " << fe.line() << endl;           
+-    cerr << "  mesg: " << fe.errmsg() << endl;         
++    std::cerr << "Caught omniORB::fatalException:" << std::endl; 
++    std::cerr << "  file: " << fe.file() << std::endl;           
++    std::cerr << "  line: " << fe.line() << std::endl;           
++    std::cerr << "  mesg: " << fe.errmsg() << std::endl;         
+   }                                                    
+ #endif
+   catch(...) {                                         
+-    cerr << "Caught unknown exception." << endl;       
++    std::cerr << "Caught unknown exception." << std::endl;       
+   }
+  cleanup:
+   orb->destroy();
+diff -Naur --exclude=CVS omniNotify-2.1.orig/examples/get_channel.h omniNotify-2.1.new/examples/get_channel.h
+--- omniNotify-2.1.orig/examples/get_channel.h 2003-10-23 08:39:11.000000000 +0400
++++ omniNotify-2.1.new/examples/get_channel.h  2009-06-28 17:10:29.000000000 +0400
+@@ -19,11 +19,11 @@
+   CosNA::EventChannel_ptr channel = CosNA::EventChannel::_nil();
+   if (!ior_file || strlen(ior_file) == 0) return channel; // empty string -- ignore
+   if (! (ifile = fopen(ior_file, "r")) ) {
+-    cerr << "Failed to open file " << ior_file << " for reading" << endl;
++    std::cerr << "Failed to open file " << ior_file << " for reading" << std::endl;
+     return channel; // failure
+   }
+   if (fscanf(ifile, "%s", buf) != 1) {
+-    cerr << "Failed to get an IOR from file " << ior_file << endl;
++    std::cerr << "Failed to get an IOR from file " << ior_file << std::endl;
+     fclose(ifile);
+     return channel; // failure
+   }
+@@ -31,21 +31,21 @@
+   try {
+     CORBA::Object_var channel_ref = orb->string_to_object(buf);
+     if ( CORBA::is_nil(channel_ref) ) {
+-      cerr << "Failed to turn IOR in file " << ior_file << " into object" << endl;
++      std::cerr << "Failed to turn IOR in file " << ior_file << " into object" << std::endl;
+       return channel; // failure
+     }
+     channel = CosNA::EventChannel::_narrow(channel_ref);
+     if ( CORBA::is_nil(channel) ) {
+-      cerr << "Failed to narrow object from IOR in file " << ior_file <<
+-      " to type CosNotifyChannelAdmin::EventChannel" << endl;
++      std::cerr << "Failed to narrow object from IOR in file " << ior_file <<
++      " to type CosNotifyChannelAdmin::EventChannel" << std::endl;
+       return channel; // failure
+     }
+   } catch (...) {
+-    cerr << "Failed to convert IOR in file " << ior_file << " to object" << endl;
++    std::cerr << "Failed to convert IOR in file " << ior_file << " to object" << std::endl;
+     return channel; // failure
+   }
+   if (verbose)
+-    cout << "Found valid channel reference" << endl;
++    std::cout << "Found valid channel reference" << std::endl;
+   return channel; // success
+ }
+@@ -59,29 +59,29 @@
+   if (!channel_name || strlen(channel_name) == 0) return channel; // empty string -- ignore
+   if (verbose)
+-    cout << "Obtaining naming service reference" << endl;
++    std::cout << "Obtaining naming service reference" << std::endl;
+   try {
+     CORBA::Object_var name_service;
+     name_service = orb->resolve_initial_references("NameService"); 
+     name_context = CosNaming::NamingContext::_narrow(name_service);
+     if ( CORBA::is_nil(name_context) ) {
+-      cerr << "Failed to obtain context for NameService" << endl;
++      std::cerr << "Failed to obtain context for NameService" << std::endl;
+       return channel; // failure
+     } 
+   }
+   catch(CORBA::ORB::InvalidName& ex) {
+-    cerr << "Service required is invalid [does not exist]" << endl;
++    std::cerr << "Service required is invalid [does not exist]" << std::endl;
+     return channel; // failure
+   } catch (CORBA::COMM_FAILURE& ex) {
+-    cerr << "Caught system exception COMM_FAILURE" << endl;
++    std::cerr << "Caught system exception COMM_FAILURE" << std::endl;
+     return channel; // failure
+   } catch (...) {
+-    cerr << "Caught exception while resolving the naming service" << endl;
++    std::cerr << "Caught exception while resolving the naming service" << std::endl;
+     return channel; // failure
+   }
+   if (verbose)
+-    cout << "Looking up channel name " << channel_name << " . " << channel_name << endl;
++    std::cout << "Looking up channel name " << channel_name << " . " << channel_name << std::endl;
+   name.length(1);
+   name[0].id   = CORBA::string_dup((const char*)channel_name);
+@@ -91,23 +91,23 @@
+     CORBA::Object_var channel_ref = name_context->resolve(name);
+     channel = CosNA::EventChannel::_narrow(channel_ref);
+     if ( CORBA::is_nil(channel) ) {
+-      cerr << "Failed to narrow object found in naming service " <<
+-      " to type CosNotifyChannelAdmin::EventChannel" << endl;
++      std::cerr << "Failed to narrow object found in naming service " <<
++      " to type CosNotifyChannelAdmin::EventChannel" << std::endl;
+       return channel; // failure
+     }
+   }
+   catch(CORBA::ORB::InvalidName& ex) {
+-    cerr << "Invalid name" << endl;
++    std::cerr << "Invalid name" << std::endl;
+     return channel; // failure
+   } catch (CORBA::COMM_FAILURE& ex) {
+-    cerr << "Caught system exception COMM_FAILURE while resolving event channel name" << endl;
++    std::cerr << "Caught system exception COMM_FAILURE while resolving event channel name" << std::endl;
+     return channel; // failure
+   } catch (...) {
+-    cerr << "Caught exception while resolving event channel name" << endl;
++    std::cerr << "Caught exception while resolving event channel name" << std::endl;
+     return channel; // failure
+   }
+   if (verbose)
+-    cout << "Found valid channel reference" << endl;
++    std::cout << "Found valid channel reference" << std::endl;
+   return channel; // success
+ }
+@@ -121,30 +121,30 @@
+   CosNaming::Name name;
+   if (verbose)
+-    cout << "Obtaining naming service reference" << endl;
++    std::cout << "Obtaining naming service reference" << std::endl;
+   if (!factory_name || strlen(factory_name) == 0) return channel; // empty string -- ignore
+   try {
+     CORBA::Object_var name_service;
+     name_service = orb->resolve_initial_references("NameService"); 
+     name_context = CosNaming::NamingContext::_narrow(name_service);
+     if ( CORBA::is_nil(name_context) ) {
+-      cerr << "Failed to obtain context for NameService" << endl;
++      std::cerr << "Failed to obtain context for NameService" << std::endl;
+       return channel; // failure
+     } 
+   }
+   catch(CORBA::ORB::InvalidName& ex) {
+-    cerr << "Service required is invalid [does not exist]" << endl;
++    std::cerr << "Service required is invalid [does not exist]" << std::endl;
+     return channel; // failure
+   } catch (CORBA::COMM_FAILURE& ex) {
+-    cerr << "Caught system exception COMM_FAILURE" << endl;
++    std::cerr << "Caught system exception COMM_FAILURE" << std::endl;
+     return channel; // failure
+   } catch (...) {
+-    cerr << "Caught exception while resolving the naming service" << endl;
++    std::cerr << "Caught exception while resolving the naming service" << std::endl;
+     return channel; // failure
+   }
+   if (verbose)
+-    cout << "Looking up channel factory name " << factory_name << " . " << factory_name << endl;
++    std::cout << "Looking up channel factory name " << factory_name << " . " << factory_name << std::endl;
+   name.length(1);
+   name[0].id   = CORBA::string_dup((const char*)factory_name);
+@@ -154,41 +154,41 @@
+     CORBA::Object_var factory_ref = name_context->resolve(name);
+     factory = CosNA::EventChannelFactory::_narrow(factory_ref);
+     if ( CORBA::is_nil(factory) ) {
+-      cerr << "Failed to narrow object found in naming service " <<
+-      " to type CosNotifyChannelAdmin::EventChannelFactory" << endl;
++      std::cerr << "Failed to narrow object found in naming service " <<
++      " to type CosNotifyChannelAdmin::EventChannelFactory" << std::endl;
+       return channel; // failure
+     }
+   }
+   catch(CORBA::ORB::InvalidName& ex) {
+-    cerr << "Invalid name" << endl;
++    std::cerr << "Invalid name" << std::endl;
+     return channel; // failure
+   } catch (CORBA::COMM_FAILURE& ex) {
+-    cerr << "Caught system exception COMM_FAILURE while resolving event channel factory name" << endl;
++    std::cerr << "Caught system exception COMM_FAILURE while resolving event channel factory name" << std::endl;
+     return channel; // failure
+   } catch (...) {
+-    cerr << "Caught exception while resolving event channel factory name" << endl;
++    std::cerr << "Caught exception while resolving event channel factory name" << std::endl;
+     return channel; // failure
+   }
+   if (verbose) {
+-    cout << "Found valid channel factory reference" << endl;
+-    cout << "Looking up channel id " << chan_id << endl;
++    std::cout << "Found valid channel factory reference" << std::endl;
++    std::cout << "Looking up channel id " << chan_id << std::endl;
+   }
+   try {
+     channel = factory->get_event_channel( chan_id );
+     if ( CORBA::is_nil(channel) ) {
+-      cerr << "Failed to find channel id " << chan_id << endl;
++      std::cerr << "Failed to find channel id " << chan_id << std::endl;
+       return channel; // failure
+     }
+   } catch (CORBA::COMM_FAILURE& ex) {
+-    cerr << "Caught system exception COMM_FAILURE while invoking get_event_channel" << endl;
++    std::cerr << "Caught system exception COMM_FAILURE while invoking get_event_channel" << std::endl;
+     return channel; // failure
+   } catch (...) {
+-    cerr << "Caught exception while invoking get_event_channel" << endl;
++    std::cerr << "Caught exception while invoking get_event_channel" << std::endl;
+     return channel; // failure
+   }
+   if (verbose)
+-    cout << "Found valid channel reference" << endl;
++    std::cout << "Found valid channel reference" << std::endl;
+   return channel; // success
+ }
+@@ -201,30 +201,30 @@
+   CosNaming::Name name;
+   if (verbose)
+-    cout << "Obtaining naming service reference" << endl;
++    std::cout << "Obtaining naming service reference" << std::endl;
+   if (!factory_name || strlen(factory_name) == 0) return channel; // empty string -- ignore
+   try {
+     CORBA::Object_var name_service;
+     name_service = orb->resolve_initial_references("NameService"); 
+     name_context = CosNaming::NamingContext::_narrow(name_service);
+     if ( CORBA::is_nil(name_context) ) {
+-      cerr << "Failed to obtain context for NameService" << endl;
++      std::cerr << "Failed to obtain context for NameService" << std::endl;
+       return channel; // failure
+     } 
+   }
+   catch(CORBA::ORB::InvalidName& ex) {
+-    cerr << "Service required is invalid [does not exist]" << endl;
++    std::cerr << "Service required is invalid [does not exist]" << std::endl;
+     return channel; // failure
+   } catch (CORBA::COMM_FAILURE& ex) {
+-    cerr << "Caught system exception COMM_FAILURE" << endl;
++    std::cerr << "Caught system exception COMM_FAILURE" << std::endl;
+     return channel; // failure
+   } catch (...) {
+-    cerr << "Caught exception while resolving the naming service" << endl;
++    std::cerr << "Caught exception while resolving the naming service" << std::endl;
+     return channel; // failure
+   }
+   if (verbose)
+-    cout << "Looking up channel factory name " << factory_name << " . " << factory_name << endl;
++    std::cout << "Looking up channel factory name " << factory_name << " . " << factory_name << std::endl;
+   name.length(1);
+   name[0].id   = CORBA::string_dup((const char*)factory_name);
+@@ -234,24 +234,24 @@
+     CORBA::Object_var factory_ref = name_context->resolve(name);
+     factory = CosNA::EventChannelFactory::_narrow(factory_ref);
+     if ( CORBA::is_nil(factory) ) {
+-      cerr << "Failed to narrow object found in naming service " <<
+-      " to type CosNotifyChannelAdmin::EventChannelFactory" << endl;
++      std::cerr << "Failed to narrow object found in naming service " <<
++      " to type CosNotifyChannelAdmin::EventChannelFactory" << std::endl;
+       return channel; // failure
+     }
+   }
+   catch(CORBA::ORB::InvalidName& ex) {
+-    cerr << "Invalid name" << endl;
++    std::cerr << "Invalid name" << std::endl;
+     return channel; // failure
+   } catch (CORBA::COMM_FAILURE& ex) {
+-    cerr << "Caught system exception COMM_FAILURE while resolving event channel factory name" << endl;
++    std::cerr << "Caught system exception COMM_FAILURE while resolving event channel factory name" << std::endl;
+     return channel; // failure
+   } catch (...) {
+-    cerr << "Caught exception while resolving event channel factory name" << endl;
++    std::cerr << "Caught exception while resolving event channel factory name" << std::endl;
+     return channel; // failure
+   }
+   if (verbose) {
+-    cout << "Found valid channel factory reference" << endl;
+-    cout << "Creating new channel" << endl;
++    std::cout << "Found valid channel factory reference" << std::endl;
++    std::cout << "Creating new channel" << std::endl;
+   }
+   CosNA::ChannelID         chan_id;
+@@ -264,18 +264,18 @@
+     channel = factory->create_channel(qosP, admP, chan_id);
+     if ( CORBA::is_nil(channel) ) {
+-      cerr << "Failed to create new channel" << endl;
++      std::cerr << "Failed to create new channel" << std::endl;
+       return channel; // failure
+     }
+   } catch (CORBA::COMM_FAILURE& ex) {
+-    cerr << "Caught system exception COMM_FAILURE while invoking create_channel" << endl;
++    std::cerr << "Caught system exception COMM_FAILURE while invoking create_channel" << std::endl;
+     return channel; // failure
+   } catch (...) {
+-    cerr << "Caught exception while invoking create_channel" << endl;
++    std::cerr << "Caught exception while invoking create_channel" << std::endl;
+     return channel; // failure
+   }
+   if (verbose)
+-    cout << "Created a new channel with channel ID " << chan_id << endl;
++    std::cout << "Created a new channel with channel ID " << chan_id << std::endl;
+   return channel; // success
+ }
+@@ -289,11 +289,11 @@
+   if (!ior_file || strlen(ior_file) == 0) return channel; // empty string -- ignore
+   if (! (ifile = fopen(ior_file, "r")) ) {
+-    cerr << "Failed to open file " << ior_file << " for reading" << endl;
++    std::cerr << "Failed to open file " << ior_file << " for reading" << std::endl;
+     return channel; // failure
+   }
+   if (fscanf(ifile, "%s", buf) != 1) {
+-    cerr << "Failed to get an IOR from file " << ior_file << endl;
++    std::cerr << "Failed to get an IOR from file " << ior_file << std::endl;
+     fclose(ifile);
+     return channel; // failure
+   }
+@@ -301,22 +301,22 @@
+   try {
+     CORBA::Object_var fact_ref = orb->string_to_object(buf);
+     if ( CORBA::is_nil(fact_ref) ) {
+-      cerr << "Failed to turn IOR in file " << ior_file << " into object" << endl;
++      std::cerr << "Failed to turn IOR in file " << ior_file << " into object" << std::endl;
+       return channel; // failure
+     }
+     factory = CosNA::EventChannelFactory::_narrow(fact_ref);
+     if ( CORBA::is_nil(factory) ) {
+-      cerr << "Failed to narrow object from IOR in file " << ior_file <<
+-      " to type CosNotifyChannelAdmin::EventChannelFactory" << endl;
++      std::cerr << "Failed to narrow object from IOR in file " << ior_file <<
++      " to type CosNotifyChannelAdmin::EventChannelFactory" << std::endl;
+       return channel; // failure
+     }
+   } catch (...) {
+-    cerr << "Failed to convert IOR in file " << ior_file << " to object" << endl;
++    std::cerr << "Failed to convert IOR in file " << ior_file << " to object" << std::endl;
+     return channel; // failure
+   }
+   if (verbose) {
+-    cout << "Found valid channel factory reference" << endl;
+-    cout << "Creating new channel" << endl;
++    std::cout << "Found valid channel factory reference" << std::endl;
++    std::cout << "Creating new channel" << std::endl;
+   }
+   CosNA::ChannelID         chan_id;
+@@ -329,18 +329,18 @@
+     channel = factory->create_channel(qosP, admP, chan_id);
+     if ( CORBA::is_nil(channel) ) {
+-      cerr << "Failed to create new channel" << endl;
++      std::cerr << "Failed to create new channel" << std::endl;
+       return channel; // failure
+     }
+   } catch (CORBA::COMM_FAILURE& ex) {
+-    cerr << "Caught system exception COMM_FAILURE while invoking create_channel" << endl;
++    std::cerr << "Caught system exception COMM_FAILURE while invoking create_channel" << std::endl;
+     return channel; // failure
+   } catch (...) {
+-    cerr << "Caught exception while invoking create_channel" << endl;
++    std::cerr << "Caught exception while invoking create_channel" << std::endl;
+     return channel; // failure
+   }
+   if (verbose)
+-    cout << "Created a new channel with channel ID " << chan_id << endl;
++    std::cout << "Created a new channel with channel ID " << chan_id << std::endl;
+   return channel; // success
+ }
+diff -Naur --exclude=CVS omniNotify-2.1.orig/examples/legacy_clients.cc omniNotify-2.1.new/examples/legacy_clients.cc
+--- omniNotify-2.1.orig/examples/legacy_clients.cc     2003-10-23 08:39:11.000000000 +0400
++++ omniNotify-2.1.new/examples/legacy_clients.cc      2009-06-28 17:19:01.000000000 +0400
+@@ -4,8 +4,8 @@
+ // See legacy_clients.h
+ // -------------------------------------------------------------- //
+-#include <iostream.h>
+-#include <iomanip.h>
++#include <iostream>
++#include <iomanip>
+ #include "thread_wrappers.h"
+ #include "CosNotifyShorthands.h"
+@@ -40,22 +40,22 @@
+   try {
+     admin = channel->for_consumers();
+     if ( CORBA::is_nil(admin) ) {
+-      cerr << "Failed to obtain admin" << endl;
++      std::cerr << "Failed to obtain admin" << std::endl;
+       return 0; // failure
+     }
+   } catch (...) {
+-    cerr << "Failed to obtain admin" << endl;
++    std::cerr << "Failed to obtain admin" << std::endl;
+     return 0;  // failure
+   }
+-  if (verbose) cout << "Obtained admin from the channel" << endl;
++  if (verbose) std::cout << "Obtained admin from the channel" << std::endl;
+   try {
+     proxy = admin->obtain_push_supplier();
+   } catch (...) {  }
+   if ( CORBA::is_nil(proxy) ) {
+-    cerr << "Failed to obtain proxy" << endl;
++    std::cerr << "Failed to obtain proxy" << std::endl;
+     return 0;
+   }
+-  if (verbose) cout << "Obtained proxy from admin" << endl;
++  if (verbose) std::cout << "Obtained proxy from admin" << std::endl;
+     // Construct a client
+   LegacyPushConsumer_i* client =
+@@ -70,16 +70,16 @@
+   try {
+     _my_proxy->connect_push_consumer(_this());
+   } catch (CORBA::BAD_PARAM& ex) {
+-    cerr << _obj_name << ": BAD_PARAM Exception while connecting" << endl;
++    std::cerr << _obj_name << ": BAD_PARAM Exception while connecting" << std::endl;
+     return 1; // error
+   } catch (CosEA::AlreadyConnected& ex) {
+-    cerr << _obj_name << ": Already connected" << endl;
++    std::cerr << _obj_name << ": Already connected" << std::endl;
+     return 1; // error
+   } catch (...) {
+-    cerr << _obj_name << ": Failed to connect" << endl;
++    std::cerr << _obj_name << ": Failed to connect" << std::endl;
+     return 1; // error
+   }
+-  if (_verbose) cout << _obj_name << ": Connected to proxy, ready to consume events" << endl; 
++  if (_verbose) std::cout << _obj_name << ": Connected to proxy, ready to consume events" << std::endl; 
+   // if _millisecs is set, spawn a thread to ping the proxy
+   if (_millisecs) 
+     _worker = new GenericBoundWorkerThread(this);
+@@ -91,7 +91,7 @@
+   { // introduce lock scope
+     TW_SCOPE_LOCK(lock, _oplock, "LegacyPushConsumer", "LegacyPushConsumer_i::cleanup");
+     if (_worker || (!_done)) {
+-      cerr << "Coding error: only call c->cleanup() after c->wait_done()" << endl;
++      std::cerr << "Coding error: only call c->cleanup() after c->wait_done()" << std::endl;
+       return;
+     }
+     // this method takes sole ownership of _my_proxy ref
+@@ -113,7 +113,7 @@
+   { // introduce lock scope
+     TW_SCOPE_LOCK(lock, _oplock, "LegacyPushConsumer", "LegacyPushConsumer_i::start_working");
+-    if (_verbose && (!_done) && _millisecs) cout << _obj_name << ": Spawned thread entering ping loop" << endl;
++    if (_verbose && (!_done) && _millisecs) std::cout << _obj_name << ": Spawned thread entering ping loop" << std::endl;
+     // invariant: _oplock held at top of loop
+     while ( 1 ) {
+       if (_done || (_millisecs == 0)) break;
+@@ -138,7 +138,7 @@
+       continue; // continue ping loop
+     com_fail:
+       if (_done) break;
+-      if (_verbose) cout << _obj_name << ": communication error while pinging proxy using connect_push_consumer" << endl;
++      if (_verbose) std::cout << _obj_name << ": communication error while pinging proxy using connect_push_consumer" << std::endl;
+       _done = 1;
+       _finish.broadcast();
+       _com_err = 1;
+@@ -158,16 +158,16 @@
+   _num_events++;
+   if (_consume_fn)
+     (*_consume_fn)(data, _obj_name, _num_events, _verbose);
+-  else if (_verbose) cout << _obj_name << ": event count = " << _num_events << endl;
++  else if (_verbose) std::cout << _obj_name << ": event count = " << _num_events << std::endl;
+   if (_max_events && (_num_events >= _max_events)) {
+-    if (_verbose) cout << _obj_name << ": DONE [max_events reached]" << endl;
++    if (_verbose) std::cout << _obj_name << ": DONE [max_events reached]" << std::endl;
+     _done = 1;
+     _finish.broadcast();
+   }
+   if (!_done && _delay_millisecs) {
+     unsigned long d_secs     =  _delay_millisecs / 1000;
+     unsigned long d_nanosecs = (_delay_millisecs % 1000) * 1000000;
+-    if (_verbose) cout << _obj_name << ": delaying push response for " << _delay_millisecs << " millisecs" << endl;
++    if (_verbose) std::cout << _obj_name << ": delaying push response for " << _delay_millisecs << " millisecs" << std::endl;
+     unsigned long t_secs, t_nanosecs;
+     TW_GET_TIME(&t_secs, &t_nanosecs, d_secs, d_nanosecs);
+     _finish.timedwait(t_secs, t_nanosecs);
+@@ -180,7 +180,7 @@
+   TW_SCOPE_LOCK(lock, _oplock, "LegacyPushConsumer", "LegacyPushConsumer_i::diconnect_push_consumer");
+   if (_done) return;
+-  if (_verbose) cout << _obj_name << ": disconnected" << endl;
++  if (_verbose) std::cout << _obj_name << ": disconnected" << std::endl;
+   _done = 1;
+   _finish.broadcast();
+ }
+@@ -231,22 +231,22 @@
+   try {
+     admin = channel->for_consumers();
+     if ( CORBA::is_nil(admin) ) {
+-      cerr << "Failed to obtain admin" << endl;
++      std::cerr << "Failed to obtain admin" << std::endl;
+       return 0; // failure
+     }
+   } catch (...) {
+-    cerr << "Failed to obtain admin" << endl;
++    std::cerr << "Failed to obtain admin" << std::endl;
+     return 0;  // failure
+   }
+-  if (verbose) cout << "Obtained admin from the channel" << endl;
++  if (verbose) std::cout << "Obtained admin from the channel" << std::endl;
+   try {
+     proxy = admin->obtain_pull_supplier();
+   } catch (...) {  }
+   if ( CORBA::is_nil(proxy) ) {
+-    cerr << "Failed to obtain proxy" << endl;
++    std::cerr << "Failed to obtain proxy" << std::endl;
+     return 0;
+   }
+-  if (verbose) cout << "Obtained proxy from admin" << endl;
++  if (verbose) std::cout << "Obtained proxy from admin" << std::endl;
+     // Construct a client
+   LegacyPullConsumer_i* client =
+@@ -261,17 +261,17 @@
+   try {
+     _my_proxy->connect_pull_consumer(_this());
+   } catch (CORBA::BAD_PARAM& ex) {
+-    cerr << _obj_name << ": BAD_PARAM Exception while connecting" << endl;
++    std::cerr << _obj_name << ": BAD_PARAM Exception while connecting" << std::endl;
+     return 1; // error
+   } catch (CosEA::AlreadyConnected& ex) {
+-    cerr << _obj_name << ": Already connected" << endl;
++    std::cerr << _obj_name << ": Already connected" << std::endl;
+     return 1; // error
+   } catch (...) {
+-    cerr << _obj_name << ": Failed to connect" << endl;
++    std::cerr << _obj_name << ": Failed to connect" << std::endl;
+     return 1; // error
+   }
+   // spawn a thread to do pulling
+-  if (_verbose) cout << _obj_name << ": Connected to proxy, ready to consume events" << endl; 
++  if (_verbose) std::cout << _obj_name << ": Connected to proxy, ready to consume events" << std::endl; 
+   _worker = new GenericBoundWorkerThread(this);
+   return 0; // OK
+ }
+@@ -281,7 +281,7 @@
+   { // introduce lock scope
+     TW_SCOPE_LOCK(lock, _oplock, "LegacyPullConsumer", "LegacyPullConsumer_i::cleanup");
+     if (_worker || (!_done)) {
+-      cerr << "Coding error: only call c->cleanup() after c->wait_done()" << endl;
++      std::cerr << "Coding error: only call c->cleanup() after c->wait_done()" << std::endl;
+       return;
+     }
+     // this method takes sole ownership of _my_proxy ref
+@@ -309,7 +309,7 @@
+   { // introduce lock scope
+     TW_SCOPE_LOCK(lock, _oplock, "LegacyPullConsumer", "LegacyPullConsumer_i::start_working");
+-    if (_verbose && (!_done)) cout << _obj_name << ": Spawned thread entering main pull loop" << endl;
++    if (_verbose && (!_done)) std::cout << _obj_name << ": Spawned thread entering main pull loop" << std::endl;
+     while ( 1 ) {
+       if (_done) break; // must have disconnected
+       { // introduce temporary lock release scope; do not hold oplock across pull
+@@ -322,7 +322,7 @@
+       } // end temporary lock release scope
+       if (_done) break; // must have disconnected during pull
+       if (!data) {
+-      if (_verbose) cout << _obj_name << ": strange failure: pull() returned nil" << endl;
++      if (_verbose) std::cout << _obj_name << ": strange failure: pull() returned nil" << std::endl;
+       _com_err = 1;
+       break; // break from while loop -- done
+       }
+@@ -330,11 +330,11 @@
+       _num_events++;
+       if (_consume_fn)
+       (*_consume_fn)(*data, _obj_name, _num_events, _verbose);
+-      else if (_verbose) cout << _obj_name << ": event count = " << _num_events << endl;
++      else if (_verbose) std::cout << _obj_name << ": event count = " << _num_events << std::endl;
+       delete data;
+       data = 0;
+       if (_max_events && (_num_events >= _max_events)) {
+-      if (_verbose) cout << _obj_name << ": DONE [max_events reached]" << endl;
++      if (_verbose) std::cout << _obj_name << ": DONE [max_events reached]" << std::endl;
+       break; // done 
+       }
+       if (_millisecs) { // sleep for specified interval
+@@ -349,7 +349,7 @@
+       continue; // continue pulling
+     com_fail:
+       if (_done) break;
+-      if (_verbose) cout << _obj_name << ": communication error while calling pull()" << endl;
++      if (_verbose) std::cout << _obj_name << ": communication error while calling pull()" << std::endl;
+       _com_err = 1;
+       break; // break from while loop -- done
+     } // end while loop
+@@ -370,7 +370,7 @@
+   TW_SCOPE_LOCK(lock, _oplock, "LegacyPullConsumer", "LegacyPullConsumer_i::disconnect_pull_consumer");
+   if (_done) return;
+-  if (_verbose) cout << _obj_name << ": disconnected" << endl;
++  if (_verbose) std::cout << _obj_name << ": disconnected" << std::endl;
+   _done = 1;
+   _finish.broadcast();
+ }
+@@ -422,22 +422,22 @@
+   try {
+     admin = channel->for_suppliers();
+     if ( CORBA::is_nil(admin) ) {
+-      cerr << "Failed to obtain admin" << endl;
++      std::cerr << "Failed to obtain admin" << std::endl;
+       return 0; // failure
+     }
+   } catch (...) {
+-    cerr << "Failed to obtain admin" << endl;
++    std::cerr << "Failed to obtain admin" << std::endl;
+     return 0;  // failure
+   }
+-  if (verbose) cout << "Obtained admin from the channel" << endl;
++  if (verbose) std::cout << "Obtained admin from the channel" << std::endl;
+   try {
+     proxy = admin->obtain_push_consumer();
+   } catch (...) {  }
+   if ( CORBA::is_nil(proxy) ) {
+-    cerr << "Failed to obtain proxy" << endl;
++    std::cerr << "Failed to obtain proxy" << std::endl;
+     return 0; // failure
+   }
+-  if (verbose) cout << "Obtained proxy from admin" << endl;
++  if (verbose) std::cout << "Obtained proxy from admin" << std::endl;
+     // Construct a client
+   LegacyPushSupplier_i* client =
+@@ -452,17 +452,17 @@
+   try {
+     _my_proxy->connect_push_supplier(_this());
+   } catch (CORBA::BAD_PARAM& ex) {
+-    cerr << _obj_name << ": BAD_PARAM Exception while connecting" << endl;
++    std::cerr << _obj_name << ": BAD_PARAM Exception while connecting" << std::endl;
+     return 1; // error
+   } catch (CosEA::AlreadyConnected& ex) {
+-    cerr << _obj_name << ": Already connected" << endl;
++    std::cerr << _obj_name << ": Already connected" << std::endl;
+     return 1; // error
+   } catch (...) {
+-    cerr << _obj_name << ": Failed to connect" << endl;
++    std::cerr << _obj_name << ": Failed to connect" << std::endl;
+     return 1; // error
+   }
+   // spawn a thread to do pushing
+-  if (_verbose) cout << _obj_name << ": Connected to proxy, ready to supply events" << endl; 
++  if (_verbose) std::cout << _obj_name << ": Connected to proxy, ready to supply events" << std::endl; 
+   _worker = new GenericBoundWorkerThread(this);
+   return 0; // OK
+ }
+@@ -472,7 +472,7 @@
+   { // introduce lock scope
+     TW_SCOPE_LOCK(lock, _oplock, "LegacyPushSupplier", "LegacyPushSupplier_i::cleanup");
+     if (_worker || (!_done)) {
+-      cerr << "Coding error: only call c->cleanup() after c->wait_done()" << endl;
++      std::cerr << "Coding error: only call c->cleanup() after c->wait_done()" << std::endl;
+       return;
+     }
+     // this method takes sole ownership of _my_proxy ref
+@@ -500,7 +500,7 @@
+   { // introduce lock scope
+     TW_SCOPE_LOCK(lock, _oplock, "LegacyPushSupplier", "LegacyPushSupplier_i::start_working");
+-    if (_verbose && (!_done)) cout << _obj_name << ": Spawned thread entering main push loop" << endl;
++    if (_verbose && (!_done)) std::cout << _obj_name << ": Spawned thread entering main push loop" << std::endl;
+     while ( 1 ) {
+       if (_done) break; // must have disconnected
+       if ((*_supply_fn)(*data, _obj_name, _num_events+1, _verbose)) {
+@@ -515,9 +515,9 @@
+       if (_done) break; // must have disconnected during push
+       _num_events++;
+       // [rather than doing the following we let supply_fn report if it wants to]
+-      // if (_verbose) cout << _obj_name << ": Pushed an event, event count = " << _num_events << endl;
++      // if (_verbose) std::cout << _obj_name << ": Pushed an event, event count = " << _num_events << std::endl;
+       if (_max_events && (_num_events >= _max_events)) {
+-        if (_verbose) cout << _obj_name << ": DONE [max_events reached]" << endl;
++        if (_verbose) std::cout << _obj_name << ": DONE [max_events reached]" << std::endl;
+         break; // done
+       }
+       }
+@@ -534,7 +534,7 @@
+       continue; // continue pushing
+     com_fail:
+       if (_done) break; // must have disconnected during push
+-      if (_verbose) cout << _obj_name << ": communication error while calling push()" << endl;
++      if (_verbose) std::cout << _obj_name << ": communication error while calling push()" << std::endl;
+       _com_err = 1;
+       break; // break from while loop -- done
+     } // end while loop
+@@ -554,7 +554,7 @@
+   TW_SCOPE_LOCK(lock, _oplock, "LegacyPushSupplier", "LegacyPushSupplier_i::disconnect_push_supplier");
+   if (_done) return;
+-  if (_verbose) cout << _obj_name << ": disconnected" << endl;
++  if (_verbose) std::cout << _obj_name << ": disconnected" << std::endl;
+   _done = 1;
+   _finish.broadcast();
+ }
+@@ -606,22 +606,22 @@
+   try {
+     admin = channel->for_suppliers();
+     if ( CORBA::is_nil(admin) ) {
+-      cerr << "Failed to obtain admin" << endl;
++      std::cerr << "Failed to obtain admin" << std::endl;
+       return 0; // failure
+     }
+   } catch (...) {
+-    cerr << "Failed to obtain admin" << endl;
++    std::cerr << "Failed to obtain admin" << std::endl;
+     return 0;  // failure
+   }
+-  if (verbose) cout << "Obtained admin from the channel" << endl;
++  if (verbose) std::cout << "Obtained admin from the channel" << std::endl;
+   try {
+     proxy = admin->obtain_pull_consumer();
+   } catch (...) {  }
+   if ( CORBA::is_nil(proxy) ) {
+-    cerr << "Failed to obtain proxy" << endl;
++    std::cerr << "Failed to obtain proxy" << std::endl;
+     return 0; // failure
+   }
+-  if (verbose) cout << "Obtained proxy from admin" << endl;
++  if (verbose) std::cout << "Obtained proxy from admin" << std::endl;
+     // Construct a client
+   LegacyPullSupplier_i* client =
+@@ -636,16 +636,16 @@
+   try {
+     _my_proxy->connect_pull_supplier(_this());
+   } catch (CORBA::BAD_PARAM& ex) {
+-    cerr << _obj_name << ": BAD_PARAM Exception while connecting" << endl;
++    std::cerr << _obj_name << ": BAD_PARAM Exception while connecting" << std::endl;
+     return 1; // error
+   } catch (CosEA::AlreadyConnected& ex) {
+-    cerr << _obj_name << ": Already connected" << endl;
++    std::cerr << _obj_name << ": Already connected" << std::endl;
+     return 1; // error
+   } catch (...) {
+-    cerr << _obj_name << ": Failed to connect" << endl;
++    std::cerr << _obj_name << ": Failed to connect" << std::endl;
+     return 1; // error
+   }
+-  if (_verbose) cout << _obj_name << ": Connected to proxy, ready to supply events" << endl; 
++  if (_verbose) std::cout << _obj_name << ": Connected to proxy, ready to supply events" << std::endl; 
+   // if _millisecs is set, spawn a thread to ping the proxy
+   if (_millisecs)
+     _worker = new GenericBoundWorkerThread(this);
+@@ -657,7 +657,7 @@
+   { // introduce lock scope
+     TW_SCOPE_LOCK(lock, _oplock, "LegacyPullSupplier", "LegacyPullSupplier_i::cleanup");
+     if (_worker || (!_done)) {
+-      cerr << "Coding error: only call c->cleanup() after c->wait_done()" << endl;
++      std::cerr << "Coding error: only call c->cleanup() after c->wait_done()" << std::endl;
+       return;
+     }
+     // this method takes sole ownership of _my_proxy ref
+@@ -678,7 +678,7 @@
+   { // introduce lock scope
+     TW_SCOPE_LOCK(lock, _oplock, "LegacyPullSupplier", "LegacyPullSupplier_i::start_working");
+-    if (_verbose && (!_done) && _millisecs) cout << _obj_name << ": Spawned thread entering ping loop" << endl;
++    if (_verbose && (!_done) && _millisecs) std::cout << _obj_name << ": Spawned thread entering ping loop" << std::endl;
+     // invariant: _oplock held at top of loop
+     while ( 1 ) {
+       if (_done || (_millisecs == 0)) break;
+@@ -703,7 +703,7 @@
+       continue; // continue ping loop
+     com_fail:
+       if (_done) break;
+-      if (_verbose) cout << _obj_name << ": communication error while pinging proxy using connect_pull_supplier" << endl;
++      if (_verbose) std::cout << _obj_name << ": communication error while pinging proxy using connect_pull_supplier" << std::endl;
+       _done = 1;
+       _finish.broadcast();
+       _com_err = 1;
+@@ -722,7 +722,7 @@
+   TW_SCOPE_LOCK(lock, _oplock, "LegacyPullSupplier", "LegacyPullSupplier_i::try_pull");
+   if (_done) return data;
+-  if (_verbose) cout << _obj_name << ": Channel called try_pull" << endl;
++  if (_verbose) std::cout << _obj_name << ": Channel called try_pull" << std::endl;
+   // If we reached done point during last try_pull, it is broadcast now
+   // and we return from this try_pull call without an event.
+@@ -730,10 +730,10 @@
+   // processed the previous try_pull (the final supplied event) before
+   // we disconnect this supplier.
+   if (_max_events && (_num_events >= _max_events)) {
+-    if (_verbose) cout << _obj_name << ": DONE [max_events reached; we waited for 1 extra try_pull]" << endl;
++    if (_verbose) std::cout << _obj_name << ": DONE [max_events reached; we waited for 1 extra try_pull]" << std::endl;
+     _done = 1;
+     _finish.broadcast();
+-    if (_verbose) cout << _obj_name << ": NOT returning an event" << endl;
++    if (_verbose) std::cout << _obj_name << ": NOT returning an event" << std::endl;
+     return data;
+   }
+@@ -741,14 +741,14 @@
+     has_event = 1;
+     _num_events++;
+     // [rather than doing the following we let supply_fn report if it wants to]
+-    // if (_verbose) cout << _obj_name << ": Returning an event, event count = " << _num_events << endl;
++    // if (_verbose) std::cout << _obj_name << ": Returning an event, event count = " << _num_events << std::endl;
+   } else {
+-    if (_verbose) cout << _obj_name << ": NOT returning an event" << endl;
++    if (_verbose) std::cout << _obj_name << ": NOT returning an event" << std::endl;
+   }
+   if (!_done && _delay_millisecs) {
+     unsigned long d_secs     =  _delay_millisecs / 1000;
+     unsigned long d_nanosecs = (_delay_millisecs % 1000) * 1000000;
+-    if (_verbose) cout << _obj_name << ": delaying try_pull response for " << _delay_millisecs << " millisecs" << endl;
++    if (_verbose) std::cout << _obj_name << ": delaying try_pull response for " << _delay_millisecs << " millisecs" << std::endl;
+     unsigned long t_secs, t_nanosecs;
+     TW_GET_TIME(&t_secs, &t_nanosecs, d_secs, d_nanosecs);
+     _finish.timedwait(t_secs, t_nanosecs);
+@@ -771,7 +771,7 @@
+   { // introduce lock scope
+     TW_SCOPE_LOCK(lock, _oplock, "LegacyPullSupplier", "LegacyPullSupplier_i::pull");
+-    if (_verbose && (!_done)) cout << _obj_name << ": Channel called pull" << endl;
++    if (_verbose && (!_done)) std::cout << _obj_name << ": Channel called pull" << std::endl;
+     // invariants: _oplock is held entering top of loop and 
+     // also whenever we break out of loop
+     while ( 1 ) {
+@@ -779,9 +779,9 @@
+       if ((*_supply_fn)(*data, _obj_name, _num_events+1, _verbose)) {
+       _num_events++;
+       // [rather than doing the following we let supply_fn report if it wants to]
+-      // if (_verbose) cout << _obj_name << ": Returning an event, event count = " << _num_events << endl;
++      // if (_verbose) std::cout << _obj_name << ": Returning an event, event count = " << _num_events << std::endl;
+       if (_max_events && (_num_events >= _max_events)) {
+-        if (_verbose) cout << _obj_name << ": DONE [max_events reached]" << endl;
++        if (_verbose) std::cout << _obj_name << ": DONE [max_events reached]" << std::endl;
+         _done = 1;
+         _finish.broadcast();
+       }
+@@ -801,7 +801,7 @@
+     if (!_done && _delay_millisecs) {
+       unsigned long d_secs     =  _delay_millisecs / 1000;
+       unsigned long d_nanosecs = (_delay_millisecs % 1000) * 1000000;
+-      if (_verbose) cout << _obj_name << ": delaying pull response for " << _delay_millisecs << " millisecs" << endl;
++      if (_verbose) std::cout << _obj_name << ": delaying pull response for " << _delay_millisecs << " millisecs" << std::endl;
+       unsigned long t_secs, t_nanosecs;
+       TW_GET_TIME(&t_secs, &t_nanosecs, d_secs, d_nanosecs);
+       _finish.timedwait(t_secs, t_nanosecs);
+@@ -816,7 +816,7 @@
+   TW_SCOPE_LOCK(lock, _oplock, "LegacyPullSupplier", "LegacyPullSupplier_i::discconnect_pull_supplier");
+   if (_done) return;
+-  if (_verbose) cout << _obj_name << ": disconnected" << endl;
++  if (_verbose) std::cout << _obj_name << ": disconnected" << std::endl;
+   _done = 1;
+   _finish.broadcast();
+ }
+diff -Naur --exclude=CVS omniNotify-2.1.orig/examples/main_program.h omniNotify-2.1.new/examples/main_program.h
+--- omniNotify-2.1.orig/examples/main_program.h        2004-03-19 00:39:20.000000000 +0300
++++ omniNotify-2.1.new/examples/main_program.h 2009-06-28 17:24:41.000000000 +0400
+@@ -58,7 +58,7 @@
+ #ifndef CREATE_CHANNEL
+     // (2) Obtain reference to notification channel
+-    if (verbose) cout << "Obtaining reference to notification channel" << endl;
++    if (verbose) std::cout << "Obtaining reference to notification channel" << std::endl;
+     CosNA::EventChannel_ptr channel = getchan_from_ns(orb, channel_name, verbose);
+     if (CORBA::is_nil(channel)) { // name service lookup failed
+       channel = getchan_from_iorfile(orb, ior_file, verbose);
+@@ -68,7 +68,7 @@
+     }
+ #else
+     // (2) Create a new notification channel
+-    if (verbose) cout << "Creating a new notification channel" << endl;
++    if (verbose) std::cout << "Creating a new notification channel" << std::endl;
+     CosNA::EventChannel_ptr channel = getnewchan_use_ns(orb, cfact_name, verbose);
+     if (CORBA::is_nil(channel)) { // name service lookup failed
+       channel = getnewchan_use_iorfile(orb, cfact_ior_file, verbose);
+@@ -79,7 +79,7 @@
+ #endif
+     // (3) Create a client
+-    if (verbose) cout << "Creating client" << endl;
++    if (verbose) std::cout << "Creating client" << std::endl;
+ #ifndef LEGACY_CLIENT
+     CLIENT_IMPL_CLASS* client =
+       CLIENT_IMPL_CLASS::create(orb, channel, num_events, batch_size, CLIENT_NAME, proxy_ior_file, admin_ior_file,
+@@ -94,55 +94,55 @@
+       goto error_return; // failed to create client
+     }
+     // Obtain reference to the external client object
+-    if (verbose) cout << "Obtaining CORBA object ref to client" << endl;
++    if (verbose) std::cout << "Obtaining CORBA object ref to client" << std::endl;
+     CLIENT_CLASS_VAR myref = client->_this(); // implicit activation
+     client->_remove_ref(); // enables POA cleanup of servant
+     // (4) Tell POA we are ready to go
+-    if (verbose) cout << "Activating POA manager" << endl;
++    if (verbose) std::cout << "Activating POA manager" << std::endl;
+     PortableServer::POAManager_var pman = poa->the_POAManager();
+     pman->activate();
+     // (5) Connect client to its proxy, wait for desired # of events
+-    if (verbose) cout << "Connecting client to its proxy" << endl;
++    if (verbose) std::cout << "Connecting client to its proxy" << std::endl;
+     if (client->connect()) {
+       // an immediate error occurred
+     } else {
+-      if (verbose) cout << "Waiting for desired # of events" << endl;
++      if (verbose) std::cout << "Waiting for desired # of events" << std::endl;
+       // Wait until num_events has been reached
+       CORBA::Boolean communication_error = client->wait_done();
+       if (communication_error && (num_events > 0)) {
+-      if (verbose) cout << "Communication error -- probably did not process desired # of events" << endl;
++      if (verbose) std::cout << "Communication error -- probably did not process desired # of events" << std::endl;
+       }
+-      if (verbose) cout << "Cleaning up" << endl;
++      if (verbose) std::cout << "Cleaning up" << std::endl;
+       client->cleanup();
+     }
+     goto normal_return;
+   }
+   catch(CORBA::SystemException&) {
+-    cerr << "main caught CORBA::SystemException." << endl;
++    std::cerr << "main caught CORBA::SystemException." << std::endl;
+   }
+   catch(CORBA::Exception&) {
+-    cerr << "main caught CORBA::Exception." << endl;
++    std::cerr << "main caught CORBA::Exception." << std::endl;
+   }
+ #if defined(__OMNIORB3__) || defined(__OMNIORB4__)
+   catch(omniORB::fatalException& fe) {
+-    cerr << "main caught omniORB::fatalException:" << endl;
+-    cerr << "  file: " << fe.file() << endl;
+-    cerr << "  line: " << fe.line() << endl;
+-    cerr << "  mesg: " << fe.errmsg() << endl;
++    std::cerr << "main caught omniORB::fatalException:" << std::endl;
++    std::cerr << "  file: " << fe.file() << std::endl;
++    std::cerr << "  line: " << fe.line() << std::endl;
++    std::cerr << "  mesg: " << fe.errmsg() << std::endl;
+   }
+ #endif
+   catch(...) {
+     // nameclt comment says it is a bad idea to report an error here 
+   }
+-  cerr << "main caught an exception." << endl;
++  std::cerr << "main caught an exception." << std::endl;
+  error_return:
+ #ifdef CREATE_CHANNEL
+ #ifdef DESTROY_CHANNEL
+   try {
+     if (!CORBA::is_nil(channel)) {
+-      if (verbose) cout << "Destroying the channel we created" << endl;
++      if (verbose) std::cout << "Destroying the channel we created" << std::endl;
+       channel->destroy();
+     }
+   } catch(...) { }
+@@ -155,7 +155,7 @@
+ #ifdef DESTROY_CHANNEL
+   try {
+     if (!CORBA::is_nil(channel)) {
+-      if (verbose) cout << "Destroying the channel we created" << endl;
++      if (verbose) std::cout << "Destroying the channel we created" << std::endl;
+       channel->destroy();
+     }
+   } catch(...) { }
+diff -Naur --exclude=CVS omniNotify-2.1.orig/examples/ndadmin.cc omniNotify-2.1.new/examples/ndadmin.cc
+--- omniNotify-2.1.orig/examples/ndadmin.cc    2003-10-12 22:51:18.000000000 +0400
++++ omniNotify-2.1.new/examples/ndadmin.cc     2009-06-28 17:09:16.000000000 +0400
+@@ -6,7 +6,7 @@
+ #error COS_USES_BOA should not be set for this example
+ #endif
+-#include <iostream.h>
++#include <iostream>
+ #include "orb_init_name.h"
+ #include "get_channel.h"
+@@ -23,15 +23,15 @@
+ static void usage(const char* pname)
+ {
+-  cout << "Usage: " << pname << " [-n name] [-f file] [-v]" << endl;
+-  cout << "  -n name  : channel name" << endl;
+-  cout << "               => use event service to lookup this name" << endl;
+-  cout << "  -f file  : file containing channel IOR" << endl;
+-  cout << "               => use string_to_object on the IOR" << endl;
+-  cout << "  -v       : verbose output" << endl;
+-  cout << "NOTE: The server has a default channel; " << pname << " finds this channel" << endl;
+-  cout << "      and then goes 'UP' to find the notifd server" << endl;
+-  cout << endl;
++  std::cout << "Usage: " << pname << " [-n name] [-f file] [-v]" << std::endl;
++  std::cout << "  -n name  : channel name" << std::endl;
++  std::cout << "               => use event service to lookup this name" << std::endl;
++  std::cout << "  -f file  : file containing channel IOR" << std::endl;
++  std::cout << "               => use string_to_object on the IOR" << std::endl;
++  std::cout << "  -v       : verbose output" << std::endl;
++  std::cout << "NOTE: The server has a default channel; " << pname << " finds this channel" << std::endl;
++  std::cout << "      and then goes 'UP' to find the notifd server" << std::endl;
++  std::cout << std::endl;
+ }
+ int main(int argc, char** argv) {
+@@ -78,12 +78,12 @@
+     }
+     // (2) Obtain reference to notification channel
+-    if (verbose) cout << "Obtaining reference to notification channel" << endl;
++    if (verbose) std::cout << "Obtaining reference to notification channel" << std::endl;
+     channel = getchan_from_ns(orb, channel_name, verbose);
+     if (CORBA::is_nil(channel)) { // name service lookup failed
+       channel = getchan_from_iorfile(orb, ior_file, verbose);
+       if (CORBA::is_nil(channel)) {
+-      if (verbose) cout << "Could not find server's default channel" << endl;
++      if (verbose) std::cout << "Could not find server's default channel" << std::endl;
+       goto err_return; // both methods failed
+       }
+     }
+@@ -97,7 +97,7 @@
+     catch ( CORBA::OBJECT_NOT_EXIST& e ) { docmd_problem = 1; } \
+     catch ( CORBA::COMM_FAILURE& e ) { docmd_problem = 1; }
+     if (!success || !target_changed || docmd_problem) {
+-      if (verbose) cout << "Could not find server's default channel" << endl;
++      if (verbose) std::cout << "Could not find server's default channel" << std::endl;
+       goto err_return;
+     }
+     target = next_target;
+@@ -108,7 +108,7 @@
+     catch ( CORBA::OBJECT_NOT_EXIST& e ) { docmd_problem = 1; } \
+     catch ( CORBA::COMM_FAILURE& e ) { docmd_problem = 1; }
+     if (!success || !target_changed || docmd_problem) {
+-      if (verbose) cout << "Could not find server's default channel" << endl;
++      if (verbose) std::cout << "Could not find server's default channel" << std::endl;
+       goto err_return;
+     }
+     target = AttN::Interactive::_duplicate(next_target);
+@@ -119,23 +119,23 @@
+     goto norm_return;
+   }
+   catch(CORBA::SystemException&) {                     
+-    cerr << pname << " main caught CORBA::SystemException." << endl;  
++    std::cerr << pname << " main caught CORBA::SystemException." << std::endl;  
+   }                                                    
+   catch(CORBA::Exception&) {                           
+-    cerr << pname << " main caught CORBA::Exception." << endl;        
++    std::cerr << pname << " main caught CORBA::Exception." << std::endl;        
+   }                                                    
+   catch(omniORB::fatalException& fe) {                 
+-    cerr << "main caught omniORB::fatalException:" << endl; 
+-    cerr << "  file: " << fe.file() << endl;           
+-    cerr << "  line: " << fe.line() << endl;           
+-    cerr << "  mesg: " << fe.errmsg() << endl;         
++    std::cerr << "main caught omniORB::fatalException:" << std::endl; 
++    std::cerr << "  file: " << fe.file() << std::endl;           
++    std::cerr << "  line: " << fe.line() << std::endl;           
++    std::cerr << "  mesg: " << fe.errmsg() << std::endl;         
+   }                                                    
+   catch(...) {                                         
+     // nameclt comment says it is a bad idea to report an error here 
+   }
+-  cerr << "main caught an exception." << endl;
++  std::cerr << "main caught an exception." << std::endl;
+  err_return:
+-  cerr << "QUITTING due to error" << endl;
++  std::cerr << "QUITTING due to error" << std::endl;
+   return -1;
+  norm_return:
+   return 0;
+diff -Naur --exclude=CVS omniNotify-2.1.orig/examples/parse_cmd_line.h omniNotify-2.1.new/examples/parse_cmd_line.h
+--- omniNotify-2.1.orig/examples/parse_cmd_line.h      2003-10-23 08:39:11.000000000 +0400
++++ omniNotify-2.1.new/examples/parse_cmd_line.h       2009-06-28 17:13:49.000000000 +0400
+@@ -4,7 +4,7 @@
+ #define _PARSE_CMD_LINE_H
+ #include <stdlib.h>
+-#include <iostream.h>
++#include <iostream>
+ #include "CosNotifyShorthands.h"
+@@ -18,47 +18,47 @@
+ static void usage(const char* pname, CORBA::Boolean supports_filters)
+ {
+-  cout << "Usage: " << pname << " [-d #] [-b #] [-m #] [-M #] [-n name] [-f file] [-N name] [-F file] [-p file] [-a file] [-v]";
++  std::cout << "Usage: " << pname << " [-d #] [-b #] [-m #] [-M #] [-n name] [-f file] [-N name] [-F file] [-p file] [-a file] [-v]";
+   if (supports_filters) {
+-    cout << " [-t types] [-e expr]" << endl;
++    std::cout << " [-t types] [-e expr]" << std::endl;
+   } else {
+-    cout << endl;
++    std::cout << std::endl;
+   }
+-  cout << "  -d #     : disconnect after # events [default 0 means never disconnect]" << endl;
+-  cout << "  -b #     : batch size (only relevant for batch supplier programs) [default 5]" << endl;
+-  cout << "               => must be >= 1" << endl;
+-  cout << "  -m #     : # of milliseconds to pause between each push/pull [default 0]" << endl;
+-  cout << "  -M #     : # of milliseconds to pause during incoming push, pull, try_pull [default 0]" << endl;
+-  cout << "             (-M only applies to push consumers and pull suppliers)" << endl;
+-  cout << "  -n name  : channel name" << endl;
+-  cout << "               => use event service to lookup this name" << endl;
+-  cout << "  -f file  : file containing channel IOR" << endl;
+-  cout << "               => use string_to_object on the IOR" << endl;
+-  cout << "  -N name  : factory name" << endl;
+-  cout << "               => use event service to lookup this name" << endl;
+-  cout << "  -F file  : file containing channel factory IOR" << endl;
+-  cout << "               => use string_to_object on the IOR" << endl;
+-  cout << "  -p file  : file to store IOR of the proxy used by this client" << endl;
+-  cout << "                (used by demo_add_filter, demo_offer_change, or demo_subscription_chang)" << endl;
+-  cout << "  -a file  : file to store IOR of the admin used by this client" << endl;
+-  cout << "                (used by demo_add_filter, demo_offer_change, or demo_subscription_chang)" << endl;
+-  cout << "  -v       : verbose output" << endl;
+-  cout << endl;
++  std::cout << "  -d #     : disconnect after # events [default 0 means never disconnect]" << std::endl;
++  std::cout << "  -b #     : batch size (only relevant for batch supplier programs) [default 5]" << std::endl;
++  std::cout << "               => must be >= 1" << std::endl;
++  std::cout << "  -m #     : # of milliseconds to pause between each push/pull [default 0]" << std::endl;
++  std::cout << "  -M #     : # of milliseconds to pause during incoming push, pull, try_pull [default 0]" << std::endl;
++  std::cout << "             (-M only applies to push consumers and pull suppliers)" << std::endl;
++  std::cout << "  -n name  : channel name" << std::endl;
++  std::cout << "               => use event service to lookup this name" << std::endl;
++  std::cout << "  -f file  : file containing channel IOR" << std::endl;
++  std::cout << "               => use string_to_object on the IOR" << std::endl;
++  std::cout << "  -N name  : factory name" << std::endl;
++  std::cout << "               => use event service to lookup this name" << std::endl;
++  std::cout << "  -F file  : file containing channel factory IOR" << std::endl;
++  std::cout << "               => use string_to_object on the IOR" << std::endl;
++  std::cout << "  -p file  : file to store IOR of the proxy used by this client" << std::endl;
++  std::cout << "                (used by demo_add_filter, demo_offer_change, or demo_subscription_chang)" << std::endl;
++  std::cout << "  -a file  : file to store IOR of the admin used by this client" << std::endl;
++  std::cout << "                (used by demo_add_filter, demo_offer_change, or demo_subscription_chang)" << std::endl;
++  std::cout << "  -v       : verbose output" << std::endl;
++  std::cout << std::endl;
+   if (supports_filters) {
+-    cout << "Options for adding a filter:" << endl;
+-    cout << "  -t types : add a filter for the specified types, which should be a" << endl;
+-    cout << "               comma-separated list of types of the form D::T" << endl;
+-    cout << "  -e expr  : add a filter with the specified boolean expression" << endl;
+-    cout << endl;
+-    cout << "If only -t specified, the expression \"true\" is used for the filter" << endl;
+-    cout << "If only -e specified, the event type \"*::*\" is used for the filter" << endl;
+-    cout << endl;
+-  }
+-  cout << "If both -n and -f are specified, the -n option is tried first" << endl;
+-  cout << endl;
+-  cout << "If neither -n or -f is specified, program first tries name service" << endl;
+-  cout << "using name \"EventChannel\", then default IOR file /tmp/rdichan.ior" << endl;
+-  cout << endl;
++    std::cout << "Options for adding a filter:" << std::endl;
++    std::cout << "  -t types : add a filter for the specified types, which should be a" << std::endl;
++    std::cout << "               comma-separated list of types of the form D::T" << std::endl;
++    std::cout << "  -e expr  : add a filter with the specified boolean expression" << std::endl;
++    std::cout << std::endl;
++    std::cout << "If only -t specified, the expression \"true\" is used for the filter" << std::endl;
++    std::cout << "If only -e specified, the event type \"*::*\" is used for the filter" << std::endl;
++    std::cout << std::endl;
++  }
++  std::cout << "If both -n and -f are specified, the -n option is tried first" << std::endl;
++  std::cout << std::endl;
++  std::cout << "If neither -n or -f is specified, program first tries name service" << std::endl;
++  std::cout << "using name \"EventChannel\", then default IOR file /tmp/rdichan.ior" << std::endl;
++  std::cout << std::endl;
+ }
+ // return 0 if etype_list is a valid comma-separated event type list
+@@ -201,12 +201,12 @@
+     cfact_ior_file = (char*)"/tmp/rdifact.ior";
+   }
+   if ( (!supports_filters) && ( strlen(etype_list) || strlen(constraint_expr) ) ) {
+-    cout << "Filter options not supported for this client" << endl;
++    std::cout << "Filter options not supported for this client" << std::endl;
+     usage(pname, supports_filters);
+     return 1; // error
+   }
+   if (strlen(etype_list) && parse_etype_list(etype_list, evs)) {
+-    cout << "Event type list for -t option must be comma-separated list of D::T" << endl << endl; 
++    std::cout << "Event type list for -t option must be comma-separated list of D::T" << std::endl << std::endl; 
+     usage(pname, supports_filters);
+     return 1;
+   }
+diff -Naur --exclude=CVS omniNotify-2.1.orig/examples/sample_clients.cc omniNotify-2.1.new/examples/sample_clients.cc
+--- omniNotify-2.1.orig/examples/sample_clients.cc     2003-10-23 08:39:11.000000000 +0400
++++ omniNotify-2.1.new/examples/sample_clients.cc      2009-06-28 17:17:16.000000000 +0400
+@@ -7,9 +7,9 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+-#include <fstream.h>
+-#include <iostream.h>
+-#include <iomanip.h>
++#include <fstream>
++#include <iostream>
++#include <iomanip>
+ #ifdef HAVE_UNISTD_H
+ #  include <unistd.h>
+@@ -70,7 +70,7 @@
+ // This helper routine informs channel that type ANY will be supplied
+ void offer_any(CosNC::NotifyPublish_ptr proxy, const char* objnm, CORBA::Boolean verbose) {
+-  if (verbose) cout << objnm << ": offering type %ANY" << endl;
++  if (verbose) std::cout << objnm << ": offering type %ANY" << std::endl;
+   CosN::EventTypeSeq added, deled;
+   added.length(1);
+   added[0].domain_name = CORBA::string_dup("");
+@@ -79,13 +79,13 @@
+   try {
+     proxy->offer_change(added, deled);
+   } catch (...) {
+-    if (verbose) cout << "** registration failed **" << endl;
++    if (verbose) std::cout << "** registration failed **" << std::endl;
+   }
+ }
+ // This helper routine informs channel that types Stock::Ticker and Bond::Ticker will be supplied
+ void offer_ticker(CosNC::NotifyPublish_ptr proxy, const char* objnm, CORBA::Boolean verbose) {
+-  if (verbose) cout << objnm << ": offering types Stock::Ticker and Bond::Ticker" << endl;
++  if (verbose) std::cout << objnm << ": offering types Stock::Ticker and Bond::Ticker" << std::endl;
+   CosN::EventTypeSeq added, deled;
+   added.length(2);
+   added[0].domain_name = CORBA::string_dup("Stock");
+@@ -96,7 +96,7 @@
+   try {
+     proxy->offer_change(added, deled);
+   } catch (...) {
+-    if (verbose) cout << "** registration failed **" << endl;
++    if (verbose) std::cout << "** registration failed **" << std::endl;
+   }
+ }
+@@ -104,19 +104,19 @@
+ void write_ior_to_file(CORBA::ORB_ptr orb, CORBA::Object_ptr o,
+                      const char* filenm, CORBA::Boolean verbose) {
+   if (strlen(filenm) == 0) {
+-    if (verbose) cout << "ior filename empty -- skipping" << endl;
++    if (verbose) std::cout << "ior filename empty -- skipping" << std::endl;
+     return;
+   }
+-  ofstream file(filenm, ios::out);
++  std::ofstream file(filenm, std::ios::out);
+   if ( ! file ) {
+-    if (verbose) cerr << "Failed to open IOR file: " << filenm << endl;
++    if (verbose) std::cerr << "Failed to open IOR file: " << filenm << std::endl;
+     return;
+   }
+   char* ior_name = orb->object_to_string(o);
+   file << ior_name;
+   file.close();
+   delete [] ior_name;
+-  if (verbose) cout << "wrote IOR to file: " << filenm << endl;
++  if (verbose) std::cout << "wrote IOR to file: " << filenm << std::endl;
+ }
+ // These 2 helper routines are used to obtain one of the
+@@ -138,14 +138,14 @@
+   try {
+     admin = channel->new_for_suppliers(ifoper, admID);
+     if ( CORBA::is_nil(admin) ) {
+-      cerr << "Failed to obtain admin" << endl;
++      std::cerr << "Failed to obtain admin" << std::endl;
+       return generic_proxy; // failure
+     }
+   } catch (...) {
+-    cerr << "Failed to obtain admin" << endl;
++    std::cerr << "Failed to obtain admin" << std::endl;
+     return generic_proxy;  // failure
+   }
+-  if (verbose) cout << "Obtained admin from the channel" << endl;
++  if (verbose) std::cout << "Obtained admin from the channel" << std::endl;
+   CosNA::ProxyID prxID;
+   try {
+@@ -156,14 +156,14 @@
+     }
+   } catch (...) {  }
+   if (CORBA::is_nil(generic_proxy)) {
+-    cerr << "Failed to obtain proxy" << endl;
++    std::cerr << "Failed to obtain proxy" << std::endl;
+     try {
+       admin->destroy();
+     } catch (...) { }
+     admin = CosNA::SupplierAdmin::_nil();
+     return generic_proxy;
+   }
+-  if (verbose) cout << "Obtained proxy from admin" << endl;
++  if (verbose) std::cout << "Obtained proxy from admin" << std::endl;
+   write_ior_to_file(orb, admin, admin_ior_file, verbose);
+   return generic_proxy; // success if generic_proxy is non-nil, otherwise failure
+ }
+@@ -183,14 +183,14 @@
+   try {
+     admin = channel->new_for_consumers(ifoper, admID);
+     if ( CORBA::is_nil(admin) ) {
+-      cerr << "Failed to obtain admin" << endl;
++      std::cerr << "Failed to obtain admin" << std::endl;
+       return generic_proxy; // failure
+     }
+   } catch (...) {
+-    cerr << "Failed to obtain admin" << endl;
++    std::cerr << "Failed to obtain admin" << std::endl;
+     return generic_proxy;  // failure
+   }
+-  if (verbose) cout << "Obtained admin from the channel" << endl;
++  if (verbose) std::cout << "Obtained admin from the channel" << std::endl;
+   CosNA::ProxyID prxID;
+   try {
+@@ -201,14 +201,14 @@
+     }
+   } catch (...) {  }
+   if (CORBA::is_nil(generic_proxy)) {
+-    cerr << "Failed to obtain proxy" << endl;
++    std::cerr << "Failed to obtain proxy" << std::endl;
+     try {
+       admin->destroy();
+     } catch (...) { }
+     admin = CosNA::ConsumerAdmin::_nil();
+     return generic_proxy;
+   }
+-  if (verbose) cout << "Obtained proxy from admin" << endl;
++  if (verbose) std::cout << "Obtained proxy from admin" << std::endl;
+   write_ior_to_file(orb, admin, admin_ior_file, verbose);
+   return generic_proxy; // success if generic_proxy is non-nil, otherwise failure
+ }
+@@ -226,24 +226,24 @@
+                 CORBA::Boolean verbose) {
+   // if evs and constraint expr are empty, we ignore them + do not add a filter
+   if ( (evs.length() == 0) && (strlen(constraint_expr) == 0) ) {
+-    if (verbose) cout << obj_name << ": (no filter used)" << endl;
++    if (verbose) std::cout << obj_name << ": (no filter used)" << std::endl;
+     return 0; // OK
+   }
+   // Obtain a reference to the default filter factory; create a filter object 
+   CosNF::FilterFactory_ptr ffp;
+   filter = CosNF::Filter::_nil();
+   try {
+-    if (verbose) cout << obj_name << ": Obtaining default filter factory" << endl;
++    if (verbose) std::cout << obj_name << ": Obtaining default filter factory" << std::endl;
+     ffp    = channel->default_filter_factory();  
+     filter = ffp->create_filter("EXTENDED_TCL");
+   } catch (CORBA::COMM_FAILURE& ex) {
+-    cerr << obj_name << ": Caught COMM_FAILURE obtaining filter object" << endl;
++    std::cerr << obj_name << ": Caught COMM_FAILURE obtaining filter object" << std::endl;
+     return 1; // error
+   } catch (...) {
+-    cerr << obj_name << ": Caught exception obtaining filter object" << endl;
++    std::cerr << obj_name << ": Caught exception obtaining filter object" << std::endl;
+     return 1; // error
+   }
+-  if (verbose) cout << obj_name << ": Obtained filter from default filter factory" << endl;
++  if (verbose) std::cout << obj_name << ": Obtained filter from default filter factory" << std::endl;
+   // Construct a simple constraint expression; add it to fadmin
+   CosNF::ConstraintExpSeq   exp;
+@@ -252,32 +252,32 @@
+   exp[0].constraint_expr = CORBA::string_dup(constraint_expr);
+   CORBA::Boolean res = 0; // OK
+   try {
+-    if (verbose) cout << obj_name << ": Adding constraints to filter" << endl;
++    if (verbose) std::cout << obj_name << ": Adding constraints to filter" << std::endl;
+     filter->add_constraints(exp);
+-    if (verbose) cout << obj_name << ": Adding filter to target" << endl;
++    if (verbose) std::cout << obj_name << ": Adding filter to target" << std::endl;
+     fadmin->add_filter(filter);
+     if (verbose) {
+       if (evs.length()) {
+-      cout << obj_name << ": Added filter for types ";
++      std::cout << obj_name << ": Added filter for types ";
+       for (unsigned int j = 0; j < evs.length(); j++) { 
+-        cout << (const char*)evs[j].domain_name << "::" << (const char*)evs[j].type_name;
++        std::cout << (const char*)evs[j].domain_name << "::" << (const char*)evs[j].type_name;
+         if ((j+1) < evs.length())
+-          cout << ", ";
++          std::cout << ", ";
+       }
+       } else {
+-      cout << obj_name << ": Added filter for type *::* ";
++      std::cout << obj_name << ": Added filter for type *::* ";
+       }
+-      cout << " and constraint expression \"" << constraint_expr << "\" " << endl;
++      std::cout << " and constraint expression \"" << constraint_expr << "\" " << std::endl;
+     }
+   }
+   catch(CosNF::InvalidConstraint& _exobj1) {
+-    cerr << obj_name << ": Exception thrown : Invalid constraint given "
+-       << (const char *)constraint_expr << endl;
++    std::cerr << obj_name << ": Exception thrown : Invalid constraint given "
++       << (const char *)constraint_expr << std::endl;
+     res = 1; // error
+   }
+   catch (...) {
+-    cerr << obj_name << ": Exception thrown while adding constraint " 
+-       << (const char *)constraint_expr << endl; 
++    std::cerr << obj_name << ": Exception thrown while adding constraint " 
++       << (const char *)constraint_expr << std::endl; 
+     res = 1; // error
+   }
+   if (res == 1) { // error so destroy filter
+@@ -306,17 +306,17 @@
+   CosNF::FilterFactory_ptr ffp;
+   filter = CosNF::Filter::_nil();
+   try {
+-    if (verbose) cout << obj_name << ": Obtaining default filter factory" << endl;
++    if (verbose) std::cout << obj_name << ": Obtaining default filter factory" << std::endl;
+     ffp    = channel->default_filter_factory();  
+     filter = ffp->create_filter("EXTENDED_TCL");
+   } catch (CORBA::COMM_FAILURE& ex) {
+-    cerr << obj_name << ": Caught COMM_FAILURE obtaining filter object" << endl;
++    std::cerr << obj_name << ": Caught COMM_FAILURE obtaining filter object" << std::endl;
+     return 1; // error
+   } catch (...) {
+-    cerr << obj_name << ": Caught exception obtaining filter object" << endl;
++    std::cerr << obj_name << ": Caught exception obtaining filter object" << std::endl;
+     return 1; // error
+   }
+-  if (verbose) cout << obj_name << ": Obtained filter from default filter factory" << endl;
++  if (verbose) std::cout << obj_name << ": Obtained filter from default filter factory" << std::endl;
+   // Construct a simple constraint expression; add it to fadmin
+   CosNF::ConstraintExpSeq   exp;
+@@ -327,29 +327,29 @@
+   exp[0].constraint_expr = CORBA::string_dup("true");
+   CORBA::Boolean res = 0; // OK
+   try {
+-    if (verbose) cout << obj_name << ": Adding initial dummy constraint to filter" << endl;
++    if (verbose) std::cout << obj_name << ": Adding initial dummy constraint to filter" << std::endl;
+     if (verbose) {
+-      cout << obj_name << ": Adding constraint with dummy type Type_XXX and constraint \"true\" to filter" << endl;
++      std::cout << obj_name << ": Adding constraint with dummy type Type_XXX and constraint \"true\" to filter" << std::endl;
+     }
+     filter->add_constraints(exp);
+-    if (verbose) cout << obj_name << ": Adding filter to target" << endl;
++    if (verbose) std::cout << obj_name << ": Adding filter to target" << std::endl;
+     fadmin->add_filter(filter);
+     for (int i = 0; i < 512; i++) {
+       char buf[1024];
+       sprintf(buf, "Type_%03d", i);
+       exp[0].event_types[0].type_name = CORBA::string_dup(buf);
+       if (verbose) {
+-      cout << obj_name << ": Adding constraint with type " << buf << " and constraint \"true\" to filter" << endl;
++      std::cout << obj_name << ": Adding constraint with type " << buf << " and constraint \"true\" to filter" << std::endl;
+       }
+       filter->add_constraints(exp);
+     }
+   }
+   catch(CosNF::InvalidConstraint& _exobj1) {
+-    cerr << obj_name << ": Exception thrown : Invalid constraint given" << endl;
++    std::cerr << obj_name << ": Exception thrown : Invalid constraint given" << std::endl;
+     res = 1; // error
+   }
+   catch (...) {
+-    cerr << obj_name << ": Exception thrown while adding constraint/filter" << endl; 
++    std::cerr << obj_name << ": Exception thrown while adding constraint/filter" << std::endl; 
+     res = 1; // error
+   }
+@@ -445,16 +445,16 @@
+       _my_proxy->obtain_offered_types(CosNA::NONE_NOW_UPDATES_OFF);
+     }
+   } catch (CORBA::BAD_PARAM& ex) {
+-    cerr << _obj_name << ": BAD_PARAM Exception while connecting" << endl;
++    std::cerr << _obj_name << ": BAD_PARAM Exception while connecting" << std::endl;
+     return 1; // error
+   } catch (CosEvCA::AlreadyConnected& ex) {
+-    cerr << _obj_name << ": Already connected" << endl;
++    std::cerr << _obj_name << ": Already connected" << std::endl;
+     return 1; // error
+   } catch (...) {
+-    cerr << _obj_name << ": Failed to connect" << endl;
++    std::cerr << _obj_name << ": Failed to connect" << std::endl;
+     return 1; // error
+   }
+-  if (_verbose) cout << _obj_name << ": Connected to proxy, ready to consume events" << endl;
++  if (_verbose) std::cout << _obj_name << ": Connected to proxy, ready to consume events" << std::endl;
+   // if _millisecs is set, spawn a thread to ping the proxy
+   if (_millisecs)
+     _worker = new GenericBoundWorkerThread(this);
+@@ -466,11 +466,11 @@
+   { // introduce lock scope
+     TW_SCOPE_LOCK(lock, _oplock, "PushConsumer", "PushConsumer_i::cleanup");
+     if (_worker || (!_done)) {
+-      cerr << "Coding error: only call c->cleanup() after c->wait_done()" << endl;
++      std::cerr << "Coding error: only call c->cleanup() after c->wait_done()" << std::endl;
+       return;
+     }
+     if (CORBA::is_nil(_my_proxy)) {
+-      cerr << "Coding error: cleanup already called?" << endl;
++      std::cerr << "Coding error: cleanup already called?" << std::endl;
+       return;
+     }
+     // this method takes sole ownership of _my_proxy
+@@ -496,7 +496,7 @@
+   { // introduce lock scope
+     TW_SCOPE_LOCK(lock, _oplock, "PushConsumer", "PushConsumer_i::start_working");
+-    if (_verbose && (!_done) && _millisecs) cout << _obj_name << ": Spawned thread entering ping loop" << endl;
++    if (_verbose && (!_done) && _millisecs) std::cout << _obj_name << ": Spawned thread entering ping loop" << std::endl;
+     while ( 1 ) {
+       if (_done || (_millisecs == 0)) break;
+       unsigned long t_secs = 0, t_nanosecs = 0;
+@@ -518,7 +518,7 @@
+       continue; // continue ping loop
+     com_fail:
+       if (_done) break;
+-      if (_verbose) cout << _obj_name << ": communication error while pinging proxy using MyType()" << endl;
++      if (_verbose) std::cout << _obj_name << ": communication error while pinging proxy using MyType()" << std::endl;
+       _done = 1;
+       _finish.broadcast();
+       _com_err = 1;
+@@ -538,16 +538,16 @@
+   _num_events++;
+   if (_consume_fn)
+     (*_consume_fn)(data, _obj_name, _num_events, _verbose);
+-  else if (_verbose) cout << _obj_name << ": event count = " << _num_events << endl;
++  else if (_verbose) std::cout << _obj_name << ": event count = " << _num_events << std::endl;
+   if (_max_events && (_num_events >= _max_events)) {
+-    if (_verbose) cout << _obj_name << ": DONE [max_events reached]" << endl;
++    if (_verbose) std::cout << _obj_name << ": DONE [max_events reached]" << std::endl;
+     _done = 1;
+     _finish.broadcast();
+   }
+   if (!_done && _delay_millisecs) {
+     unsigned long d_secs     =  _delay_millisecs / 1000;
+     unsigned long d_nanosecs = (_delay_millisecs % 1000) * 1000000;
+-    if (_verbose) cout << _obj_name << ": delaying push response for " << _delay_millisecs << " millisecs" << endl;
++    if (_verbose) std::cout << _obj_name << ": delaying push response for " << _delay_millisecs << " millisecs" << std::endl;
+     unsigned long t_secs, t_nanosecs;
+     TW_GET_TIME(&t_secs, &t_nanosecs, d_secs, d_nanosecs);
+     _finish.timedwait(t_secs, t_nanosecs);
+@@ -560,7 +560,7 @@
+   TW_SCOPE_LOCK(lock, _oplock, "PushConsumer", "PushConsumer_i::disconnect_push_consumer");
+   if (_done) return;
+-  if (_verbose) cout << _obj_name << ": disconnected" << endl;
++  if (_verbose) std::cout << _obj_name << ": disconnected" << std::endl;
+   _done = 1;
+   _finish.broadcast();
+ }
+@@ -590,11 +590,11 @@
+   if (_done) return;
+   _num_changes++;
+   if (_change_fn) (*_change_fn)(added, deled, _obj_name, _num_changes, _verbose);
+-  else if (_verbose) cout << _obj_name << ": offer_change received [# " << _num_changes << "]" << endl;
++  else if (_verbose) std::cout << _obj_name << ": offer_change received [# " << _num_changes << "]" << std::endl;
+   if (!_done && _delay_millisecs) {
+     unsigned long d_secs     =  _delay_millisecs / 1000;
+     unsigned long d_nanosecs = (_delay_millisecs % 1000) * 1000000;
+-    if (_verbose) cout << _obj_name << ": delaying offer_change response for " << _delay_millisecs << " millisecs" << endl;
++    if (_verbose) std::cout << _obj_name << ": delaying offer_change response for " << _delay_millisecs << " millisecs" << std::endl;
+     unsigned long t_secs, t_nanosecs;
+     TW_GET_TIME(&t_secs, &t_nanosecs, d_secs, d_nanosecs);
+     _finish.timedwait(t_secs, t_nanosecs);
+@@ -678,16 +678,16 @@
+       _my_proxy->obtain_offered_types(CosNA::NONE_NOW_UPDATES_OFF);
+     }
+   } catch (CORBA::BAD_PARAM& ex) {
+-    cerr << _obj_name << ": BAD_PARAM Exception while connecting" << endl;
++    std::cerr << _obj_name << ": BAD_PARAM Exception while connecting" << std::endl;
+     return 1; // error
+   } catch (CosEvCA::AlreadyConnected& ex) {
+-    cerr << _obj_name << ": Already connected" << endl;
++    std::cerr << _obj_name << ": Already connected" << std::endl;
+     return 1; // error
+   } catch (...) {
+-    cerr << _obj_name << ": Failed to connect" << endl;
++    std::cerr << _obj_name << ": Failed to connect" << std::endl;
+     return 1; // error
+   }
+-  if (_verbose) cout << _obj_name << ": Connected to proxy, ready to consume events" << endl; 
++  if (_verbose) std::cout << _obj_name << ": Connected to proxy, ready to consume events" << std::endl; 
+   // if _millisecs is set, spawn a thread to ping the proxy
+   if (_millisecs) 
+     _worker = new GenericBoundWorkerThread(this);
+@@ -699,11 +699,11 @@
+   { // introduce lock scope
+     TW_SCOPE_LOCK(lock, _oplock, "StructuredPushConsumer", "StructuredPushConsumer_i::cleanup");
+     if (_worker || (!_done)) {
+-      cerr << "Coding error: only call c->cleanup() after c->wait_done()" << endl;
++      std::cerr << "Coding error: only call c->cleanup() after c->wait_done()" << std::endl;
+       return;
+     }
+     if (CORBA::is_nil(_my_proxy)) {
+-      cerr << "Coding error: cleanup already called?" << endl;
++      std::cerr << "Coding error: cleanup already called?" << std::endl;
+       return;
+     }
+     // this method takes sole ownership of _my_proxy ref
+@@ -730,7 +730,7 @@
+   { // introduce lock scope
+     TW_SCOPE_LOCK(lock, _oplock, "StructuredPushConsumer", "StructuredPushConsumer_i::start_working");
+-    if (_verbose && (!_done) && _millisecs) cout << _obj_name << ": Spawned thread entering ping loop" << endl;
++    if (_verbose && (!_done) && _millisecs) std::cout << _obj_name << ": Spawned thread entering ping loop" << std::endl;
+     while ( 1 ) {
+       if (_done || (_millisecs == 0)) break;
+       unsigned long t_secs = 0, t_nanosecs = 0;
+@@ -752,7 +752,7 @@
+       continue; // continue ping loop
+     com_fail:
+       if (_done) break;
+-      if (_verbose) cout << _obj_name << ": communication error while pinging proxy using MyType()" << endl;
++      if (_verbose) std::cout << _obj_name << ": communication error while pinging proxy using MyType()" << std::endl;
+       _done = 1;
+       _finish.broadcast();
+       _com_err = 1;
+@@ -771,16 +771,16 @@
+   _num_events++;
+   if (_consume_fn)
+     (*_consume_fn)(data, _obj_name, _num_events, _verbose);
+-  else if (_verbose) cout << _obj_name << ": event count = " << _num_events << endl;
++  else if (_verbose) std::cout << _obj_name << ": event count = " << _num_events << std::endl;
+   if (_max_events && (_num_events >= _max_events)) {
+-    if (_verbose) cout << _obj_name << ": DONE [max_events reached]" << endl;
++    if (_verbose) std::cout << _obj_name << ": DONE [max_events reached]" << std::endl;
+     _done = 1;
+     _finish.broadcast();
+   }
+   if (!_done && _delay_millisecs) {
+     unsigned long d_secs     =  _delay_millisecs / 1000;
+     unsigned long d_nanosecs = (_delay_millisecs % 1000) * 1000000;
+-    if (_verbose) cout << _obj_name << ": delaying push_structured_event response for " << _delay_millisecs << " millisecs" << endl;
++    if (_verbose) std::cout << _obj_name << ": delaying push_structured_event response for " << _delay_millisecs << " millisecs" << std::endl;
+     unsigned long t_secs, t_nanosecs;
+     TW_GET_TIME(&t_secs, &t_nanosecs, d_secs, d_nanosecs);
+     _finish.timedwait(t_secs, t_nanosecs);
+@@ -793,7 +793,7 @@
+   TW_SCOPE_LOCK(lock, _oplock, "StructuredPushConsumer", "StructuredPushConsumer_i::disconnect_structured_push_consumer");
+   if (_done) return;
+-  if (_verbose) cout << _obj_name << ": disconnected" << endl;
++  if (_verbose) std::cout << _obj_name << ": disconnected" << std::endl;
+   _done = 1;
+   _finish.broadcast();
+ }
+@@ -823,11 +823,11 @@
+   if (_done) return;
+   _num_changes++;
+   if (_change_fn) (*_change_fn)(added, deled, _obj_name, _num_changes, _verbose);
+-  else if (_verbose) cout << _obj_name << ": offer_change received [# " << _num_changes << "]" << endl;
++  else if (_verbose) std::cout << _obj_name << ": offer_change received [# " << _num_changes << "]" << std::endl;
+   if (!_done && _delay_millisecs) {
+     unsigned long d_secs     =  _delay_millisecs / 1000;
+     unsigned long d_nanosecs = (_delay_millisecs % 1000) * 1000000;
+-    if (_verbose) cout << _obj_name << ": delaying offer_change response for " << _delay_millisecs << " millisecs" << endl;
++    if (_verbose) std::cout << _obj_name << ": delaying offer_change response for " << _delay_millisecs << " millisecs" << std::endl;
+     unsigned long t_secs, t_nanosecs;
+     TW_GET_TIME(&t_secs, &t_nanosecs, d_secs, d_nanosecs);
+     _finish.timedwait(t_secs, t_nanosecs);
+@@ -922,16 +922,16 @@
+       _my_proxy->obtain_offered_types(CosNA::NONE_NOW_UPDATES_OFF);
+     }
+   } catch (CORBA::BAD_PARAM& ex) {
+-    cerr << _obj_name << ": BAD_PARAM Exception while connecting" << endl;
++    std::cerr << _obj_name << ": BAD_PARAM Exception while connecting" << std::endl;
+     return 1; // error
+   } catch (CosEvCA::AlreadyConnected& ex) {
+-    cerr << _obj_name << ": Already connected" << endl;
++    std::cerr << _obj_name << ": Already connected" << std::endl;
+     return 1; // error
+   } catch (...) {
+-    cerr << _obj_name << ": Failed to connect" << endl;
++    std::cerr << _obj_name << ": Failed to connect" << std::endl;
+     return 1; // error
+   }
+-  if (_verbose) cout << _obj_name << ": Connected to proxy, ready to consume events" << endl; 
++  if (_verbose) std::cout << _obj_name << ": Connected to proxy, ready to consume events" << std::endl; 
+   // if _millisecs is set, spawn a thread to ping the proxy
+   if (_millisecs) 
+     _worker = new GenericBoundWorkerThread(this);
+@@ -943,11 +943,11 @@
+   { // introduce lock scope
+     TW_SCOPE_LOCK(lock, _oplock, "Structured512PushConsumer", "Structured512PushConsumer_i::cleanup");
+     if (_worker || (!_done)) {
+-      cerr << "Coding error: only call c->cleanup() after c->wait_done()" << endl;
++      std::cerr << "Coding error: only call c->cleanup() after c->wait_done()" << std::endl;
+       return;
+     }
+     if (CORBA::is_nil(_my_proxy)) {
+-      cerr << "Coding error: cleanup already called?" << endl;
++      std::cerr << "Coding error: cleanup already called?" << std::endl;
+       return;
+     }
+     // this method takes sole ownership of _my_proxy ref
+@@ -974,7 +974,7 @@
+   { // introduce lock scope
+     TW_SCOPE_LOCK(lock, _oplock, "Structured512PushConsumer", "Structured512PushConsumer_i::start_working");
+-    if (_verbose && (!_done) && _millisecs) cout << _obj_name << ": Spawned thread entering ping loop" << endl;
++    if (_verbose && (!_done) && _millisecs) std::cout << _obj_name << ": Spawned thread entering ping loop" << std::endl;
+     // invariant: _oplock held at top of loop
+     while ( 1 ) {
+       if (_done || (_millisecs == 0)) break;
+@@ -997,7 +997,7 @@
+       continue; // continue ping loop
+     com_fail:
+       if (_done) break;
+-      if (_verbose) cout << _obj_name << ": communication error while pinging proxy using MyType()" << endl;
++      if (_verbose) std::cout << _obj_name << ": communication error while pinging proxy using MyType()" << std::endl;
+       _done = 1;
+       _finish.broadcast();
+       _com_err = 1;
+@@ -1016,16 +1016,16 @@
+   _num_events++;
+   if (_consume_fn)
+     (*_consume_fn)(data, _obj_name, _num_events, _verbose);
+-  else if (_verbose) cout << _obj_name << ": event count = " << _num_events << endl;
++  else if (_verbose) std::cout << _obj_name << ": event count = " << _num_events << std::endl;
+   if (_max_events && (_num_events >= _max_events)) {
+-    if (_verbose) cout << _obj_name << ": DONE [max_events reached]" << endl;
++    if (_verbose) std::cout << _obj_name << ": DONE [max_events reached]" << std::endl;
+     _done = 1;
+     _finish.broadcast();
+   }
+   if (!_done && _delay_millisecs) {
+     unsigned long d_secs     =  _delay_millisecs / 1000;
+     unsigned long d_nanosecs = (_delay_millisecs % 1000) * 1000000;
+-    if (_verbose) cout << _obj_name << ": delaying push_structured_event response for " << _delay_millisecs << " millisecs" << endl;
++    if (_verbose) std::cout << _obj_name << ": delaying push_structured_event response for " << _delay_millisecs << " millisecs" << std::endl;
+     unsigned long t_secs, t_nanosecs;
+     TW_GET_TIME(&t_secs, &t_nanosecs, d_secs, d_nanosecs);
+     _finish.timedwait(t_secs, t_nanosecs);
+@@ -1038,7 +1038,7 @@
+   TW_SCOPE_LOCK(lock, _oplock, "Structured512PushConsumer", "Structured512PushConsumer_i::disconnect_structured_push_consumer");
+   if (_done) return;
+-  if (_verbose) cout << _obj_name << ": disconnected" << endl;
++  if (_verbose) std::cout << _obj_name << ": disconnected" << std::endl;
+   _done = 1;
+   _finish.broadcast();
+ }
+@@ -1068,11 +1068,11 @@
+   if (_done) return;
+   _num_changes++;
+   if (_change_fn) (*_change_fn)(added, deled, _obj_name, _num_changes, _verbose);
+-  else if (_verbose) cout << _obj_name << ": offer_change received [# " << _num_changes << "]" << endl;
++  else if (_verbose) std::cout << _obj_name << ": offer_change received [# " << _num_changes << "]" << std::endl;
+   if (!_done && _delay_millisecs) {
+     unsigned long d_secs     =  _delay_millisecs / 1000;
+     unsigned long d_nanosecs = (_delay_millisecs % 1000) * 1000000;
+-    if (_verbose) cout << _obj_name << ": delaying offer_change response for " << _delay_millisecs << " millisecs" << endl;
++    if (_verbose) std::cout << _obj_name << ": delaying offer_change response for " << _delay_millisecs << " millisecs" << std::endl;
+     unsigned long t_secs, t_nanosecs;
+     TW_GET_TIME(&t_secs, &t_nanosecs, d_secs, d_nanosecs);
+     _finish.timedwait(t_secs, t_nanosecs);
+@@ -1155,16 +1155,16 @@
+       _my_proxy->obtain_offered_types(CosNA::NONE_NOW_UPDATES_OFF);
+     }
+   } catch (CORBA::BAD_PARAM& ex) {
+-    cerr << _obj_name << ": BAD_PARAM Exception while connecting" << endl;
++    std::cerr << _obj_name << ": BAD_PARAM Exception while connecting" << std::endl;
+     return 1; // error
+   } catch (CosEvCA::AlreadyConnected& ex) {
+-    cerr << _obj_name << ": Already connected" << endl;
++    std::cerr << _obj_name << ": Already connected" << std::endl;
+     return 1; // error
+   } catch (...) {
+-    cerr << _obj_name << ": Failed to connect" << endl;
++    std::cerr << _obj_name << ": Failed to connect" << std::endl;
+     return 1; // error
+   }
+-  if (_verbose) cout << _obj_name << ": Connected to proxy, ready to consume events" << endl; 
++  if (_verbose) std::cout << _obj_name << ": Connected to proxy, ready to consume events" << std::endl; 
+   // if _millisecs is set, spawn a thread to ping the proxy
+   if (_millisecs)
+     _worker = new GenericBoundWorkerThread(this);
+@@ -1176,11 +1176,11 @@
+   { // introduce lock scope
+     TW_SCOPE_LOCK(lock, _oplock, "SequencePushConsumer", "SequencePushConsumer_i::cleanup");
+     if (_worker || (!_done)) {
+-      cerr << "Coding error: only call c->cleanup() after c->wait_done()" << endl;
++      std::cerr << "Coding error: only call c->cleanup() after c->wait_done()" << std::endl;
+       return;
+     }
+     if (CORBA::is_nil(_my_proxy)) {
+-      cerr << "Coding error: cleanup already called?" << endl;
++      std::cerr << "Coding error: cleanup already called?" << std::endl;
+       return;
+     }
+     // this method takes sole ownership of _my_proxy ref
+@@ -1207,7 +1207,7 @@
+   { // introduce lock scope
+     TW_SCOPE_LOCK(lock, _oplock, "SequencePushConsumer", "SequencePushConsumer_i::start_working");
+-    if (_verbose && (!_done) && _millisecs) cout << _obj_name << ": Spawned thread entering ping loop" << endl;
++    if (_verbose && (!_done) && _millisecs) std::cout << _obj_name << ": Spawned thread entering ping loop" << std::endl;
+     // invariant: _oplock held at top of loop
+     while ( 1 ) {
+       if (_done || (_millisecs == 0)) break;
+@@ -1230,7 +1230,7 @@
+       continue; // continue ping loop
+     com_fail:
+       if (_done) break;
+-      if (_verbose) cout << _obj_name << ": communication error while pinging proxy using MyType()" << endl;
++      if (_verbose) std::cout << _obj_name << ": communication error while pinging proxy using MyType()" << std::endl;
+       _done = 1;
+       _finish.broadcast();
+       _com_err = 1;
+@@ -1250,16 +1250,16 @@
+   _num_events += data.length();
+   if (_consume_fn)
+     (*_consume_fn)(data, _obj_name, _num_events, _num_batches, _verbose);
+-  else if (_verbose) cout << _obj_name << ": event count = " << _num_events << " batch count = " << _num_batches << endl;
++  else if (_verbose) std::cout << _obj_name << ": event count = " << _num_events << " batch count = " << _num_batches << std::endl;
+   if (_max_events && (_num_events >= _max_events)) {
+-    if (_verbose) cout << _obj_name << ": DONE [max_events reached]" << endl;
++    if (_verbose) std::cout << _obj_name << ": DONE [max_events reached]" << std::endl;
+     _done = 1;
+     _finish.broadcast();
+   }
+   if (!_done && _delay_millisecs) {
+     unsigned long d_secs     =  _delay_millisecs / 1000;
+     unsigned long d_nanosecs = (_delay_millisecs % 1000) * 1000000;
+-    if (_verbose) cout << _obj_name << ": delaying push_structured_events response for " << _delay_millisecs << " millisecs" << endl;
++    if (_verbose) std::cout << _obj_name << ": delaying push_structured_events response for " << _delay_millisecs << " millisecs" << std::endl;
+     unsigned long t_secs, t_nanosecs;
+     TW_GET_TIME(&t_secs, &t_nanosecs, d_secs, d_nanosecs);
+     _finish.timedwait(t_secs, t_nanosecs);
+@@ -1272,7 +1272,7 @@
+   TW_SCOPE_LOCK(lock, _oplock, "SequencePushConsumer", "SequencePushConsumer_i::disconnect_sequence_push_consumer");
+   if (_done) return;
+-  if (_verbose) cout << _obj_name << ": disconnected" << endl;
++  if (_verbose) std::cout << _obj_name << ": disconnected" << std::endl;
+   _done = 1;
+   _finish.broadcast();
+ }
+@@ -1302,11 +1302,11 @@
+   if (_done) return;
+   _num_changes++;
+   if (_change_fn) (*_change_fn)(added, deled, _obj_name, _num_changes, _verbose);
+-  else if (_verbose) cout << _obj_name << ": offer_change received [# " << _num_changes << "]" << endl;
++  else if (_verbose) std::cout << _obj_name << ": offer_change received [# " << _num_changes << "]" << std::endl;
+   if (!_done && _delay_millisecs) {
+     unsigned long d_secs     =  _delay_millisecs / 1000;
+     unsigned long d_nanosecs = (_delay_millisecs % 1000) * 1000000;
+-    if (_verbose) cout << _obj_name << ": delaying offer_change response for " << _delay_millisecs << " millisecs" << endl;
++    if (_verbose) std::cout << _obj_name << ": delaying offer_change response for " << _delay_millisecs << " millisecs" << std::endl;
+     unsigned long t_secs, t_nanosecs;
+     TW_GET_TIME(&t_secs, &t_nanosecs, d_secs, d_nanosecs);
+     _finish.timedwait(t_secs, t_nanosecs);
+@@ -1393,17 +1393,17 @@
+       _my_proxy->obtain_offered_types(CosNA::NONE_NOW_UPDATES_OFF);
+     }
+   } catch (CORBA::BAD_PARAM& ex) {
+-    cerr << _obj_name << ": BAD_PARAM Exception while connecting" << endl;
++    std::cerr << _obj_name << ": BAD_PARAM Exception while connecting" << std::endl;
+     return 1; // error
+   } catch (CosEvCA::AlreadyConnected& ex) {
+-    cerr << _obj_name << ": Already connected" << endl;
++    std::cerr << _obj_name << ": Already connected" << std::endl;
+     return 1; // error
+   } catch (...) {
+-    cerr << _obj_name << ": Failed to connect" << endl;
++    std::cerr << _obj_name << ": Failed to connect" << std::endl;
+     return 1; // error
+   }
+   // spawn a thread to do pulling
+-  if (_verbose) cout << _obj_name << ": Connected to proxy, ready to consume events" << endl; 
++  if (_verbose) std::cout << _obj_name << ": Connected to proxy, ready to consume events" << std::endl; 
+   _worker = new GenericBoundWorkerThread(this);
+   return 0; // OK
+ }
+@@ -1413,11 +1413,11 @@
+   { // introduce lock scope
+     TW_SCOPE_LOCK(lock, _oplock, "PullConsumer", "PullConsumer_i::cleanup");
+     if (_worker || (!_done)) {
+-      cerr << "Coding error: only call c->cleanup() after c->wait_done()" << endl;
++      std::cerr << "Coding error: only call c->cleanup() after c->wait_done()" << std::endl;
+       return;
+     }
+     if (CORBA::is_nil(_my_proxy)) {
+-      cerr << "Coding error: cleanup already called?" << endl;
++      std::cerr << "Coding error: cleanup already called?" << std::endl;
+       return;
+     }
+     // this method takes sole ownership of _my_proxy ref
+@@ -1450,7 +1450,7 @@
+   { // introduce lock scope
+     TW_SCOPE_LOCK(lock, _oplock, "PullConsumer", "PullConsumer_i::start_working");
+-    if (_verbose && (!_done)) cout << _obj_name << ": Spawned thread entering main pull loop" << endl;
++    if (_verbose && (!_done)) std::cout << _obj_name << ": Spawned thread entering main pull loop" << std::endl;
+     while ( 1 ) {
+       if (_done) break; // must have disconnected
+       { // introduce temporary lock release scope; do not hold oplock across pull
+@@ -1463,7 +1463,7 @@
+       } // end temporary lock release scope
+       if (_done) break; // must have disconnected during pull
+       if (!data) {
+-      if (_verbose) cout << _obj_name << ": strange failure: pull() returned nil" << endl;
++      if (_verbose) std::cout << _obj_name << ": strange failure: pull() returned nil" << std::endl;
+       _com_err = 1;
+       break; // break from while loop -- done
+       }
+@@ -1471,11 +1471,11 @@
+       _num_events++;
+       if (_consume_fn)
+       (*_consume_fn)(*data, _obj_name, _num_events, _verbose);
+-      else if (_verbose) cout << _obj_name << ": event count = " << _num_events << endl;
++      else if (_verbose) std::cout << _obj_name << ": event count = " << _num_events << std::endl;
+       delete data;
+       data = 0;
+       if (_max_events && (_num_events >= _max_events)) {
+-      if (_verbose) cout << _obj_name << ": DONE [max_events reached]" << endl;
++      if (_verbose) std::cout << _obj_name << ": DONE [max_events reached]" << std::endl;
+       break; // done 
+       }
+       if (_millisecs) { // sleep for specified interval
+@@ -1490,7 +1490,7 @@
+       continue; // continue pulling
+     com_fail:
+       if (_done) break;
+-      if (_verbose) cout << _obj_name << ": communication error while calling pull()" << endl;
++      if (_verbose) std::cout << _obj_name << ": communication error while calling pull()" << std::endl;
+       _com_err = 1;
+       break;
+     } // end while loop
+@@ -1510,7 +1510,7 @@
+   TW_SCOPE_LOCK(lock, _oplock, "PullConsumer", "PullConsumer_i::disconnect_pull_consumer");
+   if (_done) return;
+-  if (_verbose) cout << _obj_name << ": disconnected" << endl;
++  if (_verbose) std::cout << _obj_name << ": disconnected" << std::endl;
+   _done = 1;
+   _finish.broadcast();
+ }
+@@ -1540,11 +1540,11 @@
+   if (_done) return;
+   _num_changes++;
+   if (_change_fn) (*_change_fn)(added, deled, _obj_name, _num_changes, _verbose);
+-  else if (_verbose) cout << _obj_name << ": offer_change received [# " << _num_changes << "]" << endl;
++  else if (_verbose) std::cout << _obj_name << ": offer_change received [# " << _num_changes << "]" << std::endl;
+   if (!_done && _delay_millisecs) {
+     unsigned long d_secs     =  _delay_millisecs / 1000;
+     unsigned long d_nanosecs = (_delay_millisecs % 1000) * 1000000;
+-    if (_verbose) cout << _obj_name << ": delaying offer_change response for " << _delay_millisecs << " millisecs" << endl;
++    if (_verbose) std::cout << _obj_name << ": delaying offer_change response for " << _delay_millisecs << " millisecs" << std::endl;
+     unsigned long t_secs, t_nanosecs;
+     TW_GET_TIME(&t_secs, &t_nanosecs, d_secs, d_nanosecs);
+     _finish.timedwait(t_secs, t_nanosecs);
+@@ -1629,17 +1629,17 @@
+       _my_proxy->obtain_offered_types(CosNA::NONE_NOW_UPDATES_OFF);
+     }
+   } catch (CORBA::BAD_PARAM& ex) {
+-    cerr << _obj_name << ": BAD_PARAM Exception while connecting" << endl;
++    std::cerr << _obj_name << ": BAD_PARAM Exception while connecting" << std::endl;
+     return 1; // error
+   } catch (CosEvCA::AlreadyConnected& ex) {
+-    cerr << _obj_name << ": Already connected" << endl;
++    std::cerr << _obj_name << ": Already connected" << std::endl;
+     return 1; // error
+   } catch (...) {
+-    cerr << _obj_name << ": Failed to connect" << endl;
++    std::cerr << _obj_name << ": Failed to connect" << std::endl;
+     return 1; // error
+   }
+   // spawn a thread to do pulling
+-  if (_verbose) cout << _obj_name << ": Connected to proxy, ready to consume events" << endl; 
++  if (_verbose) std::cout << _obj_name << ": Connected to proxy, ready to consume events" << std::endl; 
+   _worker = new GenericBoundWorkerThread(this);
+   return 0; // OK
+ }
+@@ -1649,11 +1649,11 @@
+   { // introduce lock scope
+     TW_SCOPE_LOCK(lock, _oplock, "StructuredPullConsumer", "StructuredPullConsumer_i::cleanup");
+     if (_worker || (!_done)) {
+-      cerr << "Coding error: only call c->cleanup() after c->wait_done()" << endl;
++      std::cerr << "Coding error: only call c->cleanup() after c->wait_done()" << std::endl;
+       return;
+     }
+     if (CORBA::is_nil(_my_proxy)) {
+-      cerr << "Coding error: cleanup already called?" << endl;
++      std::cerr << "Coding error: cleanup already called?" << std::endl;
+       return;
+     }
+     // this method takes sole ownership of _my_proxy ref
+@@ -1686,7 +1686,7 @@
+   { // introduce lock scope
+     TW_SCOPE_LOCK(lock, _oplock, "StructuredPullConsumer", "StructuredPullConsumer_i::start_working");
+-    if (_verbose && (!_done)) cout << _obj_name << ": Spawned thread entering main pull loop" << endl;
++    if (_verbose && (!_done)) std::cout << _obj_name << ": Spawned thread entering main pull loop" << std::endl;
+     while ( 1 ) {
+       if (_done) break; // must have disconnected
+       { // introduce temporary lock release scope; do not hold oplock across pull
+@@ -1699,7 +1699,7 @@
+       } // end temporary lock release scope
+       if (_done) break; // must have disconnected during pull
+       if (!data) {
+-      if (_verbose) cout << _obj_name << ": strange failure: pull_structured_event() returned nil" << endl;
++      if (_verbose) std::cout << _obj_name << ": strange failure: pull_structured_event() returned nil" << std::endl;
+       _com_err = 1;
+       break; // break from while loop -- done
+       }
+@@ -1707,11 +1707,11 @@
+       _num_events++;
+       if (_consume_fn)
+       (*_consume_fn)(*data, _obj_name, _num_events, _verbose);
+-      else if (_verbose) cout << _obj_name << ": event count = " << _num_events << endl;
++      else if (_verbose) std::cout << _obj_name << ": event count = " << _num_events << std::endl;
+       delete data;
+       data = 0;
+       if (_max_events && (_num_events >= _max_events)) {
+-      if (_verbose) cout << _obj_name << ": DONE [max_events reached]" << endl;
++      if (_verbose) std::cout << _obj_name << ": DONE [max_events reached]" << std::endl;
+       break; // done
+       }
+       if (_millisecs) { // sleep for specified interval
+@@ -1726,7 +1726,7 @@
+       continue; // continue pulling
+     com_fail:
+       if (_done) break; // must have disconnected during pull
+-      if (_verbose) cout << _obj_name << ": communication error while calling pull_structured_event()" << endl;
++      if (_verbose) std::cout << _obj_name << ": communication error while calling pull_structured_event()" << std::endl;
+       _com_err = 1;
+       break; // break from while loop -- done
+     } // end while loop
+@@ -1747,7 +1747,7 @@
+   TW_SCOPE_LOCK(lock, _oplock, "StructuredPullConsumer", "StructuredPullConsumer_i::disconnect_structured_pull_consumer");
+   if (_done) return;
+-  if (_verbose) cout << _obj_name << ": disconnected" << endl;
++  if (_verbose) std::cout << _obj_name << ": disconnected" << std::endl;
+   _done = 1;
+   _finish.broadcast();
+ }
+@@ -1777,11 +1777,11 @@
+   if (_done) return;
+   _num_changes++;
+   if (_change_fn) (*_change_fn)(added, deled, _obj_name, _num_changes, _verbose);
+-  else if (_verbose) cout << _obj_name << ": offer_change received [# " << _num_changes << "]" << endl;
++  else if (_verbose) std::cout << _obj_name << ": offer_change received [# " << _num_changes << "]" << std::endl;
+   if (!_done && _delay_millisecs) {
+     unsigned long d_secs     =  _delay_millisecs / 1000;
+     unsigned long d_nanosecs = (_delay_millisecs % 1000) * 1000000;
+-    if (_verbose) cout << _obj_name << ": delaying offer_change response for " << _delay_millisecs << " millisecs" << endl;
++    if (_verbose) std::cout << _obj_name << ": delaying offer_change response for " << _delay_millisecs << " millisecs" << std::endl;
+     unsigned long t_secs, t_nanosecs;
+     TW_GET_TIME(&t_secs, &t_nanosecs, d_secs, d_nanosecs);
+     _finish.timedwait(t_secs, t_nanosecs);
+@@ -1865,17 +1865,17 @@
+       _my_proxy->obtain_offered_types(CosNA::NONE_NOW_UPDATES_OFF);
+     }
+   } catch (CORBA::BAD_PARAM& ex) {
+-    cerr << _obj_name << ": BAD_PARAM Exception while connecting" << endl;
++    std::cerr << _obj_name << ": BAD_PARAM Exception while connecting" << std::endl;
+     return 1; // error
+   } catch (CosEvCA::AlreadyConnected& ex) {
+-    cerr << _obj_name << ": Already connected" << endl;
++    std::cerr << _obj_name << ": Already connected" << std::endl;
+     return 1; // error
+   } catch (...) {
+-    cerr << _obj_name << ": Failed to connect" << endl;
++    std::cerr << _obj_name << ": Failed to connect" << std::endl;
+     return 1; // error
+   }
+   // spawn a thread to do pulling
+-  if (_verbose) cout << _obj_name << ": Connected to proxy, ready to consume events" << endl; 
++  if (_verbose) std::cout << _obj_name << ": Connected to proxy, ready to consume events" << std::endl; 
+   _worker = new GenericBoundWorkerThread(this);
+   return 0; // OK
+ }
+@@ -1885,11 +1885,11 @@
+   { // introduce lock scope
+     TW_SCOPE_LOCK(lock, _oplock, "SequencePullConsumer", "SequencePullConsumer_i::connect");
+     if (_worker || (!_done)) {
+-      cerr << "Coding error: only call c->cleanup() after c->wait_done()" << endl;
++      std::cerr << "Coding error: only call c->cleanup() after c->wait_done()" << std::endl;
+       return;
+     }
+     if (CORBA::is_nil(_my_proxy)) {
+-      cerr << "Coding error: cleanup already called?" << endl;
++      std::cerr << "Coding error: cleanup already called?" << std::endl;
+       return;
+     }
+     // this method takes sole ownership of _my_proxy ref
+@@ -1922,7 +1922,7 @@
+   { // introduce lock scope
+     TW_SCOPE_LOCK(lock, _oplock, "SequencePullConsumer", "SequencePullConsumer_i::start_working");
+-    if (_verbose && (!_done)) cout << _obj_name << ": Spawned thread entering main pull loop" << endl;
++    if (_verbose && (!_done)) std::cout << _obj_name << ": Spawned thread entering main pull loop" << std::endl;
+     while ( 1 ) {
+       if (_done) break; // must have disconnected
+       { // introduce temporary lock release scope; do not hold oplock across pull
+@@ -1935,7 +1935,7 @@
+       } // end temporary lock release scope
+       if (_done) break; // must have disconnected during pull
+       if (!data) {
+-      if (_verbose) cout << _obj_name << ": strange failure: pull_structured_events() returned nil" << endl;
++      if (_verbose) std::cout << _obj_name << ": strange failure: pull_structured_events() returned nil" << std::endl;
+       _com_err = 1;
+       break; // break from while loop -- done
+       }
+@@ -1944,11 +1944,11 @@
+       _num_events += data->length();
+       if (_consume_fn)
+       (*_consume_fn)(*data, _obj_name, _num_events, _num_batches, _verbose);
+-      else if (_verbose) cout << _obj_name << ": event count = " << _num_events << " batch count = " << _num_batches << endl;
++      else if (_verbose) std::cout << _obj_name << ": event count = " << _num_events << " batch count = " << _num_batches << std::endl;
+       delete data;
+       data = 0;
+       if (_max_events && (_num_events >= _max_events)) {
+-      if (_verbose) cout << _obj_name << ": DONE [max_events reached]" << endl;
++      if (_verbose) std::cout << _obj_name << ": DONE [max_events reached]" << std::endl;
+       break; // done
+       }
+       if (_millisecs) { // sleep for specified interval
+@@ -1963,7 +1963,7 @@
+       continue; // continue pulling
+     com_fail:
+       if (_done) break; // must have disconnected during pull
+-      if (_verbose) cout << _obj_name << ": communication error while calling pull_structured_events()" << endl;
++      if (_verbose) std::cout << _obj_name << ": communication error while calling pull_structured_events()" << std::endl;
+       _com_err = 1;
+       break; // break from while loop -- done
+     } // end while loop
+@@ -1983,7 +1983,7 @@
+   TW_SCOPE_LOCK(lock, _oplock, "SequencePullConsumer", "SequencePullConsumer_i::disconnect_sequence_pull_consumer");
+   if (_done) return;
+-  if (_verbose) cout << _obj_name << ": disconnected" << endl;
++  if (_verbose) std::cout << _obj_name << ": disconnected" << std::endl;
+   _done = 1;
+   _finish.broadcast();
+ }
+@@ -2013,11 +2013,11 @@
+   if (_done) return;
+   _num_changes++;
+   if (_change_fn) (*_change_fn)(added, deled, _obj_name, _num_changes, _verbose);
+-  else if (_verbose) cout << _obj_name << ": offer_change received [# " << _num_changes << "]" << endl;
++  else if (_verbose) std::cout << _obj_name << ": offer_change received [# " << _num_changes << "]" << std::endl;
+   if (!_done && _delay_millisecs) {
+     unsigned long d_secs     =  _delay_millisecs / 1000;
+     unsigned long d_nanosecs = (_delay_millisecs % 1000) * 1000000;
+-    if (_verbose) cout << _obj_name << ": delaying offer_change response for " << _delay_millisecs << " millisecs" << endl;
++    if (_verbose) std::cout << _obj_name << ": delaying offer_change response for " << _delay_millisecs << " millisecs" << std::endl;
+     unsigned long t_secs, t_nanosecs;
+     TW_GET_TIME(&t_secs, &t_nanosecs, d_secs, d_nanosecs);
+     _finish.timedwait(t_secs, t_nanosecs);
+@@ -2115,19 +2115,19 @@
+       _my_proxy->obtain_subscription_types(CosNA::NONE_NOW_UPDATES_OFF);
+     }
+   } catch (CORBA::BAD_PARAM& ex) {
+-    cerr << _obj_name << ": BAD_PARAM Exception while connecting" << endl;
++    std::cerr << _obj_name << ": BAD_PARAM Exception while connecting" << std::endl;
+     return 1; // error
+   } catch (CosEvCA::AlreadyConnected& ex) {
+-    cerr << _obj_name << ": Already connected" << endl;
++    std::cerr << _obj_name << ": Already connected" << std::endl;
+     return 1; // error
+   } catch (...) {
+-    cerr << _obj_name << ": Failed to connect" << endl;
++    std::cerr << _obj_name << ": Failed to connect" << std::endl;
+     return 1; // error
+   }
+   // register the types to be supplied
+   offer_any(_my_proxy, _obj_name, _verbose);
+   // spawn a thread to do pushing
+-  if (_verbose) cout << _obj_name << ": Connected to proxy, ready to supply events" << endl; 
++  if (_verbose) std::cout << _obj_name << ": Connected to proxy, ready to supply events" << std::endl; 
+   _worker = new GenericBoundWorkerThread(this);
+   return 0; // OK
+ }
+@@ -2137,11 +2137,11 @@
+   { // introduce lock scope
+     TW_SCOPE_LOCK(lock, _oplock, "PushSupplier", "PushSupplier_i::cleanup");
+     if (_worker || (!_done)) {
+-      cerr << "Coding error: only call c->cleanup() after c->wait_done()" << endl;
++      std::cerr << "Coding error: only call c->cleanup() after c->wait_done()" << std::endl;
+       return;
+     }
+     if (CORBA::is_nil(_my_proxy)) {
+-      cerr << "Coding error: cleanup already called?" << endl;
++      std::cerr << "Coding error: cleanup already called?" << std::endl;
+       return;
+     }
+     // this method takes sole ownership of _my_proxy ref
+@@ -2174,7 +2174,7 @@
+   { // introduce lock scope
+     TW_SCOPE_LOCK(lock, _oplock, "PushSupplier", "PushSupplier_i::start_working");
+-    if (_verbose && (!_done)) cout << _obj_name << ": Spawned thread entering main push loop" << endl;
++    if (_verbose && (!_done)) std::cout << _obj_name << ": Spawned thread entering main push loop" << std::endl;
+     while ( 1 ) {
+       if (_done) break; // must have disconnected
+       if ((*_supply_fn)(*data, _obj_name, _num_events+1, _verbose)) {
+@@ -2189,7 +2189,7 @@
+       if (_done) break; // must have disconnected during push
+       _num_events++;
+       if (_max_events && (_num_events >= _max_events)) {
+-        if (_verbose) cout << _obj_name << ": DONE [max_events reached]" << endl;
++        if (_verbose) std::cout << _obj_name << ": DONE [max_events reached]" << std::endl;
+         break; // done
+       }
+       }
+@@ -2206,7 +2206,7 @@
+       continue; // continue pushing
+     com_fail:
+       if (_done) break; // must have disconnected during push
+-      if (_verbose) cout << _obj_name << ": communication error while calling push()" << endl;
++      if (_verbose) std::cout << _obj_name << ": communication error while calling push()" << std::endl;
+       _com_err = 1;
+       break; // break from while loop -- done
+     } // end while loop
+@@ -2226,7 +2226,7 @@
+   TW_SCOPE_LOCK(lock, _oplock, "PushSupplier", "PushSupplier_i::disconnect_push_supplier");
+   if (_done) return;
+-  if (_verbose) cout << _obj_name << ": disconnected" << endl;
++  if (_verbose) std::cout << _obj_name << ": disconnected" << std::endl;
+   _done = 1;
+   _finish.broadcast();
+ }
+@@ -2256,11 +2256,11 @@
+   if (_done) return;
+   _num_changes++;
+   if (_change_fn) (*_change_fn)(added, deled, _obj_name, _num_changes, _verbose);
+-  else if (_verbose) cout << _obj_name << ": subscription_change received [# " << _num_changes << "]" << endl;
++  else if (_verbose) std::cout << _obj_name << ": subscription_change received [# " << _num_changes << "]" << std::endl;
+   if (!_done && _delay_millisecs) {
+     unsigned long d_secs     =  _delay_millisecs / 1000;
+     unsigned long d_nanosecs = (_delay_millisecs % 1000) * 1000000;
+-    if (_verbose) cout << _obj_name << ": delaying subscription_change response for " << _delay_millisecs << " millisecs" << endl;
++    if (_verbose) std::cout << _obj_name << ": delaying subscription_change response for " << _delay_millisecs << " millisecs" << std::endl;
+     unsigned long t_secs, t_nanosecs;
+     TW_GET_TIME(&t_secs, &t_nanosecs, d_secs, d_nanosecs);
+     _finish.timedwait(t_secs, t_nanosecs);
+@@ -2345,19 +2345,19 @@
+       _my_proxy->obtain_subscription_types(CosNA::NONE_NOW_UPDATES_OFF);
+     }
+   } catch (CORBA::BAD_PARAM& ex) {
+-    cerr << _obj_name << ": BAD_PARAM Exception while connecting" << endl;
++    std::cerr << _obj_name << ": BAD_PARAM Exception while connecting" << std::endl;
+     return 1; // error
+   } catch (CosEvCA::AlreadyConnected& ex) {
+-    cerr << _obj_name << ": Already connected" << endl;
++    std::cerr << _obj_name << ": Already connected" << std::endl;
+     return 1; // error
+   } catch (...) {
+-    cerr << _obj_name << ": Failed to connect" << endl;
++    std::cerr << _obj_name << ": Failed to connect" << std::endl;
+     return 1; // error
+   }
+   // register the types to be supplied
+   offer_ticker(_my_proxy, _obj_name, _verbose);
+   // spawn a thread to do pushing
+-  if (_verbose) cout << _obj_name << ": Connected to proxy, ready to supply events" << endl; 
++  if (_verbose) std::cout << _obj_name << ": Connected to proxy, ready to supply events" << std::endl; 
+   _worker = new GenericBoundWorkerThread(this);
+   return 0; // OK
+ }
+@@ -2367,11 +2367,11 @@
+   { // introduce lock scope
+     TW_SCOPE_LOCK(lock, _oplock, "StructuredPushSupplier", "StructuredPushSupplier_i::connect");
+     if (_worker || (!_done)) {
+-      cerr << "Coding error: only call c->cleanup() after c->wait_done()" << endl;
++      std::cerr << "Coding error: only call c->cleanup() after c->wait_done()" << std::endl;
+       return;
+     }
+     if (CORBA::is_nil(_my_proxy)) {
+-      cerr << "Coding error: cleanup already called?" << endl;
++      std::cerr << "Coding error: cleanup already called?" << std::endl;
+       return;
+     }
+     // this method takes sole ownership of _my_proxy ref
+@@ -2404,7 +2404,7 @@
+   { // introduce lock scope
+     TW_SCOPE_LOCK(lock, _oplock, "StructuredPushSupplier", "StructuredPushSupplier_i::start_working");
+-    if (_verbose && (!_done)) cout << _obj_name << ": Spawned thread entering main push loop" << endl;
++    if (_verbose && (!_done)) std::cout << _obj_name << ": Spawned thread entering main push loop" << std::endl;
+     while ( 1 ) {
+       if (_done) break; // must have disconnected
+       if ((*_supply_fn)(*data, _obj_name, _num_events+1, _verbose)) {
+@@ -2419,7 +2419,7 @@
+       if (_done) break; // must have disconnected during push
+       _num_events++;
+       if (_max_events && (_num_events >= _max_events)) {
+-        if (_verbose) cout << _obj_name << ": DONE [max_events reached]" << endl;
++        if (_verbose) std::cout << _obj_name << ": DONE [max_events reached]" << std::endl;
+         break; // done
+       }
+       }
+@@ -2436,7 +2436,7 @@
+       continue; // continue pushing
+     com_fail:
+       if (_done) break; // must have disconnected during push
+-      if (_verbose) cout << _obj_name << ": communication error while calling push_structured_event()" << endl;
++      if (_verbose) std::cout << _obj_name << ": communication error while calling push_structured_event()" << std::endl;
+       _com_err = 1;
+       break; // break from while loop -- done
+     } // end while loop
+@@ -2456,7 +2456,7 @@
+   TW_SCOPE_LOCK(lock, _oplock, "StructuredPushSupplier", "StructuredPushSupplier_i::disconnect_structured_push_supplier");
+   if (_done) return;
+-  if (_verbose) cout << _obj_name << ": disconnected" << endl;
++  if (_verbose) std::cout << _obj_name << ": disconnected" << std::endl;
+   _done = 1;
+   _finish.broadcast();
+ }
+@@ -2486,11 +2486,11 @@
+   if (_done) return;
+   _num_changes++;
+   if (_change_fn) (*_change_fn)(added, deled, _obj_name, _num_changes, _verbose);
+-  else if (_verbose) cout << _obj_name << ": subscription_change received [# " << _num_changes << "]" << endl;
++  else if (_verbose) std::cout << _obj_name << ": subscription_change received [# " << _num_changes << "]" << std::endl;
+   if (!_done && _delay_millisecs) {
+     unsigned long d_secs     =  _delay_millisecs / 1000;
+     unsigned long d_nanosecs = (_delay_millisecs % 1000) * 1000000;
+-    if (_verbose) cout << _obj_name << ": delaying subscription_change response for " << _delay_millisecs << " millisecs" << endl;
++    if (_verbose) std::cout << _obj_name << ": delaying subscription_change response for " << _delay_millisecs << " millisecs" << std::endl;
+     unsigned long t_secs, t_nanosecs;
+     TW_GET_TIME(&t_secs, &t_nanosecs, d_secs, d_nanosecs);
+     _finish.timedwait(t_secs, t_nanosecs);
+@@ -2575,17 +2575,17 @@
+       _my_proxy->obtain_subscription_types(CosNA::NONE_NOW_UPDATES_OFF);
+     }
+   } catch (CORBA::BAD_PARAM& ex) {
+-    cerr << _obj_name << ": BAD_PARAM Exception while connecting" << endl;
++    std::cerr << _obj_name << ": BAD_PARAM Exception while connecting" << std::endl;
+     return 1; // error
+   } catch (CosEvCA::AlreadyConnected& ex) {
+-    cerr << _obj_name << ": Already connected" << endl;
++    std::cerr << _obj_name << ": Already connected" << std::endl;
+     return 1; // error
+   } catch (...) {
+-    cerr << _obj_name << ": Failed to connect" << endl;
++    std::cerr << _obj_name << ": Failed to connect" << std::endl;
+     return 1; // error
+   }
+   // spawn a thread to do pushing
+-  if (_verbose) cout << _obj_name << ": Connected to proxy, ready to supply events" << endl; 
++  if (_verbose) std::cout << _obj_name << ": Connected to proxy, ready to supply events" << std::endl; 
+   _worker = new GenericBoundWorkerThread(this);
+   return 0; // OK
+ }
+@@ -2595,11 +2595,11 @@
+   { // introduce lock scope
+     TW_SCOPE_LOCK(lock, _oplock, "Structured512PushSupplier", "Structured512PushSupplier_i::cleanup");
+     if (_worker || (!_done)) {
+-      cerr << "Coding error: only call c->cleanup() after c->wait_done()" << endl;
++      std::cerr << "Coding error: only call c->cleanup() after c->wait_done()" << std::endl;
+       return;
+     }
+     if (CORBA::is_nil(_my_proxy)) {
+-      cerr << "Coding error: cleanup already called?" << endl;
++      std::cerr << "Coding error: cleanup already called?" << std::endl;
+       return;
+     }
+     // this method takes sole ownership of _my_proxy ref
+@@ -2631,7 +2631,7 @@
+   CosN::StructuredEvent* data = new CosN::StructuredEvent;
+   { // introduce lock scope
+     TW_SCOPE_LOCK(lock, _oplock, "Structured512PushSupplier", "Structured512PushSupplier_i::start_working");
+-    if (_verbose && (!_done)) cout << _obj_name << ": Spawned thread entering main push loop" << endl;
++    if (_verbose && (!_done)) std::cout << _obj_name << ": Spawned thread entering main push loop" << std::endl;
+     while ( 1 ) {
+       if (_done) break; // must have disconnected
+       if ((*_supply_fn)(*data, _obj_name, _num_events+1, _verbose)) {
+@@ -2646,7 +2646,7 @@
+       if (_done) break; // must have disconnected during push
+       _num_events++;
+       if (_max_events && (_num_events >= _max_events)) {
+-        if (_verbose) cout << _obj_name << ": DONE [max_events reached]" << endl;
++        if (_verbose) std::cout << _obj_name << ": DONE [max_events reached]" << std::endl;
+         break; // done
+       }
+       }
+@@ -2663,7 +2663,7 @@
+       continue; // continue pushing
+     com_fail:
+       if (_done) break; // must have disconnected during push
+-      if (_verbose) cout << _obj_name << ": communication error while calling push_structured_event()" << endl;
++      if (_verbose) std::cout << _obj_name << ": communication error while calling push_structured_event()" << std::endl;
+       _com_err = 1;
+       break; // break from while loop -- done
+     } //end while loop
+@@ -2683,7 +2683,7 @@
+   TW_SCOPE_LOCK(lock, _oplock, "Structured512PushSupplier", "Structured512PushSupplier_i::disconnect_structured_push_supplier");
+   if (_done) return;
+-  if (_verbose) cout << _obj_name << ": disconnected" << endl;
++  if (_verbose) std::cout << _obj_name << ": disconnected" << std::endl;
+   _done = 1;
+   _finish.broadcast();
+ }
+@@ -2713,11 +2713,11 @@
+   if (_done) return;
+   _num_changes++;
+   if (_change_fn) (*_change_fn)(added, deled, _obj_name, _num_changes, _verbose);
+-  else if (_verbose) cout << _obj_name << ": subscription_change received [# " << _num_changes << "]" << endl;
++  else if (_verbose) std::cout << _obj_name << ": subscription_change received [# " << _num_changes << "]" << std::endl;
+   if (!_done && _delay_millisecs) {
+     unsigned long d_secs     =  _delay_millisecs / 1000;
+     unsigned long d_nanosecs = (_delay_millisecs % 1000) * 1000000;
+-    if (_verbose) cout << _obj_name << ": delaying subscription_change response for " << _delay_millisecs << " millisecs" << endl;
++    if (_verbose) std::cout << _obj_name << ": delaying subscription_change response for " << _delay_millisecs << " millisecs" << std::endl;
+     unsigned long t_secs, t_nanosecs;
+     TW_GET_TIME(&t_secs, &t_nanosecs, d_secs, d_nanosecs);
+     _finish.timedwait(t_secs, t_nanosecs);
+@@ -2807,19 +2807,19 @@
+       _my_proxy->obtain_subscription_types(CosNA::NONE_NOW_UPDATES_OFF);
+     }
+   } catch (CORBA::BAD_PARAM& ex) {
+-    cerr << _obj_name << ": BAD_PARAM Exception while connecting" << endl;
++    std::cerr << _obj_name << ": BAD_PARAM Exception while connecting" << std::endl;
+     return 1; // error
+   } catch (CosEvCA::AlreadyConnected& ex) {
+-    cerr << _obj_name << ": Already connected" << endl;
++    std::cerr << _obj_name << ": Already connected" << std::endl;
+     return 1; // error
+   } catch (...) {
+-    cerr << _obj_name << ": Failed to connect" << endl;
++    std::cerr << _obj_name << ": Failed to connect" << std::endl;
+     return 1; // error
+   }
+   // register the types to be supplied
+   offer_ticker(_my_proxy, _obj_name, _verbose);
+   // spawn a thread to do pushing
+-  if (_verbose) cout << _obj_name << ": Connected to proxy, ready to supply events" << endl; 
++  if (_verbose) std::cout << _obj_name << ": Connected to proxy, ready to supply events" << std::endl; 
+   _worker = new GenericBoundWorkerThread(this);
+   return 0; // OK
+ }
+@@ -2829,11 +2829,11 @@
+   { // introduce lock scope
+     TW_SCOPE_LOCK(lock, _oplock, "SequencePushSupplier", "SequencePushSupplier_i::cleanup");
+     if (_worker || (!_done)) {
+-      cerr << "Coding error: only call c->cleanup() after c->wait_done()" << endl;
++      std::cerr << "Coding error: only call c->cleanup() after c->wait_done()" << std::endl;
+       return;
+     }
+     if (CORBA::is_nil(_my_proxy)) {
+-      cerr << "Coding error: cleanup already called?" << endl;
++      std::cerr << "Coding error: cleanup already called?" << std::endl;
+       return;
+     }
+     // this method takes sole ownership of _my_proxy ref
+@@ -2867,7 +2867,7 @@
+   { // introduce lock scope
+     TW_SCOPE_LOCK(lock, _oplock, "SequencePushSupplier", "SequencePushSupplier_i::start_working");
+-    if (_verbose && (!_done)) cout << _obj_name << ": Spawned thread entering main push loop" << endl;
++    if (_verbose && (!_done)) std::cout << _obj_name << ": Spawned thread entering main push loop" << std::endl;
+     while ( 1 ) {
+       if (_done) break; // must have disconnected
+       data->length(0);
+@@ -2884,7 +2884,7 @@
+       _num_batches++;
+       _num_events += data->length();
+       if (_max_events && (_num_events >= _max_events)) {
+-        if (_verbose) cout << _obj_name << ": DONE [max_events reached]" << endl;
++        if (_verbose) std::cout << _obj_name << ": DONE [max_events reached]" << std::endl;
+         break; // done
+       }
+       }
+@@ -2901,7 +2901,7 @@
+       continue; // continue pushing
+     com_fail:
+       if (_done) break; // must have disconnected during push
+-      if (_verbose) cout << _obj_name << ": communication error while calling push_structured_events()" << endl;
++      if (_verbose) std::cout << _obj_name << ": communication error while calling push_structured_events()" << std::endl;
+       _com_err = 1;
+       break; // break from while loop -- done
+     } // end while loop
+@@ -2921,7 +2921,7 @@
+   TW_SCOPE_LOCK(lock, _oplock, "SequencePushSupplier", "SequencePushSupplier_i::disconnect_sequence_push_supplier");
+   if (_done) return;
+-  if (_verbose) cout << _obj_name << ": disconnected" << endl;
++  if (_verbose) std::cout << _obj_name << ": disconnected" << std::endl;
+   _done = 1;
+   _finish.broadcast();
+ }
+@@ -2951,11 +2951,11 @@
+   if (_done) return;
+   _num_changes++;
+   if (_change_fn) (*_change_fn)(added, deled, _obj_name, _num_changes, _verbose);
+-  else if (_verbose) cout << _obj_name << ": subscription_change received [# " << _num_changes << "]" << endl;
++  else if (_verbose) std::cout << _obj_name << ": subscription_change received [# " << _num_changes << "]" << std::endl;
+   if (!_done && _delay_millisecs) {
+     unsigned long d_secs     =  _delay_millisecs / 1000;
+     unsigned long d_nanosecs = (_delay_millisecs % 1000) * 1000000;
+-    if (_verbose) cout << _obj_name << ": delaying subscription_change response for " << _delay_millisecs << " millisecs" << endl;
++    if (_verbose) std::cout << _obj_name << ": delaying subscription_change response for " << _delay_millisecs << " millisecs" << std::endl;
+     unsigned long t_secs, t_nanosecs;
+     TW_GET_TIME(&t_secs, &t_nanosecs, d_secs, d_nanosecs);
+     _finish.timedwait(t_secs, t_nanosecs);
+@@ -3053,16 +3053,16 @@
+       _my_proxy->obtain_subscription_types(CosNA::NONE_NOW_UPDATES_OFF);
+     }
+   } catch (CORBA::BAD_PARAM& ex) {
+-    cerr << _obj_name << ": BAD_PARAM Exception while connecting" << endl;
++    std::cerr << _obj_name << ": BAD_PARAM Exception while connecting" << std::endl;
+     return 1; // error
+   } catch (CosEvCA::AlreadyConnected& ex) {
+-    cerr << _obj_name << ": Already connected" << endl;
++    std::cerr << _obj_name << ": Already connected" << std::endl;
+     return 1; // error
+   } catch (...) {
+-    cerr << _obj_name << ": Failed to connect" << endl;
++    std::cerr << _obj_name << ": Failed to connect" << std::endl;
+     return 1; // error
+   }
+-  if (_verbose) cout << _obj_name << ": Connected to proxy, ready to supply events" << endl; 
++  if (_verbose) std::cout << _obj_name << ": Connected to proxy, ready to supply events" << std::endl; 
+   // register the types to be supplied
+   offer_any(_my_proxy, _obj_name, _verbose);
+   // if _millisecs is set, spawn a thread to ping the proxy
+@@ -3076,11 +3076,11 @@
+   { // introduce lock scope
+     TW_SCOPE_LOCK(lock, _oplock, "PullSupplier", "PullSupplier_i::cleanup");
+     if (_worker || (!_done)) {
+-      cerr << "Coding error: only call c->cleanup() after c->wait_done()" << endl;
++      std::cerr << "Coding error: only call c->cleanup() after c->wait_done()" << std::endl;
+       return;
+     }
+     if (CORBA::is_nil(_my_proxy)) {
+-      cerr << "Coding error: cleanup already called?" << endl;
++      std::cerr << "Coding error: cleanup already called?" << std::endl;
+       return;
+     }
+     // this method takes sole ownership of _my_proxy ref
+@@ -3107,7 +3107,7 @@
+   { // introduce lock scope
+     TW_SCOPE_LOCK(lock, _oplock, "PullSupplier", "PullSupplier_i::start_working");
+-    if (_verbose && (!_done) && _millisecs) cout << _obj_name << ": Spawned thread entering ping loop" << endl;
++    if (_verbose && (!_done) && _millisecs) std::cout << _obj_name << ": Spawned thread entering ping loop" << std::endl;
+     while ( 1 ) {
+       if (_done || (_millisecs == 0)) break;
+       unsigned long t_secs = 0, t_nanosecs = 0;
+@@ -3129,7 +3129,7 @@
+       continue; // continue ping loop
+     com_fail:
+       if (_done) break;
+-      if (_verbose) cout << _obj_name << ": communication error while pinging proxy using MyType()" << endl;
++      if (_verbose) std::cout << _obj_name << ": communication error while pinging proxy using MyType()" << std::endl;
+       _done = 1;
+       _finish.broadcast();
+       _com_err = 1;
+@@ -3148,7 +3148,7 @@
+   TW_SCOPE_LOCK(lock, _oplock, "PullSupplier", "PullSupplier_i::try_pull");
+   if (_done) return data;
+-  if (_verbose) cout << _obj_name << ": Channel called try_pull" << endl;
++  if (_verbose) std::cout << _obj_name << ": Channel called try_pull" << std::endl;
+   // If we reached done point during last try_pull, it is broadcast now
+   // and we return from this try_pull call without an event.
+@@ -3156,10 +3156,10 @@
+   // processed the previous try_pull (the final supplied event) before
+   // we disconnect this supplier.
+   if (_max_events && (_num_events >= _max_events)) {
+-    if (_verbose) cout << _obj_name << ": DONE [max_events reached; we waited for 1 extra try_pull]" << endl;
++    if (_verbose) std::cout << _obj_name << ": DONE [max_events reached; we waited for 1 extra try_pull]" << std::endl;
+     _done = 1;
+     _finish.broadcast();
+-    if (_verbose) cout << _obj_name << ": NOT returning an event" << endl;
++    if (_verbose) std::cout << _obj_name << ": NOT returning an event" << std::endl;
+     return data;
+   }
+@@ -3167,12 +3167,12 @@
+     has_event = 1;
+     _num_events++;
+   } else {
+-    if (_verbose) cout << _obj_name << ": NOT returning an event" << endl;
++    if (_verbose) std::cout << _obj_name << ": NOT returning an event" << std::endl;
+   }
+   if (!_done && _delay_millisecs) {
+     unsigned long d_secs     =  _delay_millisecs / 1000;
+     unsigned long d_nanosecs = (_delay_millisecs % 1000) * 1000000;
+-    if (_verbose) cout << _obj_name << ": delaying try_pull response for " << _delay_millisecs << " millisecs" << endl;
++    if (_verbose) std::cout << _obj_name << ": delaying try_pull response for " << _delay_millisecs << " millisecs" << std::endl;
+     unsigned long t_secs, t_nanosecs;
+     TW_GET_TIME(&t_secs, &t_nanosecs, d_secs, d_nanosecs);
+     _finish.timedwait(t_secs, t_nanosecs);
+@@ -3194,7 +3194,7 @@
+   { // introduce lock scope
+     TW_SCOPE_LOCK(lock, _oplock, "PullSupplier", "PullSupplier_i::pull");
+-    if (_verbose && (!_done)) cout << _obj_name << ": Channel called pull" << endl;
++    if (_verbose && (!_done)) std::cout << _obj_name << ": Channel called pull" << std::endl;
+     // invariants: _oplock is held entering top of loop and 
+     // also whenever we break out of loop
+     // (it is *not* held during yield() and timedwait() calls)
+@@ -3206,7 +3206,7 @@
+       if ((*_supply_fn)(*data, _obj_name, _num_events+1, _verbose)) {
+       _num_events++;
+       if (_max_events && (_num_events >= _max_events)) {
+-        if (_verbose) cout << _obj_name << ": DONE [max_events reached]" << endl;
++        if (_verbose) std::cout << _obj_name << ": DONE [max_events reached]" << std::endl;
+         _done = 1;
+         _finish.broadcast();
+       }
+@@ -3227,7 +3227,7 @@
+     if (!_done && _delay_millisecs) {
+       unsigned long d_secs     =  _delay_millisecs / 1000;
+       unsigned long d_nanosecs = (_delay_millisecs % 1000) * 1000000;
+-      if (_verbose) cout << _obj_name << ": delaying pull response for " << _delay_millisecs << " millisecs" << endl;
++      if (_verbose) std::cout << _obj_name << ": delaying pull response for " << _delay_millisecs << " millisecs" << std::endl;
+       unsigned long t_secs, t_nanosecs;
+       TW_GET_TIME(&t_secs, &t_nanosecs, d_secs, d_nanosecs);
+       _finish.timedwait(t_secs, t_nanosecs);
+@@ -3242,7 +3242,7 @@
+   TW_SCOPE_LOCK(lock, _oplock, "PullSupplier", "PullSupplier_i::disconnect_pull_supplier");
+   if (_done) return;
+-  if (_verbose) cout << _obj_name << ": disconnected" << endl;
++  if (_verbose) std::cout << _obj_name << ": disconnected" << std::endl;
+   _done = 1;
+   _finish.broadcast();
+ }
+@@ -3272,11 +3272,11 @@
+   if (_done) return;
+   _num_changes++;
+   if (_change_fn) (*_change_fn)(added, deled, _obj_name, _num_changes, _verbose);
+-  else if (_verbose) cout << _obj_name << ": subscription_change received [# " << _num_changes << "]" << endl;
++  else if (_verbose) std::cout << _obj_name << ": subscription_change received [# " << _num_changes << "]" << std::endl;
+   if (!_done && _delay_millisecs) {
+     unsigned long d_secs     =  _delay_millisecs / 1000;
+     unsigned long d_nanosecs = (_delay_millisecs % 1000) * 1000000;
+-    if (_verbose) cout << _obj_name << ": delaying subscription_change response for " << _delay_millisecs << " millisecs" << endl;
++    if (_verbose) std::cout << _obj_name << ": delaying subscription_change response for " << _delay_millisecs << " millisecs" << std::endl;
+     unsigned long t_secs, t_nanosecs;
+     TW_GET_TIME(&t_secs, &t_nanosecs, d_secs, d_nanosecs);
+     _finish.timedwait(t_secs, t_nanosecs);
+@@ -3361,16 +3361,16 @@
+       _my_proxy->obtain_subscription_types(CosNA::NONE_NOW_UPDATES_OFF);
+     }
+   } catch (CORBA::BAD_PARAM& ex) {
+-    cerr << _obj_name << ": BAD_PARAM Exception while connecting" << endl;
++    std::cerr << _obj_name << ": BAD_PARAM Exception while connecting" << std::endl;
+     return 1; // error
+   } catch (CosEvCA::AlreadyConnected& ex) {
+-    cerr << _obj_name << ": Already connected" << endl;
++    std::cerr << _obj_name << ": Already connected" << std::endl;
+     return 1; // error
+   } catch (...) {
+-    cerr << _obj_name << ": Failed to connect" << endl;
++    std::cerr << _obj_name << ": Failed to connect" << std::endl;
+     return 1; // error
+   }
+-  if (_verbose) cout << _obj_name << ": Connected to proxy, ready to supply events" << endl; 
++  if (_verbose) std::cout << _obj_name << ": Connected to proxy, ready to supply events" << std::endl; 
+   // register the types to be supplied
+   offer_ticker(_my_proxy, _obj_name, _verbose);
+   // if _millisecs is set, spawn a thread to ping the proxy
+@@ -3384,11 +3384,11 @@
+   { // introduce lock scope
+     TW_SCOPE_LOCK(lock, _oplock, "StructuredPullSupplier", "StructuredPullSupplier_i::cleanup");
+     if (_worker || (!_done)) {
+-      cerr << "Coding error: only call c->cleanup() after c->wait_done()" << endl;
++      std::cerr << "Coding error: only call c->cleanup() after c->wait_done()" << std::endl;
+       return;
+     }
+     if (CORBA::is_nil(_my_proxy)) {
+-      cerr << "Coding error: cleanup already called?" << endl;
++      std::cerr << "Coding error: cleanup already called?" << std::endl;
+       return;
+     }
+     // this method takes sole ownership of _my_proxy ref
+@@ -3416,7 +3416,7 @@
+   { // introduce lock scope
+     TW_SCOPE_LOCK(lock, _oplock, "StructuredPullSupplier", "StructuredPullSupplier_i::start_working");
+-    if (_verbose && (!_done) && _millisecs) cout << _obj_name << ": Spawned thread entering ping loop" << endl;
++    if (_verbose && (!_done) && _millisecs) std::cout << _obj_name << ": Spawned thread entering ping loop" << std::endl;
+     while ( 1 ) {
+       if (_done || (_millisecs == 0)) break;
+       unsigned long t_secs = 0, t_nanosecs = 0;
+@@ -3438,7 +3438,7 @@
+       continue; // continue ping loop
+     com_fail:
+       if (_done) break;
+-      if (_verbose) cout << _obj_name << ": communication error while pinging proxy using MyType()" << endl;
++      if (_verbose) std::cout << _obj_name << ": communication error while pinging proxy using MyType()" << std::endl;
+       _done = 1;
+       _finish.broadcast();
+       _com_err = 1;
+@@ -3457,7 +3457,7 @@
+   TW_SCOPE_LOCK(lock, _oplock, "StructuredPullSupplier", "StructuredPullSupplier_i::try_pull_structured_event");
+   if (_done) return data;
+-  if (_verbose) cout << _obj_name << ": Channel called try_pull_structured_event" << endl;
++  if (_verbose) std::cout << _obj_name << ": Channel called try_pull_structured_event" << std::endl;
+   // If we reached done point during last try_pull, it is broadcast now
+   // and we return from this try_pull call without an event.
+@@ -3465,10 +3465,10 @@
+   // processed the previous try_pull (the final supplied event) before
+   // we disconnect this supplier.
+   if (_max_events && (_num_events >= _max_events)) {
+-    if (_verbose) cout << _obj_name << ": DONE [max_events reached; we waited for 1 extra try_pull]" << endl;
++    if (_verbose) std::cout << _obj_name << ": DONE [max_events reached; we waited for 1 extra try_pull]" << std::endl;
+     _done = 1;
+     _finish.broadcast();
+-    if (_verbose) cout << _obj_name << ": NOT returning an event" << endl;
++    if (_verbose) std::cout << _obj_name << ": NOT returning an event" << std::endl;
+     return data;
+   }
+@@ -3476,12 +3476,12 @@
+     has_event = 1;
+     _num_events++;
+   } else {
+-    if (_verbose) cout << _obj_name << ": NOT returning an event" << endl;
++    if (_verbose) std::cout << _obj_name << ": NOT returning an event" << std::endl;
+   }
+   if (!_done && _delay_millisecs) {
+     unsigned long d_secs     =  _delay_millisecs / 1000;
+     unsigned long d_nanosecs = (_delay_millisecs % 1000) * 1000000;
+-    if (_verbose) cout << _obj_name << ": delaying try_pull_structured_event response for " << _delay_millisecs << " millisecs" << endl;
++    if (_verbose) std::cout << _obj_name << ": delaying try_pull_structured_event response for " << _delay_millisecs << " millisecs" << std::endl;
+     unsigned long t_secs, t_nanosecs;
+     TW_GET_TIME(&t_secs, &t_nanosecs, d_secs, d_nanosecs);
+     _finish.timedwait(t_secs, t_nanosecs);
+@@ -3503,7 +3503,7 @@
+   { // introduce lock scope
+     TW_SCOPE_LOCK(lock, _oplock, "StructuredPullSupplier", "StructuredPullSupplier_i::pull_structured_event");
+-    if (_verbose && (!_done)) cout << _obj_name << ": Channel called pull_structured_event" << endl;
++    if (_verbose && (!_done)) std::cout << _obj_name << ": Channel called pull_structured_event" << std::endl;
+     // invariants: _oplock is held entering top of loop and 
+     // also whenever we break out of loop
+     // (it is *not* held during yield() and timedwait() calls)
+@@ -3515,7 +3515,7 @@
+       if ((*_supply_fn)(*data, _obj_name, _num_events+1, _verbose)) {
+       _num_events++;
+       if (_max_events && (_num_events >= _max_events)) {
+-        if (_verbose) cout << _obj_name << ": DONE [max_events reached]" << endl;
++        if (_verbose) std::cout << _obj_name << ": DONE [max_events reached]" << std::endl;
+         _done = 1;
+         _finish.broadcast();
+       }
+@@ -3536,7 +3536,7 @@
+     if (!_done && _delay_millisecs) {
+       unsigned long d_secs     =  _delay_millisecs / 1000;
+       unsigned long d_nanosecs = (_delay_millisecs % 1000) * 1000000;
+-      if (_verbose) cout << _obj_name << ": delaying pull_structured_event response for " << _delay_millisecs << " millisecs" << endl;
++      if (_verbose) std::cout << _obj_name << ": delaying pull_structured_event response for " << _delay_millisecs << " millisecs" << std::endl;
+       unsigned long t_secs, t_nanosecs;
+       TW_GET_TIME(&t_secs, &t_nanosecs, d_secs, d_nanosecs);
+       _finish.timedwait(t_secs, t_nanosecs);
+@@ -3551,7 +3551,7 @@
+   TW_SCOPE_LOCK(lock, _oplock, "StructuredPullSupplier", "StructuredPullSupplier_i::disconnect_structured_pull_supplier");
+   if (_done) return;
+-  if (_verbose) cout << _obj_name << ": disconnected" << endl;
++  if (_verbose) std::cout << _obj_name << ": disconnected" << std::endl;
+   _done = 1;
+   _finish.broadcast();
+ }
+@@ -3581,11 +3581,11 @@
+   if (_done) return;
+   _num_changes++;
+   if (_change_fn) (*_change_fn)(added, deled, _obj_name, _num_changes, _verbose);
+-  else if (_verbose) cout << _obj_name << ": subscription_change received [# " << _num_changes << "]" << endl;
++  else if (_verbose) std::cout << _obj_name << ": subscription_change received [# " << _num_changes << "]" << std::endl;
+   if (!_done && _delay_millisecs) {
+     unsigned long d_secs     =  _delay_millisecs / 1000;
+     unsigned long d_nanosecs = (_delay_millisecs % 1000) * 1000000;
+-    if (_verbose) cout << _obj_name << ": delaying subscription_change response for " << _delay_millisecs << " millisecs" << endl;
++    if (_verbose) std::cout << _obj_name << ": delaying subscription_change response for " << _delay_millisecs << " millisecs" << std::endl;
+     unsigned long t_secs, t_nanosecs;
+     TW_GET_TIME(&t_secs, &t_nanosecs, d_secs, d_nanosecs);
+     _finish.timedwait(t_secs, t_nanosecs);
+@@ -3675,16 +3675,16 @@
+       _my_proxy->obtain_subscription_types(CosNA::NONE_NOW_UPDATES_OFF);
+     }
+   } catch (CORBA::BAD_PARAM& ex) {
+-    cerr << _obj_name << ": BAD_PARAM Exception while connecting" << endl;
++    std::cerr << _obj_name << ": BAD_PARAM Exception while connecting" << std::endl;
+     return 1; // error
+   } catch (CosEvCA::AlreadyConnected& ex) {
+-    cerr << _obj_name << ": Already connected" << endl;
++    std::cerr << _obj_name << ": Already connected" << std::endl;
+     return 1; // error
+   } catch (...) {
+-    cerr << _obj_name << ": Failed to connect" << endl;
++    std::cerr << _obj_name << ": Failed to connect" << std::endl;
+     return 1; // error
+   }
+-  if (_verbose) cout << _obj_name << ": Connected to proxy, ready to supply events" << endl; 
++  if (_verbose) std::cout << _obj_name << ": Connected to proxy, ready to supply events" << std::endl; 
+   // register the types to be supplied
+   offer_ticker(_my_proxy, _obj_name, _verbose);
+   // if _millisecs is set, spawn a thread to ping the proxy
+@@ -3698,11 +3698,11 @@
+   { // introduce lock scope
+     TW_SCOPE_LOCK(lock, _oplock, "SequencePullSupplier", "SequencePullSupplier_i::cleanup");
+     if (_worker || (!_done)) {
+-      cerr << "Coding error: only call c->cleanup() after c->wait_done()" << endl;
++      std::cerr << "Coding error: only call c->cleanup() after c->wait_done()" << std::endl;
+       return;
+     }
+     if (CORBA::is_nil(_my_proxy)) {
+-      cerr << "Coding error: cleanup already called?" << endl;
++      std::cerr << "Coding error: cleanup already called?" << std::endl;
+       return;
+     }
+     // this method takes sole ownership of _my_proxy ref
+@@ -3729,7 +3729,7 @@
+   { // introduce lock scope
+     TW_SCOPE_LOCK(lock, _oplock, "SequencePullSupplier", "SequencePullSupplier_i::start_working");
+-    if (_verbose && (!_done) && _millisecs) cout << _obj_name << ": Spawned thread entering ping loop" << endl;
++    if (_verbose && (!_done) && _millisecs) std::cout << _obj_name << ": Spawned thread entering ping loop" << std::endl;
+     while ( 1 ) {
+       if (_done || (_millisecs == 0)) break;
+       unsigned long t_secs = 0, t_nanosecs = 0;
+@@ -3751,7 +3751,7 @@
+       continue; // continue ping loop
+     com_fail:
+       if (_done) break;
+-      if (_verbose) cout << _obj_name << ": communication error while pinging proxy using MyType()" << endl;
++      if (_verbose) std::cout << _obj_name << ": communication error while pinging proxy using MyType()" << std::endl;
+       _done = 1;
+       _finish.broadcast();
+       _com_err = 1;
+@@ -3772,7 +3772,7 @@
+   TW_SCOPE_LOCK(lock, _oplock, "SequencePullSupplier", "SequencePullSupplier_i::try_pull_structured_events");
+   if (_done) return data;
+-  if (_verbose) cout << _obj_name << ": Channel called try_pull_structured_events" << endl;
++  if (_verbose) std::cout << _obj_name << ": Channel called try_pull_structured_events" << std::endl;
+   // If we reached done point during last try_pull, it is broadcast now
+   // and we return from this try_pull call without an event batch.
+@@ -3780,10 +3780,10 @@
+   // processed the previous try_pull (the final supplied event batch) before
+   // we disconnect this supplier.
+   if (_max_events && (_num_events >= _max_events)) {
+-    if (_verbose) cout << _obj_name << ": DONE [max_events reached; we waited for 1 extra try_pull]" << endl;
++    if (_verbose) std::cout << _obj_name << ": DONE [max_events reached; we waited for 1 extra try_pull]" << std::endl;
+     _done = 1;
+     _finish.broadcast();
+-    if (_verbose) cout << _obj_name << ": NOT returning a batch" << endl;
++    if (_verbose) std::cout << _obj_name << ": NOT returning a batch" << std::endl;
+     return data;
+   }
+@@ -3792,12 +3792,12 @@
+     _num_batches++;
+     _num_events += data->length();
+   } else {
+-    if (_verbose) cout << _obj_name << ": NOT returning a batch" << endl;
++    if (_verbose) std::cout << _obj_name << ": NOT returning a batch" << std::endl;
+   }
+   if (!_done && _delay_millisecs) {
+     unsigned long d_secs     =  _delay_millisecs / 1000;
+     unsigned long d_nanosecs = (_delay_millisecs % 1000) * 1000000;
+-    if (_verbose) cout << _obj_name << ": delaying try_pull_structured_events response for " << _delay_millisecs << " millisecs" << endl;
++    if (_verbose) std::cout << _obj_name << ": delaying try_pull_structured_events response for " << _delay_millisecs << " millisecs" << std::endl;
+     unsigned long t_secs, t_nanosecs;
+     TW_GET_TIME(&t_secs, &t_nanosecs, d_secs, d_nanosecs);
+     _finish.timedwait(t_secs, t_nanosecs);
+@@ -3820,7 +3820,7 @@
+   { // introduce lock scope
+     TW_SCOPE_LOCK(lock, _oplock, "SequencePullSupplier", "SequencePullSupplier_i::pull_structured_events");
+-    if (_verbose && (!_done)) cout << _obj_name << ": Channel called pull_structured_events" << endl;
++    if (_verbose && (!_done)) std::cout << _obj_name << ": Channel called pull_structured_events" << std::endl;
+     // invariants: _oplock is held entering top of loop and 
+     // also whenever we break out of loop
+     // (it is *not* held during yield() and timedwait() calls)
+@@ -3834,7 +3834,7 @@
+       _num_batches++;
+       _num_events += data->length();
+       if (_max_events && (_num_events >= _max_events)) {
+-        if (_verbose) cout << _obj_name << ": DONE [max_events reached]" << endl;
++        if (_verbose) std::cout << _obj_name << ": DONE [max_events reached]" << std::endl;
+         _done = 1;
+         _finish.broadcast();
+       }
+@@ -3855,7 +3855,7 @@
+     if (!_done && _delay_millisecs) {
+       unsigned long d_secs     =  _delay_millisecs / 1000;
+       unsigned long d_nanosecs = (_delay_millisecs % 1000) * 1000000;
+-      if (_verbose) cout << _obj_name << ": delaying pull_structured_events response for " << _delay_millisecs << " millisecs" << endl;
++      if (_verbose) std::cout << _obj_name << ": delaying pull_structured_events response for " << _delay_millisecs << " millisecs" << std::endl;
+       unsigned long t_secs, t_nanosecs;
+       TW_GET_TIME(&t_secs, &t_nanosecs, d_secs, d_nanosecs);
+       _finish.timedwait(t_secs, t_nanosecs);
+@@ -3870,7 +3870,7 @@
+   TW_SCOPE_LOCK(lock, _oplock, "SequencePullSupplier", "SequencePullSupplier_i::disconnect_sequence_pull_supplier");
+   if (_done) return;
+-  if (_verbose) cout << _obj_name << ": disconnected" << endl;
++  if (_verbose) std::cout << _obj_name << ": disconnected" << std::endl;
+   _done = 1;
+   _finish.broadcast();
+ }
+@@ -3900,11 +3900,11 @@
+   if (_done) return;
+   _num_changes++;
+   if (_change_fn) (*_change_fn)(added, deled, _obj_name, _num_changes, _verbose);
+-  else if (_verbose) cout << _obj_name << ": subscription_change received [# " << _num_changes << "]" << endl;
++  else if (_verbose) std::cout << _obj_name << ": subscription_change received [# " << _num_changes << "]" << std::endl;
+   if (!_done && _delay_millisecs) {
+     unsigned long d_secs     =  _delay_millisecs / 1000;
+     unsigned long d_nanosecs = (_delay_millisecs % 1000) * 1000000;
+-    if (_verbose) cout << _obj_name << ": delaying subscription_change response for " << _delay_millisecs << " millisecs" << endl;
++    if (_verbose) std::cout << _obj_name << ": delaying subscription_change response for " << _delay_millisecs << " millisecs" << std::endl;
+     unsigned long t_secs, t_nanosecs;
+     TW_GET_TIME(&t_secs, &t_nanosecs, d_secs, d_nanosecs);
+     _finish.timedwait(t_secs, t_nanosecs);
+diff -Naur --exclude=CVS omniNotify-2.1.orig/examples/sample_functions.cc omniNotify-2.1.new/examples/sample_functions.cc
+--- omniNotify-2.1.orig/examples/sample_functions.cc   2003-10-23 08:39:11.000000000 +0400
++++ omniNotify-2.1.new/examples/sample_functions.cc    2009-06-28 17:12:44.000000000 +0400
+@@ -2,8 +2,8 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+-#include <iostream.h>
+-#include <iomanip.h>
++#include <iostream>
++#include <iomanip>
+ #include "sample_functions.h"
+ ///////////////////////////////////////////////////////////////////
+@@ -20,7 +20,7 @@
+                     )
+ {
+   event <<= event_num;
+-  if (verbose) cout << "Supplied event # " << event_num << endl;
++  if (verbose) std::cout << "Supplied event # " << event_num << std::endl;
+   return 1; // OK
+ }
+@@ -33,9 +33,9 @@
+ {
+   CORBA::ULong ul;
+   if (event >>= ul) {
+-    if (verbose) cout << obj_name << ": event data = " << ul << ", event count = " << event_num << endl;
++    if (verbose) std::cout << obj_name << ": event data = " << ul << ", event count = " << event_num << std::endl;
+   } else {
+-    if (verbose) cout << obj_name << ": event data not known (not a ULong), event count = " << event_num << endl;
++    if (verbose) std::cout << obj_name << ": event data not known (not a ULong), event count = " << event_num << std::endl;
+   }
+ }
+@@ -59,9 +59,9 @@
+                             )
+ {
+   if (verbose) {
+-    cout << setw(10) << obj_name << " : " <<
+-      setw(4) << event_num << " : " <<
+-      setw(5) << event.header.fixed_header.event_type.domain_name << "::" <<
++    std::cout << std::setw(10) << obj_name << " : " <<
++      std::setw(4) << event_num << " : " <<
++      std::setw(5) << event.header.fixed_header.event_type.domain_name << "::" <<
+       event.header.fixed_header.event_type.type_name << " -- ";
+     const char* stock_or_bond_name = "";
+     CORBA::ULong value = 0;
+@@ -71,15 +71,15 @@
+       (event.filterable_data.length() > 1) &&
+       (event.filterable_data[0].value >>= stock_or_bond_name) &&
+       (event.filterable_data[1].value >>= value)) {
+-      cout << "Name: " << stock_or_bond_name << " Value: " << setw(4) << value << " Quote# "; 
++      std::cout << "Name: " << stock_or_bond_name << " Value: " << std::setw(4) << value << " Quote# "; 
+       CORBA::ULong l = 0;
+       if (event.remainder_of_body >>= l) {
+-      cout << setw(4) << l << endl;
++      std::cout << std::setw(4) << l << std::endl;
+       } else {
+-      cout << "????" << endl;
++      std::cout << "????" << std::endl;
+       }
+     } else {
+-      cout << "(not a Stock or Bond quote -- ignoring)" << endl;
++      std::cout << "(not a Stock or Bond quote -- ignoring)" << std::endl;
+     }
+   }
+ }
+@@ -121,7 +121,7 @@
+   event.filterable_data[1].name = (const char*) "Value";
+   event.filterable_data[1].value <<= (CORBA::ULong) sample_stockbond_val[i];
+   event.remainder_of_body <<= (CORBA::ULong) event_num;
+-  if (verbose) cout << "Supplied event # " << event_num << endl;
++  if (verbose) std::cout << "Supplied event # " << event_num << std::endl;
+   return 1;
+ }
+@@ -141,8 +141,8 @@
+ {
+   CORBA::ULong evnum = event_num;
+   // We re-use the singleton example function
+-  if (verbose) cout << "--------- " << obj_name << " Supplying Event Batch " <<
+-               batch_num << " -------------" << endl;
++  if (verbose) std::cout << "--------- " << obj_name << " Supplying Event Batch " <<
++               batch_num << " -------------" << std::endl;
+   events.length(batch_size);
+   for (unsigned int i = 0; i < batch_size; i++) {
+     sample_supply_structured_fn(events[i], obj_name, evnum++, verbose);
+@@ -160,8 +160,8 @@
+ {
+   // We re-use the singleton example function
+   CORBA::ULong evnum = (event_num - events.length()) + 1;
+-  if (verbose) cout << "--------- " << obj_name << " Got Event Batch " <<
+-               batch_num << " -------------" << endl;
++  if (verbose) std::cout << "--------- " << obj_name << " Got Event Batch " <<
++               batch_num << " -------------" << std::endl;
+   for (unsigned int i = 0; i < events.length(); i++) {
+     sample_consume_structured_fn(events[i], "", evnum++, verbose);
+   }
+@@ -177,15 +177,15 @@
+                         )
+ {
+   if (verbose) {
+-    cout << setw(10) << obj_name << " : " <<
+-      setw(4) << event_num << " : " <<
+-      setw(5) << event.header.fixed_header.event_type.domain_name << "::" <<
++    std::cout << std::setw(10) << obj_name << " : " <<
++      std::setw(4) << event_num << " : " <<
++      std::setw(5) << event.header.fixed_header.event_type.domain_name << "::" <<
+       event.header.fixed_header.event_type.type_name << " -- ";
+     CORBA::ULong l = 0;
+     if (event.remainder_of_body >>= l) {
+-      cout << setw(4) << l << endl;
++      std::cout << std::setw(4) << l << std::endl;
+     } else {
+-      cout << "????" << endl;
++      std::cout << "????" << std::endl;
+     }
+   }
+ }
+@@ -209,13 +209,13 @@
+   event.filterable_data[0].name = (const char*) "TypeNum";
+   event.filterable_data[0].value <<= (CORBA::ULong) i;
+   event.remainder_of_body <<= (CORBA::ULong) event_num;
+-  if (verbose) cout << "Supplied event # " << event_num << endl;
++  if (verbose) std::cout << "Supplied event # " << event_num << std::endl;
+   return 1;
+ }
+ // Helper functions
+-ostream& operator<< (ostream& out, const CosN::EventType & t) {
++std::ostream& operator<< (std::ostream& out, const CosN::EventType & t) {
+   const char* dname = (t.domain_name ? (const char*)t.domain_name : "*");
+   const char* tname = (t.type_name ? (const char*)t.type_name : "*");
+   return out << dname << "::" << tname;
+@@ -228,10 +228,10 @@
+   CORBA::ULong indx;
+   CosN::EventType type;
+   for (indx = 0; indx < added.length(); indx++) {
+-    cout << "\t+ " << added[indx] << endl;
++    std::cout << "\t+ " << added[indx] << std::endl;
+   }
+   for (indx = 0; indx < deled.length(); indx++) {
+-    cout << "\t- " << deled[indx] << endl;
++    std::cout << "\t- " << deled[indx] << std::endl;
+   }
+ }
+@@ -247,8 +247,8 @@
+                      )
+ {
+   if (verbose) {
+-    cout << "Object " << obj_name <<
+-      " received offer_change msg [# " << num_changes << "]:" << endl;
++    std::cout << "Object " << obj_name <<
++      " received offer_change msg [# " << num_changes << "]:" << std::endl;
+     sample_describe_change_fn(added, deled);
+   }
+ }
+@@ -262,8 +262,8 @@
+                      )
+ {
+   if (verbose) {
+-    cout << "Object " << obj_name << 
+-      " received subscription_change msg [# " << num_changes << "]:" << endl;
++    std::cout << "Object " << obj_name << 
++      " received subscription_change msg [# " << num_changes << "]:" << std::endl;
+     sample_describe_change_fn(added, deled);
+   }
+ }
+diff -Naur --exclude=CVS omniNotify-2.1.orig/examples/some_notify_clients.cc omniNotify-2.1.new/examples/some_notify_clients.cc
+--- omniNotify-2.1.orig/examples/some_notify_clients.cc        2003-10-12 22:51:18.000000000 +0400
++++ omniNotify-2.1.new/examples/some_notify_clients.cc 2009-06-28 17:18:19.000000000 +0400
+@@ -4,7 +4,7 @@
+ #endif
+ #include <stdlib.h>
+-#include <iostream.h>
++#include <iostream>
+ #include "orb_init_name.h"
+ #include "get_channel.h"
+@@ -23,58 +23,58 @@
+ static void usage(const char* pname)
+ {
+-  cout << "Usage: " << pname << " -u client_type [-u client_type ...] [-c #] [-s #] [-b #] [-m #] [-M #] [-n name] [-f file] [-v] [-t types] [-e expr]" << endl;
+-  cout << "  -u type  : use the specified client type (one client of that type is used)." << endl;
+-  cout << "             Specify as many as you like, one -u option for each.  Types:" << endl;
+-  cout << "                lpushc : legacy push consumer" << endl;   
+-  cout << "                apushc : any push consumer" << endl; 
+-  cout << "                spushc : structured push consumer" << endl; 
+-  cout << "                bpushc : batch push consumer" << endl; 
+-  cout << endl;
+-  cout << "                lpullc : legacy pull consumer" << endl;   
+-  cout << "                apullc : any pull consumer" << endl; 
+-  cout << "                spullc : structured pull consumer" << endl; 
+-  cout << "                bpullc : batch pull consumer" << endl; 
+-  cout << endl;
+-  cout << "                lpushs : legacy push supplier" << endl;   
+-  cout << "                apushs : any push supplier" << endl; 
+-  cout << "                spushs : structured push supplier" << endl; 
+-  cout << "                bpushs : batch push supplier" << endl; 
+-  cout << endl;
+-  cout << "                lpulls : legacy pull supplier" << endl;   
+-  cout << "                apulls : any pull supplier" << endl; 
+-  cout << "                spulls : structured pull supplier" << endl; 
+-  cout << "                bpulls : batch pull supplier" << endl; 
+-  cout << endl;
+-  cout << "  -s #     : for suppliers: disconnect after # events supplied [default 0 means never disconnect]" << endl;
+-  cout << "  -c #     : for consumers: disconnect after # events consumed [default 0 means never disconnect]" << endl;
+-  cout << "             **  N.B. You should take # of suppliers into account:" << endl;
+-  cout << "                 if 3 suppliers supply 30 events, each consumer should consume 90 events" << endl; 
+-  cout << "  -b #     : batch size (only relevant for batch supplier programs) [default 5]" << endl;
+-  cout << "               => must be >= 1" << endl;
+-  cout << "  -m #     : # of milliseconds to pause between each push/pull [default 0]" << endl;
+-  cout << "  -M #     : # of milliseconds to pause during incoming push, pull, try_pull [default 0]" << endl;
+-  cout << "             (-M only applies to push consumers and pull suppliers)" << endl;
+-  cout << "  -n name  : channel name" << endl;
+-  cout << "               => use event service to lookup this name" << endl;
+-  cout << "  -f file  : file containing channel IOR" << endl;
+-  cout << "               => use string_to_object on the IOR" << endl;
+-  cout << "  -v       : verbose output" << endl;
+-  cout << endl;
+-  cout << "Options for adding a filter **:" << endl;
+-  cout << "  -t types : add a filter for the specified types, which should be a" << endl;
+-  cout << "               comma-separated list of types of the form D::T" << endl;
+-  cout << "  -e expr  : add a filter with the specified boolean expression" << endl;
+-  cout << "** N.B. Only add filters that always evaluate to TRUE to get proper program termination" << endl;
+-  cout << endl;
+-  cout << "If only -t specified, the expression \"true\" is used for the filter" << endl;
+-  cout << "If only -e specified, the event type \"*::*\" is used for the filter" << endl;
+-  cout << endl;
+-  cout << "If both -n and -f are specified, the -n option is tried first" << endl;
+-  cout << endl;
+-  cout << "If neither -n or -f is specified, program first tries name service" << endl;
+-  cout << "using name \"EventChannel\", then default IOR file /tmp/rdichan.ior" << endl;
+-  cout << endl;
++  std::cout << "Usage: " << pname << " -u client_type [-u client_type ...] [-c #] [-s #] [-b #] [-m #] [-M #] [-n name] [-f file] [-v] [-t types] [-e expr]" << std::endl;
++  std::cout << "  -u type  : use the specified client type (one client of that type is used)." << std::endl;
++  std::cout << "             Specify as many as you like, one -u option for each.  Types:" << std::endl;
++  std::cout << "                lpushc : legacy push consumer" << std::endl;   
++  std::cout << "                apushc : any push consumer" << std::endl; 
++  std::cout << "                spushc : structured push consumer" << std::endl; 
++  std::cout << "                bpushc : batch push consumer" << std::endl; 
++  std::cout << std::endl;
++  std::cout << "                lpullc : legacy pull consumer" << std::endl;   
++  std::cout << "                apullc : any pull consumer" << std::endl; 
++  std::cout << "                spullc : structured pull consumer" << std::endl; 
++  std::cout << "                bpullc : batch pull consumer" << std::endl; 
++  std::cout << std::endl;
++  std::cout << "                lpushs : legacy push supplier" << std::endl;   
++  std::cout << "                apushs : any push supplier" << std::endl; 
++  std::cout << "                spushs : structured push supplier" << std::endl; 
++  std::cout << "                bpushs : batch push supplier" << std::endl; 
++  std::cout << std::endl;
++  std::cout << "                lpulls : legacy pull supplier" << std::endl;   
++  std::cout << "                apulls : any pull supplier" << std::endl; 
++  std::cout << "                spulls : structured pull supplier" << std::endl; 
++  std::cout << "                bpulls : batch pull supplier" << std::endl; 
++  std::cout << std::endl;
++  std::cout << "  -s #     : for suppliers: disconnect after # events supplied [default 0 means never disconnect]" << std::endl;
++  std::cout << "  -c #     : for consumers: disconnect after # events consumed [default 0 means never disconnect]" << std::endl;
++  std::cout << "             **  N.B. You should take # of suppliers into account:" << std::endl;
++  std::cout << "                 if 3 suppliers supply 30 events, each consumer should consume 90 events" << std::endl; 
++  std::cout << "  -b #     : batch size (only relevant for batch supplier programs) [default 5]" << std::endl;
++  std::cout << "               => must be >= 1" << std::endl;
++  std::cout << "  -m #     : # of milliseconds to pause between each push/pull [default 0]" << std::endl;
++  std::cout << "  -M #     : # of milliseconds to pause during incoming push, pull, try_pull [default 0]" << std::endl;
++  std::cout << "             (-M only applies to push consumers and pull suppliers)" << std::endl;
++  std::cout << "  -n name  : channel name" << std::endl;
++  std::cout << "               => use event service to lookup this name" << std::endl;
++  std::cout << "  -f file  : file containing channel IOR" << std::endl;
++  std::cout << "               => use string_to_object on the IOR" << std::endl;
++  std::cout << "  -v       : verbose output" << std::endl;
++  std::cout << std::endl;
++  std::cout << "Options for adding a filter **:" << std::endl;
++  std::cout << "  -t types : add a filter for the specified types, which should be a" << std::endl;
++  std::cout << "               comma-separated list of types of the form D::T" << std::endl;
++  std::cout << "  -e expr  : add a filter with the specified boolean expression" << std::endl;
++  std::cout << "** N.B. Only add filters that always evaluate to TRUE to get proper program termination" << std::endl;
++  std::cout << std::endl;
++  std::cout << "If only -t specified, the expression \"true\" is used for the filter" << std::endl;
++  std::cout << "If only -e specified, the event type \"*::*\" is used for the filter" << std::endl;
++  std::cout << std::endl;
++  std::cout << "If both -n and -f are specified, the -n option is tried first" << std::endl;
++  std::cout << std::endl;
++  std::cout << "If neither -n or -f is specified, program first tries name service" << std::endl;
++  std::cout << "using name \"EventChannel\", then default IOR file /tmp/rdichan.ior" << std::endl;
++  std::cout << std::endl;
+ }
+ // return 0 if etype_list is a valid comma-separated event type list
+@@ -195,7 +195,7 @@
+       } else if (strcmp(optarg, "bpulls") == 0) {
+         USE_B_PULL_S = 1; num_sup++;
+       } else {
+-        cout << endl << "Bad client type (" << optarg << ") for -u option" << endl;
++        std::cout << std::endl << "Bad client type (" << optarg << ") for -u option" << std::endl;
+         usage(pname);
+         goto error_return;
+       }
+@@ -250,7 +250,7 @@
+       ior_file = (char*)"/tmp/rdichan.ior";
+     }
+     if (strlen(etype_list) && parse_etype_list(etype_list, evs)) {
+-      cout << "Event type list for -t option must be comma-separated list of D::T" << endl << endl; 
++      std::cout << "Event type list for -t option must be comma-separated list of D::T" << std::endl << std::endl; 
+       usage(pname);
+       goto error_return;
+     }
+@@ -258,19 +258,19 @@
+       constraint_expr = (char*)"true";
+     }
+     if (num_con + num_sup == 0) {
+-      cout << endl << "** You must use at least one -u option to specify a client **" << endl;
++      std::cout << std::endl << "** You must use at least one -u option to specify a client **" << std::endl;
+       usage(pname);
+       goto error_return;
+     }
+     if (num_con && num_sup && num_con_events && num_sup_events && (num_con_events != (num_sup * num_sup_events))) {
+-      cout << endl << "** WARNING: Unless filtering or external clients change the count, your math is wrong" << endl;
+-      cout << "    num_con_events != num_sup * num_sup_events" << endl;
+-      cout << "    ( " << num_con_events << " != " << num_sup << " * " << num_sup_events << " )" << endl;
+-      cout << "Proceeding anyway" << endl;
++      std::cout << std::endl << "** WARNING: Unless filtering or external clients change the count, your math is wrong" << std::endl;
++      std::cout << "    num_con_events != num_sup * num_sup_events" << std::endl;
++      std::cout << "    ( " << num_con_events << " != " << num_sup << " * " << num_sup_events << " )" << std::endl;
++      std::cout << "Proceeding anyway" << std::endl;
+     }
+     // (2) Obtain reference to notification channel
+-    if (verbose) cout << "Obtaining reference to notification channel" << endl;
++    if (verbose) std::cout << "Obtaining reference to notification channel" << std::endl;
+     CosNA::EventChannel_ptr channel = getchan_from_ns(orb, channel_name, verbose);
+     if (CORBA::is_nil(channel)) { // name service lookup failed
+       channel = getchan_from_iorfile(orb, ior_file, verbose);
+@@ -323,12 +323,12 @@
+     // (3.1) legacy_push_consumer
+     if (USE_L_PUSH_C) {
+-      cout << "Constructing legacy_push_consumer, num_con_events = " << num_con_events << endl;
++      std::cout << "Constructing legacy_push_consumer, num_con_events = " << num_con_events << std::endl;
+       l_push_c =
+       LegacyPushConsumer_i::create(channel, num_con_events, "legacy_push_consumer",
+                                    sample_consume_any_fn, millisecs, delay_millisecs, verbose);
+       if (! l_push_c) {
+-      cerr << "Constructing legacy_push_consumer failed" << endl;
++      std::cerr << "Constructing legacy_push_consumer failed" << std::endl;
+       goto error_return; // failed to create a client
+       }
+       my_l_push_c = l_push_c->_this();
+@@ -337,12 +337,12 @@
+       // (3.2) legacy_pull_consumer
+     if (USE_L_PULL_C) {
+-      cout << "Constructing legacy_pull_consumer, num_con_events = " << num_con_events << endl;
++      std::cout << "Constructing legacy_pull_consumer, num_con_events = " << num_con_events << std::endl;
+       l_pull_c =
+       LegacyPullConsumer_i::create(channel, num_con_events, "legacy_pull_consumer",
+                                    sample_consume_any_fn, millisecs, delay_millisecs, verbose);
+       if (! l_pull_c) {
+-      cerr << "Constructing legacy_pull_consumer failed" << endl;
++      std::cerr << "Constructing legacy_pull_consumer failed" << std::endl;
+       goto error_return; // failed to create a client
+       }
+       my_l_pull_c = l_pull_c->_this();
+@@ -351,13 +351,13 @@
+     // (3.3) any_push_consumer
+     if (USE_A_PUSH_C) {
+-      cout << "Constructing any_push_consumer, num_con_events = " << num_con_events << endl;
++      std::cout << "Constructing any_push_consumer, num_con_events = " << num_con_events << std::endl;
+       a_push_c =
+       PushConsumer_i::create(orb, channel, num_con_events, batch_size, "any_push_consumer",
+                              "", "", sample_consume_any_fn, sample_offer_change_fn,
+                              &evs, constraint_expr, millisecs, delay_millisecs, verbose);
+       if (! a_push_c) {
+-      cerr << "Constructing any_push_consumer failed" << endl;
++      std::cerr << "Constructing any_push_consumer failed" << std::endl;
+       goto error_return; // failed to create a client
+       }
+       my_a_push_c = a_push_c->_this();
+@@ -366,13 +366,13 @@
+     // (3.4) struct_push_consumer
+     if (USE_S_PUSH_C) {
+-      cout << "Constructing struct_push_consumer, num_con_events = " << num_con_events << endl;
++      std::cout << "Constructing struct_push_consumer, num_con_events = " << num_con_events << std::endl;
+       s_push_c =
+       StructuredPushConsumer_i::create(orb, channel, num_con_events, batch_size, "struct_push_consumer",
+                                        "", "", sample_consume_structured_fn, sample_offer_change_fn,
+                                        &evs, constraint_expr, millisecs, delay_millisecs, verbose);
+       if (! s_push_c) {
+-      cerr << "Constructing struct_push_consumer failed" << endl;
++      std::cerr << "Constructing struct_push_consumer failed" << std::endl;
+       goto error_return; // failed to create a client
+       }
+       my_s_push_c = s_push_c->_this();
+@@ -381,13 +381,13 @@
+     // (3.5) batch_push_consumer
+     if (USE_B_PUSH_C) {
+-      cout << "Constructing batch_push_consumer, num_con_events = " << num_con_events << endl;
++      std::cout << "Constructing batch_push_consumer, num_con_events = " << num_con_events << std::endl;
+       b_push_c =
+       SequencePushConsumer_i::create(orb, channel, num_con_events, batch_size, "batch_push_consumer",
+                                      "", "", sample_consume_batch_fn, sample_offer_change_fn,
+                                      &evs, constraint_expr, millisecs, delay_millisecs, verbose);
+       if (! b_push_c) {
+-      cerr << "Constructing batch_push_consumer failed" << endl;
++      std::cerr << "Constructing batch_push_consumer failed" << std::endl;
+       goto error_return; // failed to create a client
+       }
+       my_b_push_c = b_push_c->_this();
+@@ -396,13 +396,13 @@
+     // (3.6) any_pull_consumer
+     if (USE_A_PULL_C) {
+-      cout << "Constructing any_pull_consumer, num_con_events = " << num_con_events << endl;
++      std::cout << "Constructing any_pull_consumer, num_con_events = " << num_con_events << std::endl;
+       a_pull_c =
+       PullConsumer_i::create(orb, channel, num_con_events, batch_size, "any_pull_consumer",
+                              "", "", sample_consume_any_fn, sample_offer_change_fn,
+                              &evs, constraint_expr, millisecs, delay_millisecs, verbose);
+       if (! a_pull_c) {
+-      cerr << "Constructing any_pull_consumer failed" << endl;
++      std::cerr << "Constructing any_pull_consumer failed" << std::endl;
+       goto error_return; // failed to create a client
+       }
+       my_a_pull_c = a_pull_c->_this();
+@@ -411,13 +411,13 @@
+     // (3.7) struct_pull_consumer
+     if (USE_S_PULL_C) {
+-      cout << "Constructing struct_pull_consumer, num_con_events = " << num_con_events << endl;
++      std::cout << "Constructing struct_pull_consumer, num_con_events = " << num_con_events << std::endl;
+       s_pull_c =
+       StructuredPullConsumer_i::create(orb, channel, num_con_events, batch_size, "struct_pull_consumer",
+                                        "", "", sample_consume_structured_fn, sample_offer_change_fn,
+                                        &evs, constraint_expr, millisecs, delay_millisecs, verbose);
+       if (! s_pull_c) {
+-      cerr << "Constructing struct_pull_consumer failed" << endl;
++      std::cerr << "Constructing struct_pull_consumer failed" << std::endl;
+       goto error_return; // failed to create a client
+       }
+       my_s_pull_c = s_pull_c->_this();
+@@ -426,13 +426,13 @@
+     // (3.8) batch_pull_consumer
+     if (USE_B_PULL_C) {
+-      cout << "Constructing batch_pull_consumer, num_con_events = " << num_con_events << endl;
++      std::cout << "Constructing batch_pull_consumer, num_con_events = " << num_con_events << std::endl;
+       b_pull_c =
+       SequencePullConsumer_i::create(orb, channel, num_con_events, batch_size, "batch_pull_consumer",
+                                      "", "", sample_consume_batch_fn, sample_offer_change_fn,
+                                      &evs, constraint_expr, millisecs, delay_millisecs, verbose);
+       if (! b_pull_c) {
+-      cerr << "Constructing batch_pull_consumer failed" << endl;
++      std::cerr << "Constructing batch_pull_consumer failed" << std::endl;
+       goto error_return; // failed to create a client
+       }
+       my_b_pull_c = b_pull_c->_this();
+@@ -441,12 +441,12 @@
+     // (3.9) legacy_push_supplier
+     if (USE_L_PUSH_S) {
+-      cout << "Constructing legacy_push_supplier, num_sup_events = " << num_sup_events << endl;
++      std::cout << "Constructing legacy_push_supplier, num_sup_events = " << num_sup_events << std::endl;
+       l_push_s =
+       LegacyPushSupplier_i::create(channel, num_sup_events, "legacy_push_supplier",
+                                    sample_supply_any_fn, millisecs, delay_millisecs, verbose);
+       if (! l_push_s) {
+-      cerr << "Constructing legacy_push_supplier failed" << endl;
++      std::cerr << "Constructing legacy_push_supplier failed" << std::endl;
+       goto error_return; // failed to create a client
+       }
+       my_l_push_s = l_push_s->_this();
+@@ -455,12 +455,12 @@
+     // (3.10) legacy_pull_supplier
+     if (USE_L_PULL_S) {
+-      cout << "Constructing legacy_pull_supplier, num_sup_events = " << num_sup_events <<  endl;
++      std::cout << "Constructing legacy_pull_supplier, num_sup_events = " << num_sup_events <<  std::endl;
+       l_pull_s =
+       LegacyPullSupplier_i::create(channel, num_sup_events, "legacy_pull_supplier",
+                                    sample_supply_any_fn, millisecs, delay_millisecs, verbose);
+       if (! l_pull_s) {
+-      cerr << "Constructing legacy_pull_supplier failed" << endl;
++      std::cerr << "Constructing legacy_pull_supplier failed" << std::endl;
+       goto error_return; // failed to create a client
+       }
+       my_l_pull_s = l_pull_s->_this();
+@@ -469,13 +469,13 @@
+     // (3.11) any_push_supplier
+     if (USE_A_PUSH_S) {
+-      cout << "Constructing any_push_supplier, num_sup_events = " << num_sup_events <<  endl;
++      std::cout << "Constructing any_push_supplier, num_sup_events = " << num_sup_events <<  std::endl;
+       a_push_s =
+       PushSupplier_i::create(orb, channel, num_sup_events, batch_size, "any_push_supplier",
+                              "", "", sample_supply_any_fn, sample_subscription_change_fn,
+                              &evs, constraint_expr, millisecs, delay_millisecs, verbose);
+       if (! a_push_s) {
+-      cerr << "Constructing any_push_supplier failed" << endl;
++      std::cerr << "Constructing any_push_supplier failed" << std::endl;
+       goto error_return; // failed to create a client
+       }
+       my_a_push_s = a_push_s->_this();
+@@ -484,13 +484,13 @@
+     // (3.12) struct_push_supplier
+     if (USE_S_PUSH_S) {
+-      cout << "Constructing struct_push_supplier, num_sup_events = " << num_sup_events <<  endl;
++      std::cout << "Constructing struct_push_supplier, num_sup_events = " << num_sup_events <<  std::endl;
+       s_push_s =
+       StructuredPushSupplier_i::create(orb, channel, num_sup_events, batch_size, "struct_push_supplier",
+                                        "", "", sample_supply_structured_fn, sample_subscription_change_fn,
+                                        &evs, constraint_expr, millisecs, delay_millisecs, verbose);
+       if (! s_push_s) {
+-      cerr << "Constructing struct_push_supplier failed" << endl;
++      std::cerr << "Constructing struct_push_supplier failed" << std::endl;
+       goto error_return; // failed to create a client
+       }
+       my_s_push_s = s_push_s->_this();
+@@ -499,13 +499,13 @@
+     // (3.13) batch_push_supplier
+     if (USE_B_PUSH_S) {
+-      cout << "Constructing batch_push_supplier, num_sup_events = " << num_sup_events <<  endl;
++      std::cout << "Constructing batch_push_supplier, num_sup_events = " << num_sup_events <<  std::endl;
+       b_push_s =
+       SequencePushSupplier_i::create(orb, channel, num_sup_events, batch_size, "batch_push_supplier",
+                                      "", "", sample_supply_batch_fn, sample_subscription_change_fn,
+                                      &evs, constraint_expr, millisecs, delay_millisecs, verbose);
+       if (! b_push_s) {
+-      cerr << "Constructing batch_push_supplier failed" << endl;
++      std::cerr << "Constructing batch_push_supplier failed" << std::endl;
+       goto error_return; // failed to create a client
+       }
+       my_b_push_s = b_push_s->_this();
+@@ -514,13 +514,13 @@
+     // (3.14) any_pull_supplier
+     if (USE_A_PULL_S) {
+-      cout << "Constructing any_pull_supplier, num_sup_events = " << num_sup_events <<  endl;
++      std::cout << "Constructing any_pull_supplier, num_sup_events = " << num_sup_events <<  std::endl;
+       a_pull_s =
+       PullSupplier_i::create(orb, channel, num_sup_events, batch_size, "any_pull_supplier",
+                              "", "", sample_supply_any_fn, sample_subscription_change_fn,
+                              &evs, constraint_expr, millisecs, delay_millisecs, verbose);
+       if (! a_pull_s) {
+-      cerr << "Constructing any_pull_supplier failed" << endl;
++      std::cerr << "Constructing any_pull_supplier failed" << std::endl;
+       goto error_return; // failed to create a client
+       }
+       my_a_pull_s = a_pull_s->_this();
+@@ -529,13 +529,13 @@
+     // (3.15) struct_pull_supplier
+     if (USE_S_PULL_S) {
+-      cout << "Constructing struct_pull_supplier, num_sup_events = " << num_sup_events <<  endl;
++      std::cout << "Constructing struct_pull_supplier, num_sup_events = " << num_sup_events <<  std::endl;
+       s_pull_s =
+       StructuredPullSupplier_i::create(orb, channel, num_sup_events, batch_size, "struct_pull_supplier",
+                                        "", "", sample_supply_structured_fn, sample_subscription_change_fn,
+                                        &evs, constraint_expr, millisecs, delay_millisecs, verbose);
+       if (! s_pull_s) {
+-      cerr << "Constructing struct_pull_supplier failed" << endl;
++      std::cerr << "Constructing struct_pull_supplier failed" << std::endl;
+       goto error_return; // failed to create a client
+       }
+       my_s_pull_s = s_pull_s->_this();
+@@ -544,13 +544,13 @@
+     // (3.16) batch_pull_supplier
+     if (USE_B_PULL_S) {
+-      cout << "Constructing batch_pull_supplier, num_sup_events = " << num_sup_events <<  endl;
++      std::cout << "Constructing batch_pull_supplier, num_sup_events = " << num_sup_events <<  std::endl;
+       b_pull_s =
+       SequencePullSupplier_i::create(orb, channel, num_sup_events, batch_size, "batch_pull_supplier",
+                                      "", "", sample_supply_batch_fn, sample_subscription_change_fn,
+                                      &evs, constraint_expr, millisecs, delay_millisecs, verbose);
+       if (! b_pull_s) {
+-      cerr << "Constructing batch_pull_supplier failed" << endl;
++      std::cerr << "Constructing batch_pull_supplier failed" << std::endl;
+       goto error_return; // failed to create a client
+       }
+       my_b_pull_s = b_pull_s->_this();
+@@ -558,116 +558,116 @@
+     }
+     // (4) Tell POA we are ready to go
+-    if (verbose) cout << "Activating POA manager" << endl;
++    if (verbose) std::cout << "Activating POA manager" << std::endl;
+     PortableServer::POAManager_var pman = poa->the_POAManager();
+     pman->activate();
+     // (5) Connect clients to their proxies -- consumers first
+-    if (verbose) cout << "Connecting consumer clients to proxies" << endl;
++    if (verbose) std::cout << "Connecting consumer clients to proxies" << std::endl;
+     if (USE_L_PUSH_C) {
+       if (l_push_c->connect()) {
+-      cerr << "Connecting legacy_push_consumer failed" << endl;
++      std::cerr << "Connecting legacy_push_consumer failed" << std::endl;
+       goto error_return;
+       }
+     }
+     if (USE_A_PUSH_C) {
+       if (a_push_c->connect()) {
+-      cerr << "Connecting any_push_consumer failed" << endl;
++      std::cerr << "Connecting any_push_consumer failed" << std::endl;
+       goto error_return;
+       }
+     }
+     if (USE_S_PUSH_C) {
+       if (s_push_c->connect()) {
+-      cerr << "Connecting struct_push_consumer failed" << endl;
++      std::cerr << "Connecting struct_push_consumer failed" << std::endl;
+       goto error_return;
+       }
+     }
+     if (USE_B_PUSH_C) {
+       if (b_push_c->connect()) {
+-      cerr << "Connecting batch_push_consumer failed" << endl;
++      std::cerr << "Connecting batch_push_consumer failed" << std::endl;
+       goto error_return;
+       }
+     }
+     if (USE_L_PULL_C) {
+       if (l_pull_c->connect()) {
+-      cerr << "Connecting legacy_pull_consumer failed" << endl;
++      std::cerr << "Connecting legacy_pull_consumer failed" << std::endl;
+       goto error_return;
+       }
+     }
+     if (USE_A_PULL_C) {
+       if (a_pull_c->connect()) {
+-      cerr << "Connecting any_pull_consumer failed" << endl;
++      std::cerr << "Connecting any_pull_consumer failed" << std::endl;
+       goto error_return;
+       }
+     }
+     if (USE_S_PULL_C) {
+       if (s_pull_c->connect()) {
+-      cerr << "Connecting struct_pull_consumer failed" << endl;
++      std::cerr << "Connecting struct_pull_consumer failed" << std::endl;
+       goto error_return;
+       }
+     }
+     if (USE_B_PULL_C) {
+       if (b_pull_c->connect()) {
+-      cerr << "Connecting batch_pull_consumer failed" << endl;
++      std::cerr << "Connecting batch_pull_consumer failed" << std::endl;
+       goto error_return;
+       }
+     }
+-    if (verbose) cout << "Connecting supplier clients to proxies" << endl;
++    if (verbose) std::cout << "Connecting supplier clients to proxies" << std::endl;
+     if (USE_L_PUSH_S) {
+       if (l_push_s->connect()) {
+-      cerr << "Connecting legacy_push_supplier failed" << endl;
++      std::cerr << "Connecting legacy_push_supplier failed" << std::endl;
+       goto error_return;
+       }
+     }
+     if (USE_A_PUSH_S) {
+       if (a_push_s->connect()) {
+-      cerr << "Connecting any_push_supplier failed" << endl;
++      std::cerr << "Connecting any_push_supplier failed" << std::endl;
+       goto error_return;
+       }
+     }
+     if (USE_S_PUSH_S) {
+       if (s_push_s->connect()) {
+-      cerr << "Connecting struct_push_supplier failed" << endl;
++      std::cerr << "Connecting struct_push_supplier failed" << std::endl;
+       goto error_return;
+       }
+     }
+     if (USE_B_PUSH_S) {
+       if (b_push_s->connect()) {
+-      cerr << "Connecting batch_push_supplier failed" << endl;
++      std::cerr << "Connecting batch_push_supplier failed" << std::endl;
+       goto error_return;
+       }
+     }
+     if (USE_L_PULL_S) {
+       if (l_pull_s->connect()) {
+-      cerr << "Connecting legacy_pull_supplier failed" << endl;
++      std::cerr << "Connecting legacy_pull_supplier failed" << std::endl;
+       goto error_return;
+       }
+     }
+     if (USE_A_PULL_S) {
+       if (a_pull_s->connect()) {
+-      cerr << "Connecting any_pull_supplier failed" << endl;
++      std::cerr << "Connecting any_pull_supplier failed" << std::endl;
+       goto error_return;
+       }
+     }
+     if (USE_S_PULL_S) {
+       if (s_pull_s->connect()) {
+-      cerr << "Connecting struct_pull_supplier failed" << endl;
++      std::cerr << "Connecting struct_pull_supplier failed" << std::endl;
+       goto error_return;
+       }
+     }
+     if (USE_B_PULL_S) {
+       if (b_pull_s->connect()) {
+-      cerr << "Connecting batch_pull_supplier failed" << endl;
++      std::cerr << "Connecting batch_pull_supplier failed" << std::endl;
+       goto error_return;
+       }
+     }
+-    if (verbose) cout << "Waiting for all 16 clients to finish" << endl;
++    if (verbose) std::cout << "Waiting for all 16 clients to finish" << std::endl;
+     CORBA::Boolean l_push_c_err = 0, l_pull_c_err = 0, l_push_s_err = 0, l_pull_s_err = 0;
+     CORBA::Boolean a_push_c_err = 0, a_pull_c_err = 0, a_push_s_err = 0, a_pull_s_err = 0;
+@@ -745,13 +745,13 @@
+       s_pull_s_err ||
+       b_pull_s_err;
+     if (sup_com_err && (num_sup_events > 0)) {
+-      if (verbose) cout << "Supplier communication error -- probably did not supply desired # of events" << endl;
++      if (verbose) std::cout << "Supplier communication error -- probably did not supply desired # of events" << std::endl;
+     }
+     if (con_com_err && (num_con_events > 0)) {
+-      if (verbose) cout << "Consumer communication error -- probably did not consume desired # of events" << endl;
++      if (verbose) std::cout << "Consumer communication error -- probably did not consume desired # of events" << std::endl;
+     }
+-    if (verbose) cout << "Cleaning up" << endl;
++    if (verbose) std::cout << "Cleaning up" << std::endl;
+     if (USE_L_PUSH_C) {
+       if (!l_push_c_err) { l_push_c->cleanup(); }
+@@ -808,23 +808,23 @@
+     goto normal_return;
+   }
+   catch(CORBA::SystemException&) {                     
+-    cerr << "main caught CORBA::SystemException." << endl;  
++    std::cerr << "main caught CORBA::SystemException." << std::endl;  
+   }                                                    
+   catch(CORBA::Exception&) {                           
+-    cerr << "main caught CORBA::Exception." << endl;        
++    std::cerr << "main caught CORBA::Exception." << std::endl;        
+   }                                                    
+   catch(omniORB::fatalException& fe) {                 
+-    cerr << "main caught omniORB::fatalException:" << endl; 
+-    cerr << "  file: " << fe.file() << endl;           
+-    cerr << "  line: " << fe.line() << endl;           
+-    cerr << "  mesg: " << fe.errmsg() << endl;         
++    std::cerr << "main caught omniORB::fatalException:" << std::endl; 
++    std::cerr << "  file: " << fe.file() << std::endl;           
++    std::cerr << "  line: " << fe.line() << std::endl;           
++    std::cerr << "  mesg: " << fe.errmsg() << std::endl;         
+   }                                                    
+   catch(...) {                                         
+     // nameclt comment says it is a bad idea to report an error here 
+   }
+-  cerr << "main caught an exception." << endl;       
++  std::cerr << "main caught an exception." << std::endl;       
+  error_return:
+-  cerr << "QUITTING due to error" << endl;
++  std::cerr << "QUITTING due to error" << std::endl;
+   // orb->destroy();
+   return -1;
+  normal_return:
+diff -Naur --exclude=CVS omniNotify-2.1.orig/examples/ten_any_pull_consumers.cc omniNotify-2.1.new/examples/ten_any_pull_consumers.cc
+--- omniNotify-2.1.orig/examples/ten_any_pull_consumers.cc     2003-10-23 08:39:11.000000000 +0400
++++ omniNotify-2.1.new/examples/ten_any_pull_consumers.cc      2009-06-28 17:14:26.000000000 +0400
+@@ -32,7 +32,7 @@
+     PortableServer::POA_var poa = PortableServer::POA::_narrow(obj);
+     // (1) Tell POA we are ready to go
+-    if (verbose) cout << "Activating POA manager" << endl;
++    if (verbose) std::cout << "Activating POA manager" << std::endl;
+     PortableServer::POAManager_var pman = poa->the_POAManager();
+     pman->activate();
+@@ -46,7 +46,7 @@
+     num_con_events = num_events;
+     // (3) Obtain reference to notification channel
+-    if (verbose) cout << "Obtaining reference to notification channel" << endl;
++    if (verbose) std::cout << "Obtaining reference to notification channel" << std::endl;
+     CosNA::EventChannel_ptr channel = getchan_from_ns(orb, channel_name, verbose);
+     if (CORBA::is_nil(channel)) { // name service lookup failed
+       channel = getchan_from_iorfile(orb, ior_file, verbose);
+@@ -56,14 +56,14 @@
+     }
+     // (4) Create all 12 CosNotify-style clients
+-    if (verbose) cout << "Creating 10 any_pull_consumer clients" << endl;
++    if (verbose) std::cout << "Creating 10 any_pull_consumer clients" << std::endl;
+     PullConsumer_i* a_pull_c[10];
+     CosNotifyComm::PullConsumer_var my_a_pull_c[10];
+     char buf[100];
+     for (i = 0; i < 10; i++) {
+       sprintf(buf, "any_pull_consumer%d", i);
+-      if (verbose) cout << "Creating " << buf << endl;
++      if (verbose) std::cout << "Creating " << buf << std::endl;
+       a_pull_c[i] =
+       PullConsumer_i::create(orb, channel, num_con_events, batch_size, CORBA::string_dup(buf),
+                              "", "", sample_consume_any_fn, sample_offer_change_fn,
+@@ -76,14 +76,14 @@
+     }
+     // (5) Connect clients to their proxies -- consumers first
+-    if (verbose) cout << "Connecting consumer clients to proxies" << endl;
++    if (verbose) std::cout << "Connecting consumer clients to proxies" << std::endl;
+     for (i = 0; i < 10; i++) {
+-      if (verbose) cout << "Connecting Client # " << i+1 << endl;
++      if (verbose) std::cout << "Connecting Client # " << i+1 << std::endl;
+       if (a_pull_c[i]->connect()) { goto error_return; }
+     }
+-    if (verbose) cout << "Waiting for all 10 clients to finish" << endl;
++    if (verbose) std::cout << "Waiting for all 10 clients to finish" << std::endl;
+     CORBA::Boolean a_com_err[10];
+     CORBA::Boolean com_err = 0;
+@@ -95,10 +95,10 @@
+     }
+     if (com_err && (num_events > 0)) {
+-      if (verbose) cout << "Communication error -- probably did not process desired # of events" << endl;
++      if (verbose) std::cout << "Communication error -- probably did not process desired # of events" << std::endl;
+     }
+-    if (verbose) cout << "Cleaning up" << endl;
++    if (verbose) std::cout << "Cleaning up" << std::endl;
+     for (i = 0; i < 10; i++) {
+       if (!a_com_err[i]) { a_pull_c[i]->cleanup(); }
+@@ -107,23 +107,23 @@
+     goto normal_return;
+   }
+   catch(CORBA::SystemException&) {                     
+-    cerr << "main caught CORBA::SystemException." << endl;  
++    std::cerr << "main caught CORBA::SystemException." << std::endl;  
+   }                                                    
+   catch(CORBA::Exception&) {                           
+-    cerr << "main caught CORBA::Exception." << endl;        
++    std::cerr << "main caught CORBA::Exception." << std::endl;        
+   }                                                    
+ #if defined(__OMNIORB3__) || defined(__OMNIORB4__)
+   catch(omniORB::fatalException& fe) {                 
+-    cerr << "main caught omniORB::fatalException:" << endl; 
+-    cerr << "  file: " << fe.file() << endl;           
+-    cerr << "  line: " << fe.line() << endl;           
+-    cerr << "  mesg: " << fe.errmsg() << endl;         
++    std::cerr << "main caught omniORB::fatalException:" << std::endl; 
++    std::cerr << "  file: " << fe.file() << std::endl;           
++    std::cerr << "  line: " << fe.line() << std::endl;           
++    std::cerr << "  mesg: " << fe.errmsg() << std::endl;         
+   }                                                    
+ #endif
+   catch(...) {                                         
+     // nameclt comment says it is a bad idea to report an error here 
+   }
+-  cerr << "main caught an exception." << endl;       
++  std::cerr << "main caught an exception." << std::endl;       
+  error_return:
+   // orb->destroy();
+   return -1;
+diff -Naur --exclude=CVS omniNotify-2.1.orig/include/ModFlexLexer.h omniNotify-2.1.new/include/ModFlexLexer.h
+--- omniNotify-2.1.orig/include/ModFlexLexer.h 2003-10-23 08:39:11.000000000 +0400
++++ omniNotify-2.1.new/include/ModFlexLexer.h  2009-06-28 17:03:57.000000000 +0400
+@@ -31,10 +31,10 @@
+  
+ // XXX ModFlexLexer overrides the 2 yylex decls, from
+ // XXX        int yylex()
+-// XXX        int yylex( istream* new_in, ostream* new_out = 0 )
++// XXX        int yylex( std::istream* new_in, std::ostream* new_out = 0 )
+ // XXX to
+ // XXX        int yylex(YYSTYPE* lvalp, RDI_PCState* ps)
+-// XXX        int yylex(YYSTYPE* lvalp, RDI_PCState* ps, istream* new_in, ostream* new_out = 0 )
++// XXX        int yylex(YYSTYPE* lvalp, RDI_PCState* ps, std::istream* new_in, std::ostream* new_out = 0 )
+ // XXX 
+ // XXX It therefore requires these 2 lines:
+ #include "RDIConstraint.h"
+@@ -88,7 +88,8 @@
+ // Never included before - need to define base class.
+ #define __FLEX_LEXER_H
+-#include <iostream.h>
++#include <iostream>
++
+ extern "C++" {
+@@ -105,16 +106,16 @@
+       virtual void
+               yy_switch_to_buffer( struct yy_buffer_state* new_buffer ) = 0;
+       virtual struct yy_buffer_state*
+-              yy_create_buffer( istream* s, int size ) = 0;
++              yy_create_buffer( std::istream* s, int size ) = 0;
+       virtual void yy_delete_buffer( struct yy_buffer_state* b ) = 0;
+-      virtual void yyrestart( istream* s ) = 0;
++      virtual void yyrestart( std::istream* s ) = 0;
+       virtual int yylex(YYSTYPE* lvalp, RDI_PCState* ps) = 0;
+       //      virtual int yylex() = 0;
+       // Call yylex with new input/output sources.
+-      int yylex(YYSTYPE* lvalp, RDI_PCState* ps, istream* new_in, ostream* new_out = 0 )
+-      // int yylex( istream* new_in, ostream* new_out = 0 )
++      int yylex(YYSTYPE* lvalp, RDI_PCState* ps, std::istream* new_in, std::ostream* new_out = 0 )
++      // int yylex( std::istream* new_in, std::ostream* new_out = 0 )
+               {
+               switch_streams( new_in, new_out );
+               return yylex(lvalp, ps);
+@@ -122,8 +123,8 @@
+       // Switch to new input/output streams.  A nil stream pointer
+       // indicates "keep the current one".
+-      virtual void switch_streams( istream* new_in = 0,
+-                                      ostream* new_out = 0 ) = 0;
++      virtual void switch_streams( std::istream* new_in = 0,
++                                      std::ostream* new_out = 0 ) = 0;
+       int lineno() const              { return yylineno; }
+@@ -150,17 +151,17 @@
+ public:
+       // arg_yyin and arg_yyout default to the cin and cout, but we
+       // only make that assignment when initializing in yylex().
+-      yyFlexLexer( istream* arg_yyin = 0, ostream* arg_yyout = 0 );
++      yyFlexLexer( std::istream* arg_yyin = 0, std::ostream* arg_yyout = 0 );
+       virtual ~yyFlexLexer();
+       void yy_switch_to_buffer( struct yy_buffer_state* new_buffer );
+-      struct yy_buffer_state* yy_create_buffer( istream* s, int size );
++      struct yy_buffer_state* yy_create_buffer( std::istream* s, int size );
+       void yy_delete_buffer( struct yy_buffer_state* b );
+-      void yyrestart( istream* s );
++      void yyrestart( std::istream* s );
+       virtual int yylex(YYSTYPE* lvalp, RDI_PCState* ps);
+-      virtual void switch_streams( istream* new_in, ostream* new_out );
++      virtual void switch_streams( std::istream* new_in, std::ostream* new_out );
+ protected:
+       virtual int LexerInput( char* buf, int max_size );
+@@ -171,7 +172,7 @@
+       int yyinput();
+       void yy_load_buffer_state();
+-      void yy_init_buffer( struct yy_buffer_state* b, istream* s );
++      void yy_init_buffer( struct yy_buffer_state* b, std::istream* s );
+       void yy_flush_buffer( struct yy_buffer_state* b );
+       int yy_start_stack_ptr;
+@@ -186,8 +187,8 @@
+       yy_state_type yy_try_NUL_trans( yy_state_type current_state );
+       int yy_get_next_buffer();
+-      istream* yyin;  // input source for default LexerInput
+-      ostream* yyout; // output sink for default LexerOutput
++      std::istream* yyin;     // input source for default LexerInput
++      std::ostream* yyout;    // output sink for default LexerOutput
+       struct yy_buffer_state* yy_current_buffer;
+diff -Naur --exclude=CVS omniNotify-2.1.orig/lib/RDIParser_l.cc omniNotify-2.1.new/lib/RDIParser_l.cc
+--- omniNotify-2.1.orig/lib/RDIParser_l.cc     2003-10-23 08:39:12.000000000 +0400
++++ omniNotify-2.1.new/lib/RDIParser_l.cc      2009-06-28 17:06:28.000000000 +0400
+@@ -53,7 +53,7 @@
+ #ifdef __cplusplus
+ #include <stdlib.h>
+-#include <iostream.h>
++#include <iostream>
+ /* Use prototypes in function declarations. */
+ #define YY_USE_PROTOS
+@@ -172,7 +172,7 @@
+ struct yy_buffer_state
+       {
+-      istream* yy_input_file;
++      std::istream* yy_input_file;
+       char *yy_ch_buf;                /* input buffer */
+       char *yy_buf_pos;               /* current position in input buffer */
+@@ -1764,10 +1764,10 @@
+                       yy_start = 1;   /* first start state */
+               if ( ! yyin )
+-                      yyin = &cin;
++                      yyin = &std::cin;
+               if ( ! yyout )
+-                      yyout = &cout;
++                      yyout = &std::cout;
+               if ( ! yy_current_buffer )
+                       yy_current_buffer =
+@@ -2123,7 +2123,7 @@
+               } /* end of scanning one token */
+       } /* end of yylex */
+-yyFlexLexer::yyFlexLexer( istream* arg_yyin, ostream* arg_yyout )
++yyFlexLexer::yyFlexLexer( std::istream* arg_yyin, std::ostream* arg_yyout )
+       {
+       yyin = arg_yyin;
+       yyout = arg_yyout;
+@@ -2157,7 +2157,7 @@
+       yy_delete_buffer( yy_current_buffer );
+       }
+-void yyFlexLexer::switch_streams( istream* new_in, ostream* new_out )
++void yyFlexLexer::switch_streams( std::istream* new_in, std::ostream* new_out )
+       {
+       if ( new_in )
+               {
+@@ -2497,7 +2497,7 @@
+       }
+-void yyFlexLexer::yyrestart( istream* input_file )
++void yyFlexLexer::yyrestart( std::istream* input_file )
+       {
+       if ( ! yy_current_buffer )
+               yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
+@@ -2541,7 +2541,7 @@
+       }
+-YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( istream* file, int size )
++YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( std::istream* file, int size )
+       {
+       YY_BUFFER_STATE b;
+@@ -2582,7 +2582,7 @@
+ extern "C" int isatty YY_PROTO(( int ));
+-void yyFlexLexer::yy_init_buffer( YY_BUFFER_STATE b, istream* file )
++void yyFlexLexer::yy_init_buffer( YY_BUFFER_STATE b, std::istream* file )
+       {
+       yy_flush_buffer( b );
+@@ -2681,7 +2681,7 @@
+ void yyFlexLexer::LexerError( yyconst char msg[] )
+       {
+-      cerr << msg << '\n';
++      std::cerr << msg << '\n';
+       exit( YY_EXIT_FAILURE );
+       }
diff --git a/config/patches/omniorb.002_omninotify_64bits.patch b/config/patches/omniorb.002_omninotify_64bits.patch
new file mode 100755 (executable)
index 0000000..ed9997a
--- /dev/null
@@ -0,0 +1,94 @@
+diff -Naur omniNotify-orig/include/RDIstrstream.h omniNotify/include/RDIstrstream.h
+--- omniNotify/include/RDIstrstream.h  2003-10-12 22:51:15.000000000 +0400
++++ omniNotify/include/RDIstrstream.h  2006-09-28 17:44:20.000000000 +0400
+@@ -57,8 +57,10 @@
+   RDIstrstream& operator<<(const void *p);
+   RDIstrstream& operator<<(int n);
+   RDIstrstream& operator<<(unsigned int n);
++#ifndef HAS_LongLong
+   RDIstrstream& operator<<(long n);
+   RDIstrstream& operator<<(unsigned long n);
++#endif
+   RDIstrstream& operator<<(short n) {return operator<<((int)n);}
+   RDIstrstream& operator<<(unsigned short n) {return operator<<((unsigned int)n);}
+ #ifdef HAS_LongLong
+diff -Naur omniNotify-orig/include/RDITimeWrappers.h omniNotify/include/RDITimeWrappers.h
+--- omniNotify/include/RDITimeWrappers.h       2003-10-23 17:28:18.000000000 +0400
++++ omniNotify/include/RDITimeWrappers.h       2006-09-28 18:10:41.000000000 +0400
+@@ -236,8 +236,11 @@
+   // pretty-printing of absolute local time -- no newline
+   void out_local(RDIstrstream& str) {
+     CORBA::ULong ts, tn;
+-    get_posixbase_secs_nanosecs(ts, tn);
+-    RDI_posixbase_out_time(str, ts, tn);
++    unsigned long ts3, tn3;   
++    get_posixbase_secs_nanosecs(ts3, tn3);
++    RDI_posixbase_out_time(str, ts3, tn3);
++    ts = (CORBA::ULong)ts3;
++    tn = (CORBA::ULong)tn3;
+     str << " (local time)";
+   }
+@@ -396,8 +399,11 @@
+   // pretty-printing of absolute univ time -- no newline
+   void out_gmt(RDIstrstream& str) {
+     CORBA::ULong ts, tn;
+-    get_gmt_posixbase_secs_nanosecs(ts, tn);
+-    RDI_posixbase_out_time(str, ts, tn);
++    unsigned long ts4, tn4;
++    get_gmt_posixbase_secs_nanosecs(ts4, tn4);
++    RDI_posixbase_out_time(str, ts4, tn4);
++    ts = (CORBA::ULong)ts4;
++    tn = (CORBA::ULong)tn4;
+     str << " (greenwich mean time)";
+   }
+   // static helpers for producing TimeBase::UtcT min and max
+diff -Naur omniNotify-orig/lib/RDIstrstream.cc omniNotify/lib/RDIstrstream.cc
+--- omniNotify/lib/RDIstrstream.cc     2003-10-23 08:39:12.000000000 +0400
++++ omniNotify/lib/RDIstrstream.cc     2006-09-28 16:56:03.000000000 +0400
+@@ -175,6 +175,7 @@
+   return *this;
+ }
++#ifndef HAS_LongLong
+ RDIstrstream&
+ RDIstrstream::operator<<(long n)
+ {
+@@ -194,6 +195,7 @@
+   width_fill();
+   return *this;
+ }
++#endif
+ #ifdef HAS_LongLong
+ RDIstrstream&
+diff -Naur omniNotify-orig/lib/RDITimeWrappers.cc omniNotify/lib/RDITimeWrappers.cc
+--- omniNotify/lib/RDITimeWrappers.cc  2003-10-23 08:39:12.000000000 +0400
++++ omniNotify/lib/RDITimeWrappers.cc  2006-09-28 16:56:09.000000000 +0400
+@@ -147,7 +147,10 @@
+ #define WHATFN "RDI_TimeT::fmt_local"
+ const char *RDI_TimeT::fmt_local() {
+   CORBA::ULong ts, tm;
+-  get_posixbase_secs_msecs(ts, tm);
++  unsigned long ts2, tm2;
++  get_posixbase_secs_msecs(ts2, tm2);
++  ts = (CORBA::ULong)ts2;
++  tm = (CORBA::ULong)tm2;
+   time_t secs_as_time_t = ts;
+   TW_SCOPE_LOCK(otime_lock, RDI_out_time_lock, "RDI_out_time", WHATFN);
+   RDI_TimeT_fmt_local_buf_idx = (RDI_TimeT_fmt_local_buf_idx + 1) % 10;
+diff -Naur omniNotify/mk/beforeauto.mk.in omniNotify/mk/beforeauto.mk.in
+--- omniNotify/mk/beforeauto.mk.in     2003-10-29 22:18:36.000000000 +0300
++++ omniNotify/mk/beforeauto.mk.in     2006-10-13 16:58:26.000000000 +0400
+@@ -95,9 +95,9 @@
+ CPPFLAGS = $(DIR_CPPFLAGS) $(IMPORT_CPPFLAGS)
+-CFLAGS = $(CDEBUGFLAGS) $(COPTIONS) $(CPPFLAGS)
++CFLAGS = -m64 $(CDEBUGFLAGS) $(COPTIONS) $(CPPFLAGS)
+-CXXFLAGS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(CPPFLAGS)
++CXXFLAGS = -m64 $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(CPPFLAGS)
+ #############################################################################
diff --git a/config/patches/opencv.001_compile.patch b/config/patches/opencv.001_compile.patch
new file mode 100644 (file)
index 0000000..9550f24
--- /dev/null
@@ -0,0 +1,22 @@
+diff -NaurwB opencv-2.4.6.1__0/cmake/OpenCVCompilerOptions.cmake opencv-2.4.6.1__1/cmake/OpenCVCompilerOptions.cmake
+--- opencv-2.4.6.1__0/cmake/OpenCVCompilerOptions.cmake        2013-07-10 15:49:00.000000000 +0400
++++ opencv-2.4.6.1__1/cmake/OpenCVCompilerOptions.cmake        2017-03-15 17:06:11.464387144 +0300
+@@ -1,14 +1,14 @@
+-if(MINGW OR (X86 AND UNIX AND NOT APPLE))
+-  # mingw compiler is known to produce unstable SSE code with -O3 hence we are trying to use -O2 instead
++if(1 OR MINGW OR (X86 AND UNIX AND NOT APPLE))
++  # mingw compiler is known to produce unstable SSE code with -O3 hence we are trying to use -O0 instead
+   if(CMAKE_COMPILER_IS_GNUCXX)
+     foreach(flags CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_DEBUG)
+-      string(REPLACE "-O3" "-O2" ${flags} "${${flags}}")
++      string(REPLACE "-O3" "-O0" ${flags} "${${flags}}")
+     endforeach()
+   endif()
+   if(CMAKE_COMPILER_IS_GNUCC)
+     foreach(flags CMAKE_C_FLAGS CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_DEBUG)
+-      string(REPLACE "-O3" "-O2" ${flags} "${${flags}}")
++      string(REPLACE "-O3" "-O0" ${flags} "${${flags}}")
+     endforeach()
+   endif()
+ endif()
diff --git a/config/patches/opencv.002_gcc6.patch b/config/patches/opencv.002_gcc6.patch
new file mode 100644 (file)
index 0000000..79c8045
--- /dev/null
@@ -0,0 +1,131 @@
+diff -Naur opencv-2.4.6.1_SRC_orig/cmake/OpenCVPCHSupport.cmake opencv-2.4.6.1_SRC_modif/cmake/OpenCVPCHSupport.cmake
+--- opencv-2.4.6.1_SRC_orig/cmake/OpenCVPCHSupport.cmake       2013-07-10 15:49:00.000000000 +0400
++++ opencv-2.4.6.1_SRC_modif/cmake/OpenCVPCHSupport.cmake      2016-10-17 17:34:32.000000000 +0300
+@@ -19,7 +19,7 @@
+         ARGS ${CMAKE_CXX_COMPILER_ARG1} -dumpversion
+         OUTPUT_VARIABLE gcc_compiler_version)
+     #MESSAGE("GCC Version: ${gcc_compiler_version}")
+-    IF(gcc_compiler_version VERSION_GREATER "4.2.-1")
++    IF(gcc_compiler_version VERSION_GREATER "4.2.-1" AND gcc_compiler_version VERSION_LESS "6.0.0")
+         SET(PCHSupport_FOUND TRUE)
+     ENDIF()
+diff -Naur opencv-2.4.6.1_SRC_orig/modules/contrib/src/chamfermatching.cpp opencv-2.4.6.1_SRC_modif/modules/contrib/src/chamfermatching.cpp
+--- opencv-2.4.6.1_SRC_orig/modules/contrib/src/chamfermatching.cpp    2013-07-10 15:49:00.000000000 +0400
++++ opencv-2.4.6.1_SRC_modif/modules/contrib/src/chamfermatching.cpp   2016-10-17 18:11:47.000000000 +0300
+@@ -959,10 +959,8 @@
+     for (int y=0;y<h;++y) {
+         for (int x=0;x<w;++x) {
+             // initialize
+-            if (&annotate_img!=NULL) {
+-                annotate_img.at<Vec2i>(y,x)[0]=x;
+-                annotate_img.at<Vec2i>(y,x)[1]=y;
+-            }
++          annotate_img.at<Vec2i>(y,x)[0]=x;
++            annotate_img.at<Vec2i>(y,x)[1]=y;
+             uchar edge_val = edges_img.at<uchar>(y,x);
+             if( (edge_val!=0) ) {
+@@ -1005,11 +1003,9 @@
+             if (dt==-1 || dt>dist) {
+                 dist_img.at<float>(ny,nx) = dist;
+                 q.push(std::make_pair(nx,ny));
+-
+-                if (&annotate_img!=NULL) {
+-                    annotate_img.at<Vec2i>(ny,nx)[0]=annotate_img.at<Vec2i>(y,x)[0];
+-                    annotate_img.at<Vec2i>(ny,nx)[1]=annotate_img.at<Vec2i>(y,x)[1];
+-                }
++              
++              annotate_img.at<Vec2i>(ny,nx)[0]=annotate_img.at<Vec2i>(y,x)[0];
++              annotate_img.at<Vec2i>(ny,nx)[1]=annotate_img.at<Vec2i>(y,x)[1];
+             }
+         }
+     }
+@@ -1101,26 +1097,24 @@
+     float cost = (sum_distance/truncate_)/addr.size();
+-    if (&orientation_img!=NULL) {
+-        float* optr = orientation_img.ptr<float>(y)+x;
+-        float sum_orientation = 0;
+-        int cnt_orientation = 0;
+-
+-        for (size_t i=0;i<addr.size();++i) {
+-
+-            if(addr[i] < (orientation_img.cols*orientation_img.rows) - (offset.y*orientation_img.cols + offset.x)){
+-                                if (tpl->orientations[i]>=-CV_PI && (*(optr+addr[i]))>=-CV_PI) {
+-                    sum_orientation += orientation_diff(tpl->orientations[i], (*(optr+addr[i])));
+-                    cnt_orientation++;
+-                }
+-            }
+-        }
+-        if (cnt_orientation>0) {
+-                        cost = (float)(beta*cost+alpha*(sum_orientation/(2*CV_PI))/cnt_orientation);
+-        }
+-
+-    }
++    float* optr = orientation_img.ptr<float>(y)+x;
++    float sum_orientation = 0;
++    int cnt_orientation = 0;
++    
++    for (size_t i=0;i<addr.size();++i) {
++      
++      if(addr[i] < (orientation_img.cols*orientation_img.rows) - (offset.y*orientation_img.cols + offset.x)){
++      if (tpl->orientations[i]>=-CV_PI && (*(optr+addr[i]))>=-CV_PI) {
++        sum_orientation += orientation_diff(tpl->orientations[i], (*(optr+addr[i])));
++        cnt_orientation++;
++      }
++      }
++    }
++    
++    if (cnt_orientation>0) {
++      cost = (float)(beta*cost+alpha*(sum_orientation/(2*CV_PI))/cnt_orientation);
++    }    
+     if(cost > 0){
+         ChamferMatcher::Match* istance = new ChamferMatcher::Match();
+diff -Naur opencv-2.4.6.1_SRC_orig/modules/legacy/src/dpstereo.cpp opencv-2.4.6.1_SRC_modif/modules/legacy/src/dpstereo.cpp
+--- opencv-2.4.6.1_SRC_orig/modules/legacy/src/dpstereo.cpp    2013-07-10 15:49:00.000000000 +0400
++++ opencv-2.4.6.1_SRC_modif/modules/legacy/src/dpstereo.cpp   2016-10-18 10:22:03.257968598 +0300
+@@ -76,8 +76,8 @@
+     uchar min_val, max_val;
+ } _CvRightImData;
+-#define CV_IMAX3(a,b,c) ((temp3 = (a) >= (b) ? (a) : (b)),(temp3 >= (c) ? temp3 : (c)))
+-#define CV_IMIN3(a,b,c) ((temp3 = (a) <= (b) ? (a) : (b)),(temp3 <= (c) ? temp3 : (c)))
++#define CV_IMAX3(a,b,c) (std::max(std::max((a), (b)), (c)))
++#define CV_IMIN3(a,b,c) (std::min(std::min((a), (b)), (c)))
+ static void icvFindStereoCorrespondenceByBirchfieldDP( uchar* src1, uchar* src2,
+                                                 uchar* disparities,
+@@ -87,7 +87,7 @@
+                                                 float  _param3, float _param4,
+                                                 float  _param5 )
+ {
+-    int     x, y, i, j, temp3;
++    int     x, y, i, j;
+     int     d, s;
+     int     dispH =  maxDisparity + 3;
+     uchar  *dispdata;
+diff -Naur opencv-2.4.6.1_SRC_orig/modules/ts/include/opencv2/ts/ts_perf.hpp opencv-2.4.6.1_SRC_modif/modules/ts/include/opencv2/ts/ts_perf.hpp
+--- opencv-2.4.6.1_SRC_orig/modules/ts/include/opencv2/ts/ts_perf.hpp  2013-07-10 15:49:00.000000000 +0400
++++ opencv-2.4.6.1_SRC_modif/modules/ts/include/opencv2/ts/ts_perf.hpp 2016-10-17 17:52:29.000000000 +0300
+@@ -475,9 +475,16 @@
+     INSTANTIATE_TEST_CASE_P(/*none*/, fixture##_##name, params);\
+     void fixture##_##name::PerfTestBody()
++   #if defined(_MSC_VER) && (_MSC_VER <= 1400)
++    #define CV_PERF_TEST_MAIN_INTERNALS_ARGS(...)     \
++      while (++argc >= (--argc,-1)) {__VA_ARGS__; break;} /*this ugly construction is needed for VS 2005*/
++    #else
++    #define CV_PERF_TEST_MAIN_INTERNALS_ARGS(...) \
++      __VA_ARGS__;
++    #endif
+ #define CV_PERF_TEST_MAIN_INTERNALS(modulename, impls, ...) \
+-    while (++argc >= (--argc,-1)) {__VA_ARGS__; break;} /*this ugly construction is needed for VS 2005*/\
++    CV_PERF_TEST_MAIN_INTERNALS_ARGS(__VA_ARGS__) \
+     ::perf::Regression::Init(#modulename);\
+     ::perf::TestBase::Init(std::vector<std::string>(impls, impls + sizeof impls / sizeof *impls),\
+                            argc, argv);\
diff --git a/config/patches/paco++.001_gcc44_compat.patch b/config/patches/paco++.001_gcc44_compat.patch
new file mode 100644 (file)
index 0000000..79433d0
--- /dev/null
@@ -0,0 +1,11 @@
+diff -NaurwB paco++-0.5.5__0/src/kernel/PaCO++_InterfaceParallel_impl.cc paco++-0.5.5__1/src/kernel/PaCO++_InterfaceParallel_impl.cc
+--- paco++-0.5.5__0/src/kernel/PaCO++_InterfaceParallel_impl.cc        2009-03-27 11:35:04.000000000 +0300
++++ paco++-0.5.5__1/src/kernel/PaCO++_InterfaceParallel_impl.cc        2017-03-15 17:13:17.906662733 +0300
+@@ -16,6 +16,7 @@
+ //  
+ //  Author : André RIBES (EDF R&D)
++#include <unistd.h>
+ #include "PaCO++_InterfaceParallel_impl.h"
+ InterfaceParallel_impl::InterfaceParallel_impl(CORBA::ORB_ptr orb, 
diff --git a/config/patches/paraview.001_vtk_targets.patch b/config/patches/paraview.001_vtk_targets.patch
new file mode 100644 (file)
index 0000000..2830ed5
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/VTK/CMake/vtkModuleTop.cmake     2015-12-16 20:17:55.000000000 +0300
++++ b/VTK/CMake/vtkModuleTop.cmake     2016-02-08 16:12:02.000000000 +0300
+@@ -503,6 +503,7 @@
+   get_property(VTK_TARGETS GLOBAL PROPERTY VTK_TARGETS)
+   if(VTK_TARGETS)
+     install(EXPORT ${VTK_INSTALL_EXPORT_NAME}  DESTINATION ${VTK_INSTALL_PACKAGE_DIR} FILE ${VTK_INSTALL_EXPORT_NAME}.cmake)
++    install(EXPORT ${VTK_INSTALL_EXPORT_NAME}  DESTINATION ${VTK_INSTALL_PACKAGE_DIR} FILE VTKTargets.cmake)
+   else()
+     set(CMAKE_CONFIGURABLE_FILE_CONTENT "# No targets!")
+     configure_file(${CMAKE_ROOT}/Modules/CMakeConfigurableFile.in
+
diff --git a/config/patches/paraview.002_visitbridge.patch b/config/patches/paraview.002_visitbridge.patch
new file mode 100644 (file)
index 0000000..dd460f1
--- /dev/null
@@ -0,0 +1,1822 @@
+--- ParaView-5.0.1_SRC.orig/Utilities/VisItBridge/databases/paraDIS/paraDIS_lib/paradis.C      2016-05-11 15:00:58.000000000 +0300
++++ ParaView-5.0.1_SRC.patch/Utilities/VisItBridge/databases/paraDIS/paraDIS_lib/paradis.C     2016-05-11 15:04:14.000000000 +0300
+@@ -203,28 +203,28 @@
+   rclib::Point<float> FullNode::mBoundsMin, FullNode::mBoundsMax, FullNode::mBoundsSize; 
+   string FullNode::mTraceFileBasename; 
+-  vector<uint32_t> FullNode::mTraceNodes; 
+-  std::map<uint32_t, FullNode *>  FullNode::mFullNodes;  
++  vector<boost::uint32_t> FullNode::mTraceNodes; 
++  std::map<boost::uint32_t, FullNode *>  FullNode::mFullNodes;  
+   vector<FullNode*> FullNode::mFullNodeVector; 
+-  uint32_t FullNode::mNextNodeID = 0; 
++  boost::uint32_t FullNode::mNextNodeID = 0; 
+-  std::map<uint32_t, ArmSegment *> ArmSegment::mArmSegments; 
++  std::map<boost::uint32_t, ArmSegment *> ArmSegment::mArmSegments; 
+   vector<ArmSegment*> ArmSegment::mArmSegmentVector; 
+-  uint32_t ArmSegment::mNextSegmentID = 0; 
++  boost::uint32_t ArmSegment::mNextSegmentID = 0; 
+   double ArmSegment::mSegLen = 0 ;
+-  uint32_t ArmSegment::mNumClassified = 0; 
+-  uint32_t ArmSegment::mNumWrapped = 0;
+-  uint32_t ArmSegment::mNumArmSegmentsMeasured=0; 
++  boost::uint32_t ArmSegment::mNumClassified = 0; 
++  boost::uint32_t ArmSegment::mNumWrapped = 0;
++  boost::uint32_t ArmSegment::mNumArmSegmentsMeasured=0; 
+   
+   vector<Arm *> Arm::mArms;
+-  vector<int32_t> Arm::mTraceArms; 
+-  uint8_t Arm::mTraceDepth; 
++  vector<boost::int32_t> Arm::mTraceArms; 
++  boost::uint8_t Arm::mTraceDepth; 
+   string Arm::mTraceFileBasename; 
+   double Arm::mLongestLength = 0.0; 
+   double Arm::mDecomposedLength = 0.0; 
+-  vector<int32_t> Arm::mNumDecomposed(7, 0); // statistics
+-  int32_t Arm::mNumDestroyedInDetachment = 0; 
++  vector<boost::int32_t> Arm::mNumDecomposed(7, 0); // statistics
++  boost::int32_t Arm::mNumDestroyedInDetachment = 0; 
+   double Arm::mTotalArmLengthBeforeDecomposition = 0.0;
+   double Arm::mTotalArmLengthAfterDecomposition = 0.0;  
+   double Arm::mThreshold = -1; 
+@@ -236,7 +236,7 @@
+   //===========================================================================
+-  void WriteTraceFiles(string filebase, string description, vector<Arm*>&arms, vector<uint32_t> &armdepths, vector<int> &action) {
++  void WriteTraceFiles(string filebase, string description, vector<Arm*>&arms, vector<boost::uint32_t> &armdepths, vector<int> &action) {
+     // ===================================
+     // FIRST, PRINT THE TEXT FILE
+     string filename = filebase + ".txt"; 
+@@ -249,8 +249,8 @@
+     }
+     textfile << "Tracefile for " << description << ", written by paraDIS_lib" << endl; 
+     textfile.flush(); 
+-    uint32_t level = 0; 
+-    for (uint32_t arm = 0; arm < arms.size(); arm++) {
++    boost::uint32_t level = 0; 
++    for (boost::uint32_t arm = 0; arm < arms.size(); arm++) {
+       if (armdepths[arm] == level) { // this is weird, don't worry
+         textfile << str(boost::format("\n****************\nARM LEVEL %1%\n****************\n\n")%level); 
+         textfile.flush(); 
+@@ -285,23 +285,23 @@
+   
+     // next, the points
+     vector<FullNode *>nodes; 
+-    vector<uint32_t>numArmNodes; 
+-    for (uint32_t arm = 0; arm < arms.size(); arm++) {
++    vector<boost::uint32_t>numArmNodes; 
++    for (boost::uint32_t arm = 0; arm < arms.size(); arm++) {
+       vector<FullNode *> armnodes = arms[arm]->GetNodes(); 
+       numArmNodes.push_back(armnodes.size()); 
+       nodes.insert(nodes.end(), armnodes.begin(), armnodes.end()); 
+     }
+-    uint32_t armnum = 0, armnode = 0; 
++    boost::uint32_t armnum = 0, armnode = 0; 
+     vector<float> previous; 
+     vtkfile << str(boost::format("POINTS %d float") % nodes.size()) << endl;
+-    for (uint32_t point = 0; point < nodes.size(); point++) {
++    for (boost::uint32_t point = 0; point < nodes.size(); point++) {
+       if (armnode == numArmNodes[armnum]) {
+         armnode = 0;         
+         armnum++; 
+       } 
+       vector<float> xyz = nodes[point]->GetLocation(); 
+       if (point > 0) {
+-        for (uint32_t i=0; i<3; i++) {
++        for (boost::uint32_t i=0; i<3; i++) {
+           if (xyz[i] - previous[i] > FullNode::mBoundsSize[i]/2){
+             xyz[i] -= FullNode::mBoundsSize[i]; 
+           } 
+@@ -323,10 +323,10 @@
+     // next the lines
+     int numlines = nodes.size() - arms.size(); 
+     vtkfile << str(boost::format("LINES %d %d") % numlines % (3*numlines)) << endl;
+-    uint32_t currentIndex = 0; 
+-    for (uint32_t arm = 0; arm < arms.size(); arm++) {
++    boost::uint32_t currentIndex = 0; 
++    for (boost::uint32_t arm = 0; arm < arms.size(); arm++) {
+       if (numArmNodes[arm]) {
+-        for (uint32_t nodenum = 0; nodenum < numArmNodes[arm]-1; nodenum++) {
++        for (boost::uint32_t nodenum = 0; nodenum < numArmNodes[arm]-1; nodenum++) {
+           vtkfile << str(boost::format("2 %d %d")% currentIndex % (currentIndex+1)) << endl;
+           currentIndex++; 
+         }
+@@ -340,12 +340,12 @@
+     vtkfile << "SCALARS armnum int" << endl;
+     vtkfile << "LOOKUP_TABLE default" << endl;
+     vtkfile.flush(); 
+-    for (uint32_t arm = 0; arm < arms.size(); arm++) {
++    for (boost::uint32_t arm = 0; arm < arms.size(); arm++) {
+       if (!numArmNodes[arm]) {
+         continue;
+       }
+-      uint32_t armnum = arms[arm]->mArmID;
+-      for (uint32_t nodenum = 0; nodenum < numArmNodes[arm]-1; nodenum++) {
++      boost::uint32_t armnum = arms[arm]->mArmID;
++      for (boost::uint32_t nodenum = 0; nodenum < numArmNodes[arm]-1; nodenum++) {
+         vtkfile << armnum << " " ; 
+         vtkfile.flush(); 
+       }        
+@@ -355,12 +355,12 @@
+     // next the burgers type for each line
+     vtkfile << "SCALARS burgers_type int" << endl;
+     vtkfile << "LOOKUP_TABLE default" << endl;
+-    for (uint32_t arm = 0; arm < arms.size(); arm++) {
++    for (boost::uint32_t arm = 0; arm < arms.size(); arm++) {
+       if (!numArmNodes[arm]) {
+         continue;
+       }
+-      uint32_t armtype = arms[arm]->GetBurgersType(); 
+-      for (uint32_t nodenum = 0; nodenum < numArmNodes[arm]-1; nodenum++) {
++      boost::uint32_t armtype = arms[arm]->GetBurgersType(); 
++      for (boost::uint32_t nodenum = 0; nodenum < numArmNodes[arm]-1; nodenum++) {
+         vtkfile << armtype << " " ; 
+         vtkfile.flush(); 
+       }
+@@ -371,11 +371,11 @@
+     // next the arm depths for each line
+     vtkfile << "SCALARS BFS_depth int" << endl;
+     vtkfile << "LOOKUP_TABLE default" << endl;
+-    for (uint32_t arm = 0; arm < arms.size(); arm++) {
++    for (boost::uint32_t arm = 0; arm < arms.size(); arm++) {
+       if (!numArmNodes[arm]) {
+         continue;
+       }
+-      for (uint32_t nodenum = 0; nodenum < numArmNodes[arm]-1; nodenum++) {
++      for (boost::uint32_t nodenum = 0; nodenum < numArmNodes[arm]-1; nodenum++) {
+         vtkfile << armdepths[arm] << " " ; 
+       }
+     }
+@@ -384,11 +384,11 @@
+     // next the "action" for each line
+     vtkfile << "SCALARS action int" << endl;
+     vtkfile << "LOOKUP_TABLE default" << endl;
+-    for (uint32_t arm = 0; arm < arms.size(); arm++) {
++    for (boost::uint32_t arm = 0; arm < arms.size(); arm++) {
+       if (!numArmNodes[arm]) {
+         continue;
+       }
+-      for (uint32_t nodenum = 0; nodenum < numArmNodes[arm]-1; nodenum++) {
++      for (boost::uint32_t nodenum = 0; nodenum < numArmNodes[arm]-1; nodenum++) {
+         vtkfile << action[arm] << " " ; 
+       }
+     }
+@@ -421,14 +421,14 @@
+     // next, the points
+     armnum = 0; armnode = 0; 
+     vtkfile << str(boost::format("POINTS %d float") % nodes.size()) << endl;
+-    for (uint32_t point = 0; point < nodes.size(); point++) {
++    for (boost::uint32_t point = 0; point < nodes.size(); point++) {
+       if (armnode == numArmNodes[armnum]) {
+         armnode = 0;         
+         armnum++; 
+       } 
+       vector<float> xyz = nodes[point]->GetLocation(); 
+       if (point > 0) {
+-        for (uint32_t i=0; i<3; i++) {
++        for (boost::uint32_t i=0; i<3; i++) {
+           if (xyz[i] - previous[i] > FullNode::mBoundsSize[i]/2){
+             xyz[i] -= FullNode::mBoundsSize[i]; 
+           } 
+@@ -449,7 +449,7 @@
+   
+     // now node vertices to allow node plotting
+     vtkfile << str(boost::format("VERTICES %d %d") % nodes.size() % (2*nodes.size())) << endl;
+-    for (uint32_t point = 0; point < nodes.size(); point++) {
++    for (boost::uint32_t point = 0; point < nodes.size(); point++) {
+       vtkfile << "1 " << point << endl; 
+       vtkfile.flush(); 
+     } 
+@@ -459,8 +459,8 @@
+     vtkfile << str(boost::format("CELL_DATA %d") % nodes.size()) << endl;
+     vtkfile << "SCALARS node_index int" << endl;
+     vtkfile << "LOOKUP_TABLE default" << endl;
+-    for (uint32_t point = 0; point < nodes.size(); point++) {
+-      uint32_t nodeID = nodes[point]->GetIndex(); 
++    for (boost::uint32_t point = 0; point < nodes.size(); point++) {
++      boost::uint32_t nodeID = nodes[point]->GetIndex(); 
+       vtkfile <<  nodeID << " "; 
+       vtkfile.flush(); 
+     } 
+@@ -558,7 +558,7 @@
+   
+   //===========================================================================
+   void FullNode::PrintAllNodeTraces(string stepname) {
+-    for (vector<uint32_t>::iterator nodeid = FullNode::mTraceNodes.begin(); 
++    for (vector<boost::uint32_t>::iterator nodeid = FullNode::mTraceNodes.begin(); 
+          nodeid != mTraceNodes.end(); nodeid++) {
+       if (FullNode::mFullNodes.find(*nodeid) == FullNode::mFullNodes.end()) {
+          if (*nodeid < FullNode::mFullNodes.size()) {
+@@ -582,7 +582,7 @@
+     dbprintf(5, "Node::WriteTraceFiles(node %d)\n", mNodeIndex); 
+     string filebase = str(boost::format("%s-%s-Node_%d") % mTraceFileBasename % stepname % mNodeIndex); 
+     vector<Arm *> arms; 
+-    vector<uint32_t> armdepths; 
++    vector<boost::uint32_t> armdepths; 
+     vector<int> action; 
+     
+     if (mNeighborArms.size() ) {
+@@ -672,7 +672,7 @@
+         s += "<NONE>"; 
+       } else {
+        s += "<"; 
+-       uint32_t i=0; while (i < mNeighborSegments.size()) {
++       boost::uint32_t i=0; while (i < mNeighborSegments.size()) {
+          if (mNeighborSegments[i]) {
+            s += intToString(mNeighborSegments[i]->GetID()); 
+          } else {
+@@ -688,7 +688,7 @@
+       }
+     } else {
+        s += "\n"; 
+-     uint32_t i=0; while (i < mNeighborSegments.size()) {
++     boost::uint32_t i=0; while (i < mNeighborSegments.size()) {
+         s += INDENT(indent) + "neighbor " + intToString(i) + ": "; 
+         if (mNeighborSegments[i]) {
+           s+= mNeighborSegments[i]->Stringify(indent+1);
+@@ -719,7 +719,7 @@
+       while (neighbor--) {
+         const ArmSegment *theSegment = 
+           dynamic_cast<const ArmSegment *>(mNeighborSegments[neighbor]);
+-        int8_t btype =  theSegment->GetBurgersType(); 
++        boost::int8_t btype =  theSegment->GetBurgersType(); 
+         if (btypes[btype] || btype < 0) {
+           continue; //not a monster, we're done
+         }
+@@ -765,12 +765,12 @@
+    vector<Arm*> armpair(2,NULL); 
+     vector<bool> matched(mNeighborSegments.size(), false); 
+     // first, identify looped cross arms
+-    for (uint32_t segnum = 0; segnum < mNeighborSegments.size()-1; segnum++) {
++    for (boost::uint32_t segnum = 0; segnum < mNeighborSegments.size()-1; segnum++) {
+       if (!matched[segnum] &&
+           mNeighborSegments[segnum]->mParentArm->mTerminalNodes.size() == 1) {
+         dbprintf(4, str(boost::format("FullNode::IdentifyCrossArms(): node(%1%): found crossing loop arm %2%.\n") % GetNodeIDString() % mNeighborSegments[segnum]->mParentArm->mArmID).c_str()); 
+         armpair[0] = NULL;
+-        for (uint32_t match = segnum+1; match < mNeighborSegments.size(); ++match) {
++        for (boost::uint32_t match = segnum+1; match < mNeighborSegments.size(); ++match) {
+           if (!matched[match] && 
+               mNeighborSegments[match]->mParentArm == mNeighborSegments[segnum]->mParentArm ) {
+             matched[segnum] = true; 
+@@ -792,10 +792,10 @@
+     
+     
+     // next, identify non-looped cross arms
+-    for (uint32_t segnum = 0; segnum < mNeighborSegments.size()-1; ++segnum) {
+-      int8_t btype = mNeighborSegments[segnum]->GetBurgersType(); 
++    for (boost::uint32_t segnum = 0; segnum < mNeighborSegments.size()-1; ++segnum) {
++      boost::int8_t btype = mNeighborSegments[segnum]->GetBurgersType(); 
+       if (!matched[segnum]) {
+-        for (uint32_t match = segnum+1; match < mNeighborSegments.size(); ++match) {
++        for (boost::uint32_t match = segnum+1; match < mNeighborSegments.size(); ++match) {
+           if (!matched[match] && 
+               mNeighborSegments[match]->GetBurgersType() == btype) {
+             matched[match] = matched[segnum] = true; 
+@@ -821,7 +821,7 @@
+   void FullNode::DetachCrossArms(void) {
+     
+     vector <vector<Arm *> >crossarms = IdentifyCrossArms(); 
+-    for (uint32_t armpair = 0; armpair < crossarms.size(); ++armpair) {
++    for (boost::uint32_t armpair = 0; armpair < crossarms.size(); ++armpair) {
+       crossarms[armpair][0]->mExtendOrDetach = false; 
+       if (crossarms[armpair][1] == NULL) {
+         crossarms[armpair][0]->DetachLoopFromNode(this); 
+@@ -844,7 +844,7 @@
+     } else {
+       s += "(NONE)\n"; 
+     }
+-    uint32_t epnum = 0; 
++    boost::uint32_t epnum = 0; 
+     while (epnum < 2) {
+       s+= INDENT(indent+1) + "ep "+intToString(epnum)+": "; 
+       if (mEndpoints[epnum]) s+= mEndpoints[epnum]->Stringify(0); 
+@@ -985,17 +985,17 @@
+  //===========================================================================
+-  int8_t ArmSegment::GetMNType(void) const { 
++  boost::int8_t ArmSegment::GetMNType(void) const { 
+     return mParentArm->mArmType; 
+   } 
+  //===========================================================================
+-  uint32_t ArmSegment::GetArmID(void) {    
++  boost::uint32_t ArmSegment::GetArmID(void) {    
+     return mParentArm->mArmID;
+   }
+   //===========================================================================
+-  uint32_t ArmSegment::GetMetaArmID(void) {
++  boost::uint32_t ArmSegment::GetMetaArmID(void) {
+     if (!mParentArm) {
+       dbprintf(0, "ERROR: GetMetaArmID() called on parentless segment.\n"); 
+       return METAARM_UNKNOWN; 
+@@ -1004,7 +1004,7 @@
+   }
+   //===========================================================================
+-  uint8_t ArmSegment::GetMetaArmType(void) {
++  boost::uint8_t ArmSegment::GetMetaArmType(void) {
+     if (!mParentArm) {
+       dbprintf(0, "ERROR: GetMetaArmType() called on parentless segment.\n"); 
+       return METAARM_UNKNOWN; 
+@@ -1021,7 +1021,7 @@
+    */ 
+   void Arm::WriteTraceFiles(string stepname) {
+     bool trace = false; 
+-    for (uint32_t n = 0; n<mTraceArms.size(); n++) {
++    for (boost::uint32_t n = 0; n<mTraceArms.size(); n++) {
+       if (mArmID == mTraceArms[n]) 
+         trace = true; 
+     }
+@@ -1031,7 +1031,7 @@
+     string filebase = str(boost::format("%s-%s-arm_%d") % mTraceFileBasename % stepname % mArmID); 
+     
+     vector<Arm *> arms; 
+-    vector<uint32_t> armdepths; 
++    vector<boost::uint32_t> armdepths; 
+     vector<int> action; 
+     FindBFSNeighbors(arms, armdepths, action); 
+     string description = str(boost::format("arm %1%")%mArmID); 
+@@ -1040,21 +1040,21 @@
+   }
+   //===========================================================================
+-  void Arm::FindBFSNeighbors(vector<Arm *> &arms, vector<uint32_t> &armdepths, vector<int> &action) {
++  void Arm::FindBFSNeighbors(vector<Arm *> &arms, vector<boost::uint32_t> &armdepths, vector<int> &action) {
+     arms.push_back(this); 
+     armdepths.push_back(0);
+     action.push_back(2); 
+     
+     // first, collect the list of arms in BFS order:
+-    uint32_t armnum = 0;
+-    uint32_t depth = 0; 
++    boost::uint32_t armnum = 0;
++    boost::uint32_t depth = 0; 
+     while (depth++ < mTraceDepth && armnum < arms.size()) {
+-      uint32_t lastInLevel = arms.size(); 
++      boost::uint32_t lastInLevel = arms.size(); 
+       for (; armnum < lastInLevel; armnum++) {
+        // append arm's neighbors onto arms
+         Arm *arm = arms[armnum]; 
+         arm->mSeen = true; 
+-        uint32_t numneighbors = arm->GetNumNeighborArms(); 
++        boost::uint32_t numneighbors = arm->GetNumNeighborArms(); 
+         dbprintf(5, "Arm::WriteTraceFiles(arm %d): arm %d, depth %d: looking at %d neighbor arms\n", mArmID, arm->mArmID, depth, numneighbors); 
+        while (numneighbors--) {
+           Arm *nei = arm->GetNeighborArm(numneighbors); 
+@@ -1072,7 +1072,7 @@
+         }
+       }
+     } 
+-    for (uint32_t arm = 0; arm < arms.size(); arm++) {
++    for (boost::uint32_t arm = 0; arm < arms.size(); arm++) {
+       arms[arm]->mSeen = false; 
+     }
+     return ;
+@@ -1176,7 +1176,7 @@
+     
+  //===========================================================================
+-  uint32_t Arm::GetMetaArmID(void) {
++  boost::uint32_t Arm::GetMetaArmID(void) {
+     if (!mParentMetaArm) {
+       dbprintf(0, "Error: GetMetaArmID() called on parentless arm.\n");
+       return METAARM_UNKNOWN; 
+@@ -1185,7 +1185,7 @@
+   }
+  //===========================================================================
+-  uint8_t Arm::GetMetaArmType(void) {
++  boost::uint8_t Arm::GetMetaArmType(void) {
+     if (!mParentMetaArm) {
+       dbprintf(0, "Error: GetMetaArmType() called on parentless arm.\n");
+       return METAARM_UNKNOWN; 
+@@ -1317,7 +1317,7 @@
+       startNode = mTerminalNodes[0];       
+     }
+-    uint32_t startnodenum = 0; 
++    boost::uint32_t startnodenum = 0; 
+     for (startnodenum = 0; startnodenum < mTerminalNodes.size(); startnodenum++) {
+       if (startNode == mTerminalNodes[startnodenum]) {
+         break;
+@@ -1750,7 +1750,7 @@
+     int btype = GetBurgersType(); 
+     FullNode *sourceNode = sharedNode; // for iterating through source arm 
+     dbprintf(6, "ExtendBySegments(%d): iterating through %d source segments\n", mArmID, sourceSegments.size()); 
+-    uint32_t seg = 0; 
++    boost::uint32_t seg = 0; 
+     while (seg < sourceSegments.size()) {
+       sourceNode = sourceSegments[seg]->GetOtherEndpoint(sourceNode);
+       
+@@ -1864,7 +1864,7 @@
+   */
+   bool Arm::Decompose(int energy) {
+     
+-    int8_t burgtype = GetBurgersType();
++    boost::int8_t burgtype = GetBurgersType();
+     if (burgtype/10 != energy) 
+       return false; // not yet
+@@ -1880,7 +1880,7 @@
+     // This will be the one with the least number of neighbors.  If two terminal nodes have the same number of neighbors, use the one that has the lowest maximum energy level.  
+     // I believe this greedy algorithm results in the global minimum decomposition too.  
+-    uint32_t numTermNodes = mTerminalNodes.size();
++    boost::uint32_t numTermNodes = mTerminalNodes.size();
+     vector<int> maxEnergies; // we'll analyze this later. 
+     vector<int> numneighbors; 
+     vector<int> extendedArmIDs; 
+@@ -1903,7 +1903,7 @@
+     WriteTraceFiles("1-before-detachment"); 
+       
+     // Actually perform detachment
+-    for (uint32_t n = 0; n<mTerminalNodes.size(); n++) {
++    for (boost::uint32_t n = 0; n<mTerminalNodes.size(); n++) {
+       mTerminalNodes[n]->DetachCrossArms(); 
+     }
+@@ -1915,7 +1915,7 @@
+     WriteTraceFiles("2-before-decomposition"); 
+     int sharedNodeNum = -1; 
+-    for (uint32_t termnode = 0; termnode < numTermNodes; termnode++) {
++    for (boost::uint32_t termnode = 0; termnode < numTermNodes; termnode++) {
+       numneighbors.push_back(mTerminalNodes[termnode]->mNeighborArms.size()); 
+       maxEnergies.push_back(0); 
+       int neighbor = 0;
+@@ -1972,7 +1972,7 @@
+     double decomposedLength = 0; 
+     neighbornum = neighborArms.size();
+     vector<ArmSegment*> sourceSegments = this->GetSegments(sharedNode); 
+-    uint32_t decomposed = 0;
++    boost::uint32_t decomposed = 0;
+     while (neighbornum--) {
+       Arm *neighborArm = neighborArms[neighbornum]; 
+       if (neighborArm != this) { 
+@@ -2084,7 +2084,7 @@
+   string MetaArm::Stringify(int indent) {
+     int atype = mMetaArmType;
+     string s = INDENT(indent) + str(boost::format("(MetaArm): mLength: %1%, mMetaArmType: %2% (%3%), mMetaArmID: %4%\n\n")%mLength % atype % MetaArmTypeNames(mMetaArmType) % mMetaArmID); 
+-    uint32_t i = 0; 
++    boost::uint32_t i = 0; 
+     while (i<mTerminalNodes.size()) {
+       string s2 = mTerminalNodes[i]->Stringify(indent+1);
+       s += INDENT(indent+1);
+@@ -2155,7 +2155,7 @@
+     else {
+       dbprintf(4, "Candidate is type 200 and we shall try to recurse..\n", mMetaArmID);
+     }
+-    uint32_t nodenum = candidate->mTerminalNodes.size(); 
++    boost::uint32_t nodenum = candidate->mTerminalNodes.size(); 
+     if (nodenum < 2) {
+       dbprintf(0, "Error:  Found candidate with %d terminal node(s), but we already tested for loops. \n", mMetaArmID, nodenum); 
+       errexit1; 
+@@ -2175,7 +2175,7 @@
+         return true; 
+       }
+-      uint32_t neighbornum = node->mNeighborArms.size(); 
++      boost::uint32_t neighbornum = node->mNeighborArms.size(); 
+       dbprintf(4, "FindEndpoint(metaarm %d): Candidate has N node on other end. Recursing on %d neighbors.\n", mMetaArmID, neighbornum); 
+       Arm *foundseed = NULL; 
+       while (neighbornum--) {
+@@ -2280,11 +2280,11 @@
+     // Best algorithm: 
+     
+     // A metaarm can continue in up to two directions, call them paths.  
+-    //uint32_t pathsTaken = 0; 
++    //boost::uint32_t pathsTaken = 0; 
+     
+     // First, check each terminal node of the arm.  If it's a monster, add it as a meta arm terminal node and mark off a path.  If it's not, then recurse on it to extend the arm.  
+     dbprintf(4, "FindEndpoints(metaarm %d) (seed %d): Checking terminal nodes of seed arm.\n", mMetaArmID, seed->mArmID); 
+-    uint32_t nodenum = 0; // seed->mTerminalNodes.size(); 
++    boost::uint32_t nodenum = 0; // seed->mTerminalNodes.size(); 
+     bool seedIsTerminal = false; 
+     while (nodenum <  seed->mTerminalNodes.size() && mMetaArmType != METAARM_LOOP_111) {
+       FullNode * node = seed->mTerminalNodes[nodenum]; 
+@@ -2444,7 +2444,7 @@
+     vector<rclib::Point<float> > points; 
+     if (mMetaArmType == METAARM_LOOP_111 || mMetaArmType == METAARM_LOOP_HIGH_ENERGY) {
+       vector<FullNode *>nodes = GetNodes(); 
+-      uint32_t  p = 0; 
++      boost::uint32_t  p = 0; 
+       while (p < nodes.size()-1) {
+         vector<float> f = nodes[p]->GetLocation();
+         points.push_back(f);
+@@ -2507,11 +2507,11 @@
+     double armLengths[11] = {0}, totalArmLength=0; 
+     
+    
+-    uint32_t numArms[11] = {0};  // number of arms of each type
+-    uint32_t totalArms=0;
++    boost::uint32_t numArms[11] = {0};  // number of arms of each type
++    boost::uint32_t totalArms=0;
+ #if LINKED_LOOPS
+     double linkedLoopLength = 0; 
+-    uint32_t numLinkedLoops = 0; 
++    boost::uint32_t numLinkedLoops = 0; 
+ #endif
+     
+     double *armLengthBins = NULL; 
+@@ -2532,7 +2532,7 @@
+     };
+     
+     double shortLengths[16] = {0}, longLengths[16]={0}; 
+-    uint32_t numShortArms[16]={0}, numLongArms[16]={0}; 
++    boost::uint32_t numShortArms[16]={0}, numLongArms[16]={0}; 
+     vector<Arm *>::iterator armpos = Arm::mArms.begin(), armend = Arm::mArms.end(); 
+     while (armpos != armend) { 
+@@ -2543,7 +2543,7 @@
+         continue; 
+       }
+       if (mThreshold >= 0) {
+-        int8_t btype = (*armpos)->GetBurgersType(); 
++        boost::int8_t btype = (*armpos)->GetBurgersType(); 
+         if (!btype) {
+           printf("Error:  armpos has no terminal segments!\n"); 
+         }
+@@ -2683,9 +2683,9 @@
+     fprintf(thefile, "========================================\n\n\n"); 
+ #ifdef DEBUG_SEGMENTS
+     // check against segment lengths: 
+-    uint32_t numSegments[11] = {0}, totalSegments=0, culledSegments=0;  // number of arms of each type
++    boost::uint32_t numSegments[11] = {0}, totalSegments=0, culledSegments=0;  // number of arms of each type
+     double segmentLengths[11] = {0}, totalSegmentLength=0, culledLength=0; 
+-    for (std::map<uint32_t, ArmSegment *>::iterator segpos = ArmSegments.begin(); segpos != mArmSegments.end(); ++segpos) {
++    for (std::map<boost::uint32_t, ArmSegment *>::iterator segpos = ArmSegments.begin(); segpos != mArmSegments.end(); ++segpos) {
+       ArmSegment *seg = segpos->second; 
+       double length = seg->GetLength(); 
+       // Cull out half the wrapped segments in such a way that for each culled, there is an identical one remaining:
+@@ -2849,7 +2849,7 @@
+   }
+   
+   //====================================================================== 
+-  void DataSet::CopyNodeFromFile(uint32_t &lineno, map<uint64_t, FullNode*> &nodehash, std::ifstream &datafile, std::ofstream &tagfile) {
++  void DataSet::CopyNodeFromFile(boost::uint32_t &lineno, map<boost::uint64_t, FullNode*> &nodehash, std::ifstream &datafile, std::ofstream &tagfile) {
+     // read the first line of the next node in the file: 
+     char comma;
+     int domainID, nodeID; 
+@@ -2923,7 +2923,7 @@
+   }
+   //====================================================================== 
+-  void DataSet::ReadMinimalNodeFromFile(uint32_t &lineno, std::ifstream &datafile) {
++  void DataSet::ReadMinimalNodeFromFile(boost::uint32_t &lineno, std::ifstream &datafile) {
+     MinimalNode theNode;
+     char comma;
+     int domainID, nodeID; 
+@@ -2997,8 +2997,8 @@
+     STARTPROGRESS();
+     dbprintf(2, "Size of a minimal_node is %d bytes\n",  sizeof(MinimalNode));
+     char linebuf[2048]="";
+-    uint32_t nodenum = 0;
+-    uint32_t lineno = 1; 
++    boost::uint32_t nodenum = 0;
++    boost::uint32_t lineno = 1; 
+     ReadBounds(); 
+     try {
+       ifstream datafile(mDataFilename.c_str()); 
+@@ -3127,7 +3127,7 @@
+     debugfile << "subspace bounds: " << mSubspaceMin.Stringify() << ", " << mSubspaceMax.Stringify() << endl; 
+     std::vector<MinimalNode>::iterator pos = MinimalNode::mMinimalNodes.begin(),
+       endpos = MinimalNode::mMinimalNodes.end(); 
+-    uint32_t nodenum = 0; 
++    boost::uint32_t nodenum = 0; 
+     while (pos != endpos) {
+       debugfile << "MinimalNode " << nodenum++ <<":\n"<< pos->Stringify(false) << endl;
+       debugfile << "***************************************************" << endl << endl; 
+@@ -3412,7 +3412,7 @@
+     theTimer.start(); 
+     dbprintf(2, "Size of a full node is %d bytes, so expect to use %d megabytes\n",  sizeof(FullNode), MinimalNode::mMinimalNodes.size()*sizeof(FullNode)/1000000);
+     char linebuf[2048]="";
+-    uint32_t nodenum = 0;
++    boost::uint32_t nodenum = 0;
+     try {
+       ifstream datafile(mDataFilename.c_str()); 
+       if (!datafile.good()){
+@@ -3435,7 +3435,7 @@
+         throw string( "Error: cannot find first node in data file");
+       }
+       STARTPROGRESS(); 
+-      uint32_t nodelimit = MinimalNode::mMinimalNodes.size(); 
++      boost::uint32_t nodelimit = MinimalNode::mMinimalNodes.size(); 
+       std::vector<MinimalNode>::reverse_iterator rpos = MinimalNode::mMinimalNodes.rbegin(), rend = MinimalNode::mMinimalNodes.rend(); 
+       //dbprintf(2, "\n"); 
+       while (datafile.good() && nodenum < nodelimit && rpos != rend) {
+@@ -3462,10 +3462,10 @@
+   //===========================================================================
+   void DataSet::WrapBoundarySegments(void) {
+     STARTPROGRESS();
+-    uint32_t segnum = 0, totalsegs = ArmSegment::mArmSegments.size(); 
++    boost::uint32_t segnum = 0, totalsegs = ArmSegment::mArmSegments.size(); 
+     ArmSegment *newSegment = NULL; 
+     FullNode *newnode0, *newnode1; 
+-    for (map <uint32_t, ArmSegment *>::const_iterator segpos = ArmSegment::mArmSegments.begin(); segpos != ArmSegment::mArmSegments.end(); segpos++, segnum++) {      
++    for (map <boost::uint32_t, ArmSegment *>::const_iterator segpos = ArmSegment::mArmSegments.begin(); segpos != ArmSegment::mArmSegments.end(); segpos++, segnum++) {      
+       ArmSegment *seg = segpos->second; 
+       if (seg && seg->Wrap(mDataSize, newSegment, newnode0, newnode1)) {
+         newnode0->SetWrappedCopy(true); 
+@@ -3483,11 +3483,11 @@
+   //===========================================================================
+   string DataSet::GetMonsterNodeSummary(void) {
+-    vector<uint32_t> monsterTypes(1); 
+-    for (std::map<uint32_t, FullNode*>::iterator nodepos = FullNode::mFullNodes.begin(); nodepos !=  FullNode::mFullNodes.end(); nodepos++) {
++    vector<boost::uint32_t> monsterTypes(1); 
++    for (std::map<boost::uint32_t, FullNode*>::iterator nodepos = FullNode::mFullNodes.begin(); nodepos !=  FullNode::mFullNodes.end(); nodepos++) {
+       FullNode *node = nodepos->second; 
+       if (node && node->GetNodeType() < 0 && !node->IsWrappedCopy()) {
+-        uint8_t theType = - node->GetNodeType(); 
++        boost::uint8_t theType = - node->GetNodeType(); 
+         if (theType >= monsterTypes.size()) {
+           monsterTypes.resize(theType+1); 
+         }
+@@ -3497,7 +3497,7 @@
+     }    
+     string s; 
+     s += str(boost::format("Total monster nodes: %1%\n") %monsterTypes[0]); 
+-    for (uint8_t t = 1; t < monsterTypes.size(); t++) {
++    for (boost::uint8_t t = 1; t < monsterTypes.size(); t++) {
+       if (monsterTypes[t]) {
+         s += str(boost::format("Type -%1% monster nodes: %2%\n") % (int)t % monsterTypes[t]); 
+       }
+@@ -3524,8 +3524,8 @@
+     debugfile << "=================================================" << endl; 
+     debugfile << endl << endl; 
+-    for (std::map<uint32_t, FullNode*>::iterator nodepos = FullNode::mFullNodes.begin(); nodepos != FullNode::mFullNodes.end(); nodepos++) {
+-      uint32_t key = nodepos->first; 
++    for (std::map<boost::uint32_t, FullNode*>::iterator nodepos = FullNode::mFullNodes.begin(); nodepos != FullNode::mFullNodes.end(); nodepos++) {
++      boost::uint32_t key = nodepos->first; 
+       FullNode *node = nodepos->second; 
+       debugfile << "mFullNodes[" << key <<"]: " << node->Stringify(false ) << endl; 
+       debugfile << "**************************************************************" << endl << endl; 
+@@ -3582,7 +3582,7 @@
+     STARTPROGRESS(); 
+-    uint32_t armnum = 0; 
++    boost::uint32_t armnum = 0; 
+     /*! 
+       For now, just look at every inbounds node and if it has not been looked at, make an arm out of it.  
+     */ 
+@@ -3592,7 +3592,7 @@
+       If you start from an out of bounds node, you will often trace out arms that have no nodes in them!  That would be segfault fodder. 
+     */ 
+     try {
+-      for (map<uint32_t, FullNode*>::iterator nodepos = FullNode::mFullNodes.begin(); nodepos != FullNode::mFullNodes.end(); ++nodepos, ++nodenum) {
++      for (map<boost::uint32_t, FullNode*>::iterator nodepos = FullNode::mFullNodes.begin(); nodepos != FullNode::mFullNodes.end(); ++nodepos, ++nodenum) {
+         FullNode *node = nodepos->second; 
+         if (!node->InBounds()) {
+           continue;
+@@ -3664,10 +3664,10 @@
+   //===========================================================================
+   void DataSet::DecomposeArms(void) {    
+-    uint32_t armnum = 0; 
++    boost::uint32_t armnum = 0; 
+     vector<Arm*> newArms; 
+     int energyLevel = 7, numarms=Arm::mArms.size();
+-    vector<int32_t> numDecomposed(7, 0); 
++    vector<boost::int32_t> numDecomposed(7, 0); 
+     while (energyLevel-- > 1) {
+       if (energyLevel == 1 && !Arm::mTraceArms.size()) {
+         // skip level 1; the only reason to do level 1 is to trace arms 
+@@ -3710,7 +3710,7 @@
+     debugfile <<"There are " << Arm::mArms.size() << " arms." << endl; 
+     vector<Arm*>::iterator pos = Arm::mArms.begin(), endpos = Arm::mArms.end(); 
+-    uint32_t armnum = 0, empty=0; 
++    boost::uint32_t armnum = 0, empty=0; 
+     while (pos != endpos) {
+       debugfile << "Arm #" << armnum << ": " << (*pos)->Stringify(0) << endl; 
+       debugfile << "******************************************************" << endl << endl; 
+@@ -3745,7 +3745,7 @@
+     debugfile <<"There are " << mMetaArms.size() << " MetaArms." << endl; 
+     vector<boost::shared_ptr<MetaArm> >::iterator pos = mMetaArms.begin(), endpos = mMetaArms.end(); 
+-    uint32_t armnum = 0; 
++    boost::uint32_t armnum = 0; 
+     while (pos != endpos) {
+       debugfile << "MetaArm #" << armnum << ": " << (*pos)->Stringify(0) << endl; 
+       debugfile.flush(); 
+@@ -3797,11 +3797,11 @@
+     // =======================================================
+     // SEGMENT FILES 
+     // We go by arm by arm to save writing duplicate points everywhere. 
+-    uint32_t numsegfiles = ArmSegment::mArmSegments.size()/mElementsPerVTKFile + 1; 
++    boost::uint32_t numsegfiles = ArmSegment::mArmSegments.size()/mElementsPerVTKFile + 1; 
+     dbecho(0, str(boost::format("DataSet::WriteVTKFiles() will write %d segment files. \n")% numsegfiles));
+     vector<FILE *> segfiles;
+     vector<string> segfilenames; 
+-    for (uint32_t fileno = 0; fileno < numsegfiles; fileno++) {
++    for (boost::uint32_t fileno = 0; fileno < numsegfiles; fileno++) {
+       string filename = str(boost::format("%s/%s-segments-%04d.vtk")%mOutputDir%mOutputBasename%fileno); 
+       FILE * fp = fopen(filename.c_str(), "w"); 
+       if (!fp) {
+@@ -3815,14 +3815,14 @@
+     // ----------------------------------------------------------
+     // WRITE THE SEGMENT FILES
+     float armsperfile = (float)(Arm::mArms.size())/segfiles.size(); 
+-    for (uint32_t fileno = 0; fileno < segfiles.size(); fileno++) {
++    for (boost::uint32_t fileno = 0; fileno < segfiles.size(); fileno++) {
+       FILE *segfile = segfiles[fileno]; 
+       string filename = segfilenames[fileno]; 
+-      uint32_t firstarm =  armsperfile * fileno;
+-      uint32_t lastarm = armsperfile *(fileno + 1) - 1; 
++      boost::uint32_t firstarm =  armsperfile * fileno;
++      boost::uint32_t lastarm = armsperfile *(fileno + 1) - 1; 
+       if (fileno == segfiles.size()-1) 
+         lastarm = Arm::mArms.size() - 1; 
+-      uint32_t numarms = lastarm-firstarm+1; 
++      boost::uint32_t numarms = lastarm-firstarm+1; 
+       // ----------------------------------------------------------
+       // 1. Segment file: the header
+       fprintf(segfile,"# vtk DataFile Version 3.0\n" );
+@@ -3836,13 +3836,13 @@
+       //   cause us to write too many duplicate points.  This of course 
+       //   comes at a minor expense in imperfect load balancing due to 
+       //   unequal unpredictable arm lengths.  <Shrug>  
+-      uint32_t numnodes = 0, numsegs = 0;
+-      for (uint32_t armnum = 0; armnum < numarms; armnum++) {
++      boost::uint32_t numnodes = 0, numsegs = 0;
++      for (boost::uint32_t armnum = 0; armnum < numarms; armnum++) {
+         numnodes += Arm::mArms[armnum+firstarm]->GetNumNodes(); 
+       }
+       fprintf(segfile, "\nPOINTS %d float\n", numnodes);
+-      vector<uint32_t> nodecounts; 
+-      for (uint32_t armnum = 0; armnum < numarms; armnum++) {
++      vector<boost::uint32_t> nodecounts; 
++      for (boost::uint32_t armnum = 0; armnum < numarms; armnum++) {
+         vector<FullNode*> nodes = Arm::mArms[armnum+firstarm]->GetNodes(); 
+         nodecounts.push_back(0); 
+         FullNode *previous = NULL; 
+@@ -3864,12 +3864,12 @@
+       // 3. Segment file: Segments (connectivity)
+       fprintf(segfile, "\nLINES %d %d\n", numsegs, 3*numsegs); 
+       
+-      uint32_t nodenum = 0, previousnodenum = 0; 
+-      for (uint32_t armnum = 0; armnum < numarms; armnum++) {
++      boost::uint32_t nodenum = 0, previousnodenum = 0; 
++      for (boost::uint32_t armnum = 0; armnum < numarms; armnum++) {
+         Arm *theArm = Arm::mArms[armnum+firstarm]; 
+         if (!theArm->mNumSegments) continue; 
+-        uint32_t armsegs = 0; 
++        boost::uint32_t armsegs = 0; 
+         if (theArm->mNumWrappedSegments) {          
+           vector<FullNode *> nodes = theArm->GetNodes(); 
+           FullNode *previous = NULL; 
+@@ -3890,7 +3890,7 @@
+         } 
+         else {
+           // no wrapped segments
+-          for (uint32_t segnum = 0; segnum < theArm->mNumSegments; segnum++) {
++          for (boost::uint32_t segnum = 0; segnum < theArm->mNumSegments; segnum++) {
+             fprintf(segfile, "2 %d %d\n", nodenum, nodenum+1); 
+             ++nodenum; 
+             armsegs ++; 
+@@ -3911,10 +3911,10 @@
+       fprintf(segfile, "\nCELL_DATA %d\n", numsegs); 
+       fprintf(segfile, "SCALARS armnum int\n"); 
+       fprintf(segfile, "LOOKUP_TABLE default\n");   
+-      uint32_t testsegs = 0; 
+-      for (uint32_t armnum = 0; armnum < numarms; armnum++) {
++      boost::uint32_t testsegs = 0; 
++      for (boost::uint32_t armnum = 0; armnum < numarms; armnum++) {
+         Arm *theArm = Arm::mArms[armnum+firstarm]; 
+-        for (uint32_t segnum = 0; segnum < theArm->mNumSegments; segnum++) {
++        for (boost::uint32_t segnum = 0; segnum < theArm->mNumSegments; segnum++) {
+           fprintf(segfile, "%d ", armnum); 
+           ++testsegs;         
+         }
+@@ -3927,10 +3927,10 @@
+       // 5. Segment file: Segment Burgers type
+       fprintf(segfile, "SCALARS burgers_type int\n"); 
+       fprintf(segfile, "LOOKUP_TABLE default\n");   
+-      for (uint32_t armnum = 0; armnum < numarms; armnum++) {
++      for (boost::uint32_t armnum = 0; armnum < numarms; armnum++) {
+         Arm *theArm = Arm::mArms[armnum+firstarm]; 
+-        uint32_t burgertype = theArm->GetBurgersType(); 
+-        for (uint32_t segnum = 0; segnum < theArm->mNumSegments; segnum++) {
++        boost::uint32_t burgertype = theArm->GetBurgersType(); 
++        for (boost::uint32_t segnum = 0; segnum < theArm->mNumSegments; segnum++) {
+           fprintf(segfile, "%d ", burgertype); 
+           ++testsegs; 
+         }        
+@@ -3942,10 +3942,10 @@
+       // ----------------------------------------------------------
+       fprintf(segfile, "SCALARS metaarm_type int\n"); 
+       fprintf(segfile, "LOOKUP_TABLE default\n");   
+-      for (uint32_t armnum = 0; armnum < numarms; armnum++) {
++      for (boost::uint32_t armnum = 0; armnum < numarms; armnum++) {
+         Arm *theArm = Arm::mArms[armnum+firstarm]; 
+-        uint32_t matype = theArm->GetMetaArmType(); 
+-        for (uint32_t segnum = 0; segnum < theArm->mNumSegments; segnum++) {
++        boost::uint32_t matype = theArm->GetMetaArmType(); 
++        for (boost::uint32_t segnum = 0; segnum < theArm->mNumSegments; segnum++) {
+           fprintf(segfile, "%d ", matype); 
+           ++testsegs; 
+         }        
+@@ -3957,9 +3957,9 @@
+       // ----------------------------------------------------------
+       fprintf(segfile, "SCALARS block_number int\n"); 
+       fprintf(segfile, "LOOKUP_TABLE default\n");   
+-      for (uint32_t armnum = 0; armnum < numarms; armnum++) {
++      for (boost::uint32_t armnum = 0; armnum < numarms; armnum++) {
+         Arm *theArm = Arm::mArms[armnum+firstarm]; 
+-        for (uint32_t segnum = 0; segnum < theArm->mNumSegments; segnum++) {
++        for (boost::uint32_t segnum = 0; segnum < theArm->mNumSegments; segnum++) {
+           fprintf(segfile, "%d ", fileno); 
+           ++testsegs; 
+         }        
+@@ -3976,7 +3976,7 @@
+     string visitsegfilename = str(boost::format("%s/%s-segments.visit")%mOutputDir%mOutputBasename); 
+     FILE *visitsegfile = fopen(visitsegfilename.c_str(), "w"); 
+     fprintf(visitsegfile, "!NBLOCKS %d\n", (int)segfiles.size()); 
+-    for (uint32_t fileno = 0; fileno < segfiles.size(); fileno++) {
++    for (boost::uint32_t fileno = 0; fileno < segfiles.size(); fileno++) {
+       fprintf(visitsegfile, "%s\n", Basename(segfilenames[fileno]).c_str()); 
+     }
+     fclose(visitsegfile); 
+@@ -3986,11 +3986,11 @@
+     // ============================================================
+     // NODE FILES 
+     // We use mElementsPerVTKFile to limit our node file size too.
+-    uint32_t numnodefiles = FullNode::mFullNodes.size()/mElementsPerVTKFile + 1; 
++    boost::uint32_t numnodefiles = FullNode::mFullNodes.size()/mElementsPerVTKFile + 1; 
+     dbecho(0, str(boost::format("DataSet::WriteVTKFiles() will write %d node files. \n")% numnodefiles));
+     vector<FILE *> nodefiles;
+     vector<string> nodefilenames; 
+-    for (uint32_t fileno = 0; fileno < numnodefiles; fileno++) {
++    for (boost::uint32_t fileno = 0; fileno < numnodefiles; fileno++) {
+       string filename = str(boost::format("%s/%s-nodes-%04d.vtk")%mOutputDir%mOutputBasename%fileno); 
+       FILE * fp = fopen(filename.c_str(), "w"); 
+       if (!fp) {
+@@ -4003,20 +4003,20 @@
+     
+    // ----------------------------------------------------------
+     // WRITE THE NODE FILES
+-    map<uint32_t, FullNode *>::iterator nodepos = FullNode::mFullNodes.begin(),
++    map<boost::uint32_t, FullNode *>::iterator nodepos = FullNode::mFullNodes.begin(),
+       nodeend =  FullNode::mFullNodes.end(); 
+     float nodesperfile = (float)(FullNode::mFullNodes.size())/numnodefiles; 
+-    uint32_t firstnode = 0; 
++    boost::uint32_t firstnode = 0; 
+-    for (uint32_t fileno = 0; fileno < nodefiles.size(); fileno++) {
++    for (boost::uint32_t fileno = 0; fileno < nodefiles.size(); fileno++) {
+       FILE *nodefile = nodefiles[fileno]; 
+       string filename = nodefilenames[fileno]; 
+-      uint32_t lastnode = nodesperfile *(fileno + 1.0) - 1; 
++      boost::uint32_t lastnode = nodesperfile *(fileno + 1.0) - 1; 
+       if (fileno == nodefiles.size()-1) 
+         lastnode = FullNode::mFullNodes.size()-1;
+-      uint32_t numnodes = lastnode - firstnode + 1; 
++      boost::uint32_t numnodes = lastnode - firstnode + 1; 
+       
+-      map<uint32_t, FullNode *>::iterator firstnodepos = nodepos;  
++      map<boost::uint32_t, FullNode *>::iterator firstnodepos = nodepos;  
+       
+       // ----------------------------------------------------------
+       // 1. Node file: the header
+@@ -4028,7 +4028,7 @@
+       // ----------------------------------------------------------
+       // 2. Node file: Points.  
+       fprintf(nodefile, "\nPOINTS %d float\n", numnodes); 
+-      uint32_t nodecount = 0; 
++      boost::uint32_t nodecount = 0; 
+       for (nodecount = 0; 
+            nodecount < numnodes && nodepos != nodeend; 
+            nodecount++, nodepos++) {
+@@ -4041,14 +4041,14 @@
+       
+       // ----------------------------------------------------------
+       // 2. Node file: Vertices  
+-      for (uint32_t nodenum = 0; nodenum < numnodes; nodenum++) {
++      for (boost::uint32_t nodenum = 0; nodenum < numnodes; nodenum++) {
+         fprintf(nodefile, "1 %d\n", nodenum); 
+       }
+       
+       // ----------------------------------------------------------
+       // Node file: Node Index
+       nodepos = firstnodepos; 
+-      for (uint32_t nodenum = 0;  nodenum < numnodes; nodenum++, nodepos++) {
++      for (boost::uint32_t nodenum = 0;  nodenum < numnodes; nodenum++, nodepos++) {
+         fprintf(nodefile, "1 %d\n", nodepos->second->GetIndex()); 
+       }
+       // ----------------------------------------------------------
+@@ -4071,8 +4071,8 @@
+   // Write a file containing all tagged nodes with their tag values. 
+   void DataSet::WriteTagFile(void) {
+     // First, create a fast searchable map for lookups, as our global map is ordered by global Node Index, which is not necessarily in file order any more at this point. 
+-    map<uint64_t, FullNode*> nodehash; 
+-    for (map<uint32_t, FullNode*>::iterator pos = FullNode::mFullNodes.begin(); 
++    map<boost::uint64_t, FullNode*> nodehash; 
++    for (map<boost::uint32_t, FullNode*>::iterator pos = FullNode::mFullNodes.begin(); 
+          pos != FullNode::mFullNodes.end(); pos++) {
+       nodehash[pos->second->Hash()] = pos->second; 
+     }
+@@ -4081,8 +4081,8 @@
+     dbecho(1, str(boost::format("DataSet::WriteTagFile: Writing node tags to file %s... ")% tagfilename)); 
+     
+-    uint32_t nodenum = 0;
+-    uint32_t lineno = 1; 
++    boost::uint32_t nodenum = 0;
++    boost::uint32_t lineno = 1; 
+     char linebuf[2048]="";
+     STARTPROGRESS();
+@@ -4135,7 +4135,7 @@
+     string metaArmFile = mOutputDir + "/" + mOutputBasename + ".metaarms"; 
+     dbecho(0, str(boost::format("Writing metaarms to metaarm file %s... ")% metaArmFile));
+     
+-    uint32_t a = Arm::mArms.size(); 
++    boost::uint32_t a = Arm::mArms.size(); 
+     while (a--) {
+       Arm::mArms[a]->mSeen = false; 
+     }
+@@ -4148,9 +4148,9 @@
+     fprintf(armfile, "DISCUSSION: \n%s\n", doctext.c_str()); 
+     
+     vector<boost::shared_ptr<MetaArm> >::iterator pos = mMetaArms.begin(), endpos = mMetaArms.end(); 
+-    uint32_t armnum = 0, metaarmcounts[7]={0}; 
++    boost::uint32_t armnum = 0, metaarmcounts[7]={0}; 
+     double metaarmtypelengths[7] = {0.0}, totalEPDist = 0.0; 
+-    uint32_t numarms = 0; 
++    boost::uint32_t numarms = 0; 
+     while (pos != endpos) {
+       if ((*pos)->mTerminalNodes.size() == 2) {
+         totalEPDist += (*pos)->mTerminalNodes[0]->Distance(*( (*pos)->mTerminalNodes[1]), true); 
+@@ -4239,7 +4239,7 @@
+         dbprintf(0,  "WARNING: arm # %d has %d terminal arms\n", armnum, numtermnodes);
+         dbprintf(0,  (*pos)->Stringify(0).c_str()); 
+       } else {
+-        uint32_t i = numtermnodes, numarms = (*pos)->mAllArms.size(); 
++        boost::uint32_t i = numtermnodes, numarms = (*pos)->mAllArms.size(); 
+         while (i--) {
+           (*pos)->mTerminalNodes[i]->GetLocation(loc[i]);
+           ntypes[i] = (*pos)->mTerminalNodes[i]->GetNodeType();
+@@ -4307,7 +4307,7 @@
+             "EP1-ID", "EP1-Type", "EP1-Nbrs", "EP1-X", "EP1-Y", "EP1-Z", 
+             "EP2-ID", "EP2-Type", "EP2-Nbrs", "EP2-X", "EP2-Y", "EP2-Z");
+     vector<Arm*>::iterator pos = Arm::mArms.begin(), endpos = Arm::mArms.end(); 
+-    uint32_t armnum = 0; 
++    boost::uint32_t armnum = 0; 
+     while (pos != endpos) {   
+       if ((*pos)->mArmType == ARM_EMPTY) {
+         ++pos; 
+@@ -4466,14 +4466,14 @@
+   //=========================================================================
+   void DataSet::CreateNodeSegmentVectors(void) {  
+-    uint32_t index = 0; 
+-    for (map<uint32_t, FullNode *>::iterator pos = FullNode::mFullNodes.begin(); pos != FullNode::mFullNodes.end(); pos++, index++) {
++    boost::uint32_t index = 0; 
++    for (map<boost::uint32_t, FullNode *>::iterator pos = FullNode::mFullNodes.begin(); pos != FullNode::mFullNodes.end(); pos++, index++) {
+       pos->second->SetIndex(index); 
+       FullNode::mFullNodeVector.push_back(pos->second); 
+     }
+     index = 0; 
+-    for (map<uint32_t, ArmSegment *>::iterator pos = ArmSegment::mArmSegments.begin(); pos != ArmSegment::mArmSegments.end(); pos++, index++) {
++    for (map<boost::uint32_t, ArmSegment *>::iterator pos = ArmSegment::mArmSegments.begin(); pos != ArmSegment::mArmSegments.end(); pos++, index++) {
+       pos->second->SetIndex(index); 
+       ArmSegment::mArmSegmentVector.push_back(pos->second); 
+     }
+@@ -4483,7 +4483,7 @@
+   //=========================================================================
+   void DataSet::ComputeNodeTypes(void) {
+-    for (map<uint32_t, FullNode*>::iterator pos = FullNode::mFullNodes.begin(); pos !=  FullNode::mFullNodes.end(); pos++) {
++    for (map<boost::uint32_t, FullNode*>::iterator pos = FullNode::mFullNodes.begin(); pos !=  FullNode::mFullNodes.end(); pos++) {
+       pos->second->ComputeNodeType(); 
+     }
+   }
+@@ -4494,7 +4494,7 @@
+       (*currentArm)->mSeen = false; 
+     }
+-    uint32_t numMetaArms = 0, numArms = 0, totalArms = Arm::mArms.size(); 
++    boost::uint32_t numMetaArms = 0, numArms = 0, totalArms = Arm::mArms.size(); 
+     STARTPROGRESS(); 
+     dbprintf(4, "FindMetaArms: %s\n", datestring()); 
+     for (vector<Arm*>::iterator currentArm = Arm::mArms.begin(); currentArm != Arm::mArms.end(); ++currentArm, ++numArms) {
+@@ -4545,7 +4545,7 @@
+     for (vector<Arm*>::iterator currentArm = Arm::mArms.begin(); currentArm != Arm::mArms.end(); ++currentArm) {
+       if (!(*currentArm)->mSeen && (*currentArm)->mArmType != ARM_EMPTY) {
+-        uint32_t id = (*currentArm)->mArmID;
++        boost::uint32_t id = (*currentArm)->mArmID;
+         dbprintf(0, "\n\nError: arm %d has not been seen!\n", id); 
+         errexit; 
+       }
+@@ -4559,11 +4559,11 @@
+   bool DataSet::Test(void) {
+     dbprintf(0, "DataSet::Test(): called\n"); 
+     
+-    vector<uint32_t>segsperarm(Arm::mArms.size(), 0), segspermetaarm(mMetaArms.size(), 0);
++    vector<boost::uint32_t>segsperarm(Arm::mArms.size(), 0), segspermetaarm(mMetaArms.size(), 0);
+     
+      //================================================================
+    dbprintf(0, "DataSet::Test(): enumerating segsperarm\n"); 
+-   for (map<uint32_t, ArmSegment*>::iterator segpos = ArmSegment::mArmSegments.begin(); segpos != ArmSegment::mArmSegments.end(); ++segpos) {   
++   for (map<boost::uint32_t, ArmSegment*>::iterator segpos = ArmSegment::mArmSegments.begin(); segpos != ArmSegment::mArmSegments.end(); ++segpos) {   
+       ArmSegment * seg = segpos->second; 
+       if (!seg->mParentArm) {
+         dbprintf(0, "DataSet::Test(): seg %d has NULL parent \n", seg->mSegmentID); 
+@@ -4581,7 +4581,7 @@
+     //================================================================
+     dbprintf(0, "DataSet::Test(): checking arms \n"); 
+     bool success = true; 
+-    uint32_t numArms = 0, numsegs = 0, numnodes = 0; 
++    boost::uint32_t numArms = 0, numsegs = 0, numnodes = 0; 
+     for (vector<Arm*>::iterator arm = Arm::mArms.begin(); arm != Arm::mArms.end(); ++arm, ++numArms) {
+       vector<ArmSegment*> segs = (*arm)->GetSegments(); 
+       numsegs += segs.size(); 
+@@ -4593,7 +4593,7 @@
+           for (vector<ArmSegment*>::iterator seg = segs.begin(); seg != segs.end(); seg++, ++segnum) {
+             dbprintf(0, "armseg %d: %s\n", segnum, (*seg)->Stringify(0).c_str()); 
+           }
+-          for (map<uint32_t, ArmSegment*>::iterator seg = ArmSegment::mArmSegments.begin(); seg != ArmSegment::mArmSegments.end(); ++seg) {   
++          for (map<boost::uint32_t, ArmSegment*>::iterator seg = ArmSegment::mArmSegments.begin(); seg != ArmSegment::mArmSegments.end(); ++seg) {   
+             if (seg->second->mParentArm == *arm) {
+               vector<ArmSegment*>::iterator pos = find(segs.begin(), segs.end(), seg->second); 
+               if (pos == segs.end()) {
+@@ -4628,11 +4628,11 @@
+       Checking metaarm segments counts is wrong -- for VisIt, a 'MetaArm' always has only a single segment, connecting its endpoints.  The entire metaarm is returned only if it is a LOOP. 
+     
+     dbprintf(0, "DataSet::Test(): checking meta-arms \n"); 
+-     uint32_t manum = 0;
++     boost::uint32_t manum = 0;
+     numsegs = 0; 
+     for (vector<boost::shared_ptr<MetaArm> >::iterator metaarm = mMetaArms.begin(); metaarm != mMetaArms.end(); ++metaarm, ++manum) {
+-      uint32_t masegs = (*metaarm)->GetNumSegments(false); 
+-      uint32_t shouldbe = segspermetaarm[(*metaarm)->GetMetaArmID()]; 
++      boost::uint32_t masegs = (*metaarm)->GetNumSegments(false); 
++      boost::uint32_t shouldbe = segspermetaarm[(*metaarm)->GetMetaArmID()]; 
+       if (masegs != shouldbe) {
+         dbprintf(0, "DataSet::Test(): numsegs %d != segspermetaarm[%d] %d \n", masegs, (*metaarm)->GetMetaArmID(), shouldbe); 
+         return false; 
+@@ -4649,7 +4649,7 @@
+     dbprintf(0, "DataSet::Test(): checking arm segments \n"); 
+     if (numnodes != FullNode::mFullNodes.size()) {
+       dbprintf(0, "DataSet::Test(): numnodes %d != FullNode::mFullNodes.size() %d.  Searching for extra node...\n", numnodes, FullNode::mFullNodes.size()); 
+-      for (map<uint32_t, FullNode*>::iterator node = FullNode::mFullNodes.begin(); node != FullNode::mFullNodes.end(); ++node) {           
++      for (map<boost::uint32_t, FullNode*>::iterator node = FullNode::mFullNodes.begin(); node != FullNode::mFullNodes.end(); ++node) {           
+         if (!node->second->mSeen) {
+           dbprintf(0, "DataSet::Test(): unseen node: %s\n", node->second->Stringify(0, false).c_str());
+         }
+--- ParaView-5.0.1_SRC.orig/Utilities/VisItBridge/databases/paraDIS/paraDIS_lib/paradis.h      2016-05-11 13:07:50.000000000 +0300
++++ ParaView-5.0.1_SRC.patch/Utilities/VisItBridge/databases/paraDIS/paraDIS_lib/paradis.h     2016-05-11 15:03:40.000000000 +0300
+@@ -1,3 +1,4 @@
++
+ /*! 
+   \file paradis.h 
+@@ -30,13 +31,13 @@
+ /* now for the API */  
+ #include <boost/cstdint.hpp>
+-using boost::int8_t;
+-using boost::int16_t;
+-using boost::int32_t;
+-using boost::uint8_t;
+-using boost::uint16_t;
+-using boost::uint32_t;
+-using boost::uint64_t;
++//using boost::int8_t;
++//using boost::int16_t;
++//using boost::int32_t;
++//using boost::uint8_t;
++//using boost::uint16_t;
++//using boost::uint32_t;
++//using boost::uint64_t;
+ #include <boost/shared_ptr.hpp>
+ #include <boost/format.hpp>
+@@ -141,12 +142,12 @@
+       mNodeID = other.mNodeID;
+     }
+     // -------------------------------------------------
+-    NodeID(int16_t domain, int32_t node) {
++    NodeID(boost::int16_t domain, boost::int32_t node) {
+       mDomainID = domain; 
+       mNodeID = node; 
+     }
+     // -------------------------------------------------
+-    uint64_t Hash(void) const {
++    boost::uint64_t Hash(void) const {
+       if (mNodeID >= 1000*1000) {
+         cerr << "Warning: Hash() is no longer unique" << endl; 
+       }
+@@ -157,8 +158,8 @@
+       return INDENT(indent) + str(boost::format("NodeID: (%1%,%2%)")% mDomainID % mNodeID);
+     }
+     
+-    uint32_t mDomainID; 
+-    uint64_t mNodeID; 
++    boost::uint32_t mDomainID; 
++    boost::uint64_t mNodeID; 
+   };
+   
+   /*! 
+@@ -203,7 +204,7 @@
+     }
+     
+     // return a hash based on NodeID
+-    uint64_t Hash(void) const {
++    boost::uint64_t Hash(void) const {
+       return mID.Hash(); 
+     }
+@@ -229,9 +230,9 @@
+     */ 
+     const NodeID &GetNodeID(void) const  { return mID; }
+-    int32_t GetNodeSimulationDomain(void) const { return mID.mDomainID; }
++    boost::int32_t GetNodeSimulationDomain(void) const { return mID.mDomainID; }
+-    int32_t GetNodeSimulationID(void) const { return mID.mNodeID; }
++    boost::int32_t GetNodeSimulationID(void) const { return mID.mNodeID; }
+     /*! 
+       conversion of Node to string
+@@ -360,12 +361,12 @@
+     /*!
+       Accessor
+     */ 
+-    uint32_t GetFileOrderIndex(void) const { return mFileOrderIndex; }
++    boost::uint32_t GetFileOrderIndex(void) const { return mFileOrderIndex; }
+     /*!
+       Accessor
+     */ 
+-    void SetFileOrderIndex(uint32_t index) { mFileOrderIndex = index; }
++    void SetFileOrderIndex(boost::uint32_t index) { mFileOrderIndex = index; }
+     /*!
+       For sorting by file order
+@@ -381,7 +382,7 @@
+     virtual std::string Stringify(int indent, bool shortform=true) const {
+       std::string s =std::string("MinimalNode: ")+Node::Stringify(0) + string("\nClassification: ") + string(mKeep?"KEEP":"DON'T KEEP") + string("\n");  
+       s += (intToString(mNeighbors.size()) + " neighbors --------------:\n");
+-      uint32_t n = 0; 
++      boost::uint32_t n = 0; 
+       if (!shortform) {
+         while (n < mNeighbors.size()) {
+           s += "neighbor " + intToString(n) + ": "; 
+@@ -402,7 +403,7 @@
+     /*! 
+       Accessor function --  returns const due to the fact that neighbors are stored in a set in the data set.  But you can always create a copy of what you get, or use const_cast<> on it. 
+     */ 
+-    /*  const Neighbor *GetNeighbor(uint32_t num)  const { 
++    /*  const Neighbor *GetNeighbor(boost::uint32_t num)  const { 
+       if (num >= mNeighbors.size())
+         throw std::string("subscript out of range in BaseNode::GtNeighbor"); 
+       return mNeighbors[num]; 
+@@ -436,7 +437,7 @@
+     /*!
+       Nodes must be sorted to find while classifying, then resorted in "file order" to most quickly load the full nodes later.  So we keep an index into the file.  
+     */ 
+-    uint32_t mFileOrderIndex; 
++    boost::uint32_t mFileOrderIndex; 
+     /*! 
+       The neighbors for this particular node
+@@ -466,7 +467,7 @@
+     */ 
+     FullNode(const FullNode &other, bool skipneighbors=false) {
+       init(); 
+-      uint32_t saved = mNodeIndex; 
++      boost::uint32_t saved = mNodeIndex; 
+       *this = other; 
+       mNodeIndex = saved; 
+       if (skipneighbors) {
+@@ -490,7 +491,7 @@
+       ===========================================
+       constructor
+     */ 
+-    FullNode(int16_t domain, int32_t nodeID) {
++    FullNode(boost::int16_t domain, boost::int32_t nodeID) {
+       init(); 
+       mID = NodeID(domain, nodeID); 
+     }
+@@ -499,7 +500,7 @@
+       Clear all nodes
+     */ 
+     static void Clear(void) {
+-      for (map<uint32_t, FullNode *>::iterator nodepos = mFullNodes.begin(); nodepos != mFullNodes.end(); nodepos++) {
++      for (map<boost::uint32_t, FullNode *>::iterator nodepos = mFullNodes.begin(); nodepos != mFullNodes.end(); nodepos++) {
+         delete nodepos->second;
+       }
+       mFullNodes.clear(); 
+@@ -547,7 +548,7 @@
+       Add the given arm to the list of arms to trace. 
+       See WriteTraceFiles()
+     */ 
+-    static void TraceNode(int32_t nodeID){
++    static void TraceNode(boost::int32_t nodeID){
+       mTraceNodes.push_back(nodeID);       
+     }
+@@ -630,7 +631,7 @@
+    /*!
+       Accessor function set the node type.  
+     */ 
+-    void SetNodeType(int8_t itype) { 
++    void SetNodeType(boost::int8_t itype) { 
+       mNodeType = itype; 
+       return; 
+     }
+@@ -638,7 +639,7 @@
+     /*!
+       Accessor function
+     */ 
+-    int8_t GetNodeType(void) { return mNodeType; }
++    boost::int8_t GetNodeType(void) { return mNodeType; }
+     
+     
+     /*!
+@@ -746,13 +747,13 @@
+     /*! 
+       Accessor function 
+     */ 
+-    ArmSegment *GetNeighborSegment(uint32_t num)  const { 
++    ArmSegment *GetNeighborSegment(boost::uint32_t num)  const { 
+       if (num >= mNeighborSegments.size()) 
+         throw std::string("subscript out of range in GetNeighborSegment"); 
+       return mNeighborSegments[num]; 
+     }
+-    struct Arm *GetNeighborArm(uint32_t num)  const { 
++    struct Arm *GetNeighborArm(boost::uint32_t num)  const { 
+       if (num >= mNeighborArms.size()) 
+         throw std::string("subscript out of range in GetNeighborArm"); 
+       return mNeighborArms[num]; 
+@@ -798,14 +799,14 @@
+    /*!
+       Accessor function
+     */
+-    int32_t GetIndex(void) { return mNodeIndex; }
++    boost::int32_t GetIndex(void) { return mNodeIndex; }
+  
+     string GetNodeIDString(void) { return GetNodeID().Stringify(0); }
+     /*!
+       Accessor
+     */ 
+-    void SetIndex(int32_t index) { 
++    void SetIndex(boost::int32_t index) { 
+       mNodeIndex = index; 
+     }
+     
+@@ -828,10 +829,10 @@
+     /*! 
+       all fullnodes in the data set.  DO NOT SORT THIS -- each node has an Index which is its position in this array when created -- used to find its counterpart in the wrapped nodes for tracing along arms to find their endpoints and lengths.  
+     */ 
+-    static std::map<uint32_t, FullNode *> mFullNodes; 
++    static std::map<boost::uint32_t, FullNode *> mFullNodes; 
+     static std::vector<FullNode *> mFullNodeVector; 
+-    static uint32_t mNextNodeID; 
++    static boost::uint32_t mNextNodeID; 
+     
+     /*!
+       Static member to keep track of subspace bounds for checking if we are in bounds or not
+@@ -848,7 +849,7 @@
+     /*!
+       Node Type is whether we are a butterfly, monster, or normal node (or a placeholder in a segment)
+     */ 
+-    int8_t mNodeType; 
++    boost::int8_t mNodeType; 
+     
+     bool mIsLoopNode; 
+@@ -857,7 +858,7 @@
+     /*!
+       This is needed for things like Visit, where nodes are accessed by node ID, whereas this library uses pointers.  Since it is also our index inthe global array of nodes, it turns out to be a good way to get the "real" counterpart of a wrapped node.  
+     */ 
+-    int32_t mNodeIndex; 
++    boost::int32_t mNodeIndex; 
+     /*!
+       Connectivity to our neighboring nodes encapsulated in ArmSegments
+@@ -865,10 +866,10 @@
+     std::vector< ArmSegment *> mNeighborSegments; 
+     static string mTraceFileBasename; 
+-    static vector<uint32_t> mTraceNodes; 
++    static vector<boost::uint32_t> mTraceNodes; 
+     // statistics:
+-    std::vector<uint32_t> mNumMonsterNodes; 
++    std::vector<boost::uint32_t> mNumMonsterNodes; 
+   }; /* end FullNode */  
+   
+@@ -886,7 +887,7 @@
+     }
+     ArmSegment(const ArmSegment &other){
+       init(); 
+-      uint32_t saved = mSegmentID; 
++      boost::uint32_t saved = mSegmentID; 
+       *this = other; 
+       mSegmentID = saved; 
+     }
+@@ -921,7 +922,7 @@
+     
+     static void Clear(void) {
+-      for (map<uint32_t, ArmSegment *>::iterator pos = mArmSegments.begin(); pos != mArmSegments.end(); ++pos) {
++      for (map<boost::uint32_t, ArmSegment *>::iterator pos = mArmSegments.begin(); pos != mArmSegments.end(); ++pos) {
+         delete pos->second; 
+       }
+       mArmSegments.clear(); 
+@@ -952,14 +953,14 @@
+     /*!
+       Accessor function
+     */
+-    /*static ArmSegment *GetArmSegment(uint32_t segnum) { 
++    /*static ArmSegment *GetArmSegment(boost::uint32_t segnum) { 
+       return mArmSegments[segnum]; 
+       }*/ 
+     /*! 
+       Accessor function. 
+     */ 
+-    /* static uint32_t GetNumArmSegments(void)  { 
++    /* static boost::uint32_t GetNumArmSegments(void)  { 
+       return mArmSegments.size(); 
+     }
+     */
+@@ -1001,7 +1002,7 @@
+     }
+     
+-    int8_t GetBurgersType(void) const { return mBurgersType; } 
++    boost::int8_t GetBurgersType(void) const { return mBurgersType; } 
+    /*!
+       Return the distance between the endpoints
+@@ -1013,42 +1014,42 @@
+     /*!
+       Accessor function
+     */ 
+-    int32_t GetNodeIndex(int num) {
++    boost::int32_t GetNodeIndex(int num) {
+       return mEndpoints[num]->GetIndex(); 
+     } 
+     /*! 
+       Set the segment id to the next available global ID
+     */ 
+-    void SetIndex(uint32_t id) {
++    void SetIndex(boost::uint32_t id) {
+       mSegmentID = id; 
+       return; 
+     }
+     /*!
+       accessor -- noop if not debug mode
+     */ 
+-    uint32_t GetID(void) {
++    boost::uint32_t GetID(void) {
+       return mSegmentID; 
+     }
+     /* Get the metaarm ID for the parent of this segment */ 
+-    uint32_t GetMetaArmID(void); 
++    boost::uint32_t GetMetaArmID(void); 
+     /* Get the metaarm Type for the parent of this segment */ 
+-    uint8_t GetMetaArmType(void);
++    boost::uint8_t GetMetaArmType(void);
+     
+     /*! 
+       Accessor for MN type
+     */ 
+-    int8_t GetMNType(void) const;
++    boost::int8_t GetMNType(void) const;
+      /* Get the arm ID for the parent of this segment */ 
+-    uint32_t GetArmID(void);
++    boost::uint32_t GetArmID(void);
+     
+     /*!
+       Accessor function
+     */ 
+-    void GetNodeIndices(uint32_t indices[2]) {
++    void GetNodeIndices(boost::uint32_t indices[2]) {
+       indices[0] = mEndpoints[0]->GetIndex(); 
+       indices[1] = mEndpoints[1]->GetIndex(); 
+     }
+@@ -1079,7 +1080,7 @@
+     /*!
+       SetEndpoint -- given an actual new FullNode and ID information for an as-yet uncreated neighborNode, we set the endpoints to be the address of the actualNode and the address of an internal placeholder, a copy of neighborNode.  We will delete the placeholder FullNode later, either when the actual FullNode is created, or when our destructor is called.
+     */ 
+-    void SetEndpoints(FullNode *actualNode, int16_t neighborDomain, int32_t neighborNodeID) {
++    void SetEndpoints(FullNode *actualNode, boost::int16_t neighborDomain, boost::int32_t neighborNodeID) {
+       FullNode *placeholder = new FullNode(neighborDomain, neighborNodeID); 
+       placeholder->SetNodeType(PLACEHOLDER_NODE); //mark as a dummy node; 
+       SetEndpoints(actualNode, placeholder); 
+@@ -1211,7 +1212,7 @@
+     /*!
+       purely for debugging
+     */ 
+-    int32_t mSegmentID; 
++    boost::int32_t mSegmentID; 
+     /*!
+       to find out if wrapped
+@@ -1225,23 +1226,23 @@
+     static double mSegLen;
+-    static uint32_t mNumClassified, mNumWrapped, mNumArmSegmentsMeasured; 
+-    static uint32_t mNextSegmentID; 
++    static boost::uint32_t mNumClassified, mNumWrapped, mNumArmSegmentsMeasured; 
++    static boost::uint32_t mNextSegmentID; 
+   protected:
+      /*!
+       The burgers-type is defined above.  
+     */ 
+-    int8_t mBurgersType; 
++    boost::int8_t mBurgersType; 
+     
+     /*! 
+       The MN_type of the segment is set by its parent arm.  See Arm struct for definitions, but it describes whether the segment is 200 or 111 and whether its parent arm has any monsters at either end. 
+     */ 
+-    //int8_t mMNType; 
++    //boost::int8_t mMNType; 
+      
+     /* The metaArm type that it belongs to.  */ 
+-    int8_t mMetaArmType; 
++    boost::int8_t mMetaArmType; 
+     /*!
+       Marker used for "once-through" operations like building arms that must look at every segment, but which will usually discover echo particular segment more than once. 
+@@ -1258,7 +1259,7 @@
+     /*!
+       The global list of valid arm segments
+     */ 
+-    static std::map<uint32_t, ArmSegment *> mArmSegments; 
++    static std::map<boost::uint32_t, ArmSegment *> mArmSegments; 
+     static vector<ArmSegment *> mArmSegmentVector; 
+     struct Arm *mParentArm; 
+@@ -1321,7 +1322,7 @@
+       return 1000*(id0.GetDomainID() + id1.GetDomainID()) + id0.GetNodeID() + id1.GetNodeID(); 
+     }
+   private:
+-    uint32_t mDenominator;
++    boost::uint32_t mDenominator;
+   };
+   */
+   //==============================================
+@@ -1384,7 +1385,7 @@
+     */ 
+     void MakeAncestor(Arm *sourceArm) {
+       mAncestorArms.push_back(sourceArm->mArmID); 
+-      for  (uint32_t a = 0; a < sourceArm->mAncestorArms.size(); a++) {
++      for  (boost::uint32_t a = 0; a < sourceArm->mAncestorArms.size(); a++) {
+         mAncestorArms.push_back(sourceArm->mAncestorArms[a]); 
+       }
+       return;
+@@ -1432,7 +1433,7 @@
+       Give the exact Burgers type of its segments. 
+       Return 0 is no terminal segments. 
+     */
+-    int8_t GetBurgersType(void) const {
++    boost::int8_t GetBurgersType(void) const {
+       if (!mTerminalSegments.size() || !mTerminalSegments[0])  {        
+         return BURGERS_UNKNOWN; 
+       }
+@@ -1441,10 +1442,10 @@
+     /* Get the metaarm ID for the parent of this arm */ 
+-    uint32_t GetMetaArmID(void);
++    boost::uint32_t GetMetaArmID(void);
+     /* Get the metaarm Type for the parent of this arm */ 
+-    uint8_t GetMetaArmType(void);
++    boost::uint8_t GetMetaArmType(void);
+   #if LINKED_LOOPS
+    /*! 
+@@ -1465,7 +1466,7 @@
+     */ 
+     vector<FullNode*> GetNodes(FullNode *startNode = NULL) const;
+-    uint32_t GetNumNodes(void) { 
++    boost::uint32_t GetNumNodes(void) { 
+       // The math here is a bit odd, due to wrapping: 
+       if (!mNumSegments) return 0; 
+       return mNumSegments + 1 + mNumWrappedSegments; 
+@@ -1534,9 +1535,9 @@
+     }
+     FullNode *GetCommonNode(Arm *other) {
+-      uint32_t myNode = mTerminalNodes.size();
++      boost::uint32_t myNode = mTerminalNodes.size();
+       while (myNode--) {
+-        uint32_t otherNode = other->mTerminalNodes.size();
++        boost::uint32_t otherNode = other->mTerminalNodes.size();
+         while (otherNode--) {
+           if (mTerminalNodes[myNode] == other->mTerminalNodes[otherNode]) {
+             return mTerminalNodes[myNode];
+@@ -1549,10 +1550,10 @@
+     /*!
+       Return number of neighbor arms, not including this arm, but including duplicates
+     */ 
+-    uint32_t GetNumNeighborArms(void) {
+-      uint32_t num = 0; 
+-      for  (uint32_t node = 0; node < mTerminalNodes.size(); node++) {
+-        for (uint32_t arm=0; arm < mTerminalNodes[node]->mNeighborArms.size(); arm++) {
++    boost::uint32_t GetNumNeighborArms(void) {
++      boost::uint32_t num = 0; 
++      for  (boost::uint32_t node = 0; node < mTerminalNodes.size(); node++) {
++        for (boost::uint32_t arm=0; arm < mTerminalNodes[node]->mNeighborArms.size(); arm++) {
+           if (mTerminalNodes[node]->mNeighborArms[arm] != this) {
+             num++;
+           }
+@@ -1565,8 +1566,8 @@
+       Return nth neighbor arm, not including this but including duplicates
+     */ 
+     Arm *GetNeighborArm (int num) {
+-      for  (uint32_t node = 0; node < mTerminalNodes.size(); node++) {
+-        for (uint32_t arm=0; arm < mTerminalNodes[node]->mNeighborArms.size(); arm++) {
++      for  (boost::uint32_t node = 0; node < mTerminalNodes.size(); node++) {
++        for (boost::uint32_t arm=0; arm < mTerminalNodes[node]->mNeighborArms.size(); arm++) {
+           if (mTerminalNodes[node]->mNeighborArms[arm] != this) {
+             if (!num)
+               return mTerminalNodes[node]->mNeighborArms[arm]; 
+@@ -1585,7 +1586,7 @@
+       return mArmLength; 
+     }
+-    uint8_t GetArmType(void) const { return mArmType; }
++    boost::uint8_t GetArmType(void) const { return mArmType; }
+     struct MetaArm *GetParentMetaArm(void) const { return mParentMetaArm; }
+@@ -1603,13 +1604,13 @@
+     /*! 
+       Helper function for Arm::WriteTraceFiles and FullNode::WriteTraceFiles
+     */ 
+-    void FindBFSNeighbors(vector<Arm *> &arms, vector<uint32_t> &armdepths, vector<int> &action);
++    void FindBFSNeighbors(vector<Arm *> &arms, vector<boost::uint32_t> &armdepths, vector<int> &action);
+     /*!
+       Add the given arm to the list of arms to trace. 
+       See WriteTraceFiles()
+     */ 
+-    static void TraceArm(int32_t armID){
++    static void TraceArm(boost::int32_t armID){
+       mTraceArms.push_back(armID);       
+     }
+@@ -1617,7 +1618,7 @@
+       Set the tracing depth for all traced arms.  
+       See WriteTraceFiles()
+     */ 
+-    static void SetTraceDepth(uint32_t depth) {
++    static void SetTraceDepth(boost::uint32_t depth) {
+       mTraceDepth = depth; 
+     }
+@@ -1642,8 +1643,8 @@
+     vector < ArmSegment *> mTerminalSegments; // At least one, but not more than two
+     vector <FullNode *> mTerminalNodes;  // At least one, but not more than two
+-    int8_t mArmType;
+-    int8_t mMetaArmType; // of its parent if it exists
++    boost::int8_t mArmType;
++    boost::int8_t mMetaArmType; // of its parent if it exists
+     double mArmLength; 
+     /*!
+       This is useless to the user, only used for classification 
+@@ -1651,8 +1652,8 @@
+     static std::vector<Arm *> mArms; 
+     static double mThreshold; // shorter than this and an arm is "short"
+     static double mDecomposedLength; // statistics
+-    static vector<int32_t> mNumDecomposed; // statistics
+-    static int32_t mNumDestroyedInDetachment; // statistics
++    static vector<boost::int32_t> mNumDecomposed; // statistics
++    static boost::int32_t mNumDestroyedInDetachment; // statistics
+     static double mTotalArmLengthBeforeDecomposition, 
+       mTotalArmLengthAfterDecomposition;  
+     bool mDecomposing, mExtendOrDetach; 
+@@ -1664,27 +1665,27 @@
+    /*!
+       number of segments in arm
+     */ 
+-    uint32_t mNumSegments; 
++    boost::uint32_t mNumSegments; 
+    /*!
+       number of segments that got wrapped (affects node and segments counts)
+     */ 
+-    uint8_t mNumWrappedSegments; 
++    boost::uint8_t mNumWrappedSegments; 
+     /*! 
+       purely for debugging
+     */ 
+-    int32_t mArmID; 
++    boost::int32_t mArmID; 
+     /*!
+       An ancestor of this arm was one which was assimilated into this arm,
+       during decomposition.  Useful for history tracing. 
+     */ 
+-    vector<int32_t> mAncestorArms; 
++    vector<boost::int32_t> mAncestorArms; 
+     /*! 
+       To trace out arms in a text and vtk file, add them to this vector
+     */ 
+-    static vector<int32_t> mTraceArms; 
++    static vector<boost::int32_t> mTraceArms; 
+     /*!
+       uniquify files from this run
+@@ -1695,7 +1696,7 @@
+       When tracing arms, how deep to BFS for neighbors? 
+       0 is no neighbors. 1 is immediate neighbors, etc. 
+     */ 
+-    static uint8_t mTraceDepth; 
++    static boost::uint8_t mTraceDepth; 
+     private: 
+     struct MetaArm * mParentMetaArm; 
+@@ -1734,7 +1735,7 @@
+  
+     vector<rclib::Point<float> > GetNodeLocations(bool wrapEndpoints);    
+  
+-    uint32_t GetNumSegments(bool wrapEndpoints) { 
++    boost::uint32_t GetNumSegments(bool wrapEndpoints) { 
+       if (!mNumSegments) {
+         dbprintf(1, "WARNING: MetaArm::GetNumSegments(): mNumSegments is 0.  You should call GetNodeLocations() before GetNumSegments() to avoid a permormance penalty.\n"); 
+         GetNodeLocations(wrapEndpoints); 
+@@ -1758,7 +1759,7 @@
+     }
+     // ======================
+     inline void AddTerminalNode(FullNode *node) {
+-      uint16_t nodenum = mTerminalNodes.size(); 
++      boost::uint16_t nodenum = mTerminalNodes.size(); 
+       while (nodenum--) {
+         if (mTerminalNodes[nodenum] == node) {
+           dbprintf(4, "Warning: node not added as it is a duplicate.\n"); 
+@@ -1770,7 +1771,7 @@
+     }
+     // ======================
+     inline void AddTerminalArm(Arm *arm) {
+-      uint16_t armnum = mTerminalArms.size(); 
++      boost::uint16_t armnum = mTerminalArms.size(); 
+       while (armnum--) {
+         if (mTerminalArms[armnum] == arm) {
+           dbprintf(4, "Warning: arm not added as it is a duplicate.\n"); 
+@@ -1785,7 +1786,7 @@
+       if (doreverse) {
+         reverse(mFoundArms.begin(), mFoundArms.end());
+       }
+-      uint32_t i = 0; 
++      boost::uint32_t i = 0; 
+       while (i < mFoundArms.size()) {
+         dbprintf(4, "Capture Path: add arm %d\n", mFoundArms[i]->mArmID); 
+         i++; 
+@@ -1795,16 +1796,16 @@
+       return; 
+     }
+     
+-    int8_t GetMetaArmType(void) { return mMetaArmType; }
+-    int32_t GetMetaArmID(void) { return mMetaArmID; }
++    boost::int8_t GetMetaArmType(void) { return mMetaArmType; }
++    boost::int32_t GetMetaArmID(void) { return mMetaArmID; }
+      
+    vector<FullNode *>mTerminalNodes; // 
+     vector<Arm*> mTerminalArms; // one or two arms
+     double mLength; 
+-    int8_t mMetaArmType; 
+-    uint32_t mMetaArmID; 
+-    uint32_t mNumSegments, mNumNodes; 
++    boost::int8_t mMetaArmType; 
++    boost::uint32_t mMetaArmID; 
++    boost::uint32_t mNumSegments, mNumNodes; 
+     static rclib::Point<float> mWrappedNode; // Used in GetNodeLocations -- used to indicate a gap in the point list from a MetaArm where a segment is skipped due to wrapping.  
+     bool mCombo; 
+     bool mFound111; // if we see a 111 on our search
+@@ -1922,21 +1923,21 @@
+     /*!
+       Trace decomposition of the given arm to the given depth.  
+     */ 
+-    void TraceNode(int32_t nodeID){
++    void TraceNode(boost::int32_t nodeID){
+       FullNode::TraceNode(nodeID); 
+     }
+     
+     /*!
+       Trace decomposition of the given arm to the given depth.  
+     */ 
+-    void TraceArm(int32_t armID){
++    void TraceArm(boost::int32_t armID){
+       Arm::TraceArm(armID);
+     }
+     
+     /*! 
+       Set trace depth for arm tracing
+     */ 
+-    void SetTraceDepth(uint32_t depth) {
++    void SetTraceDepth(boost::uint32_t depth) {
+       Arm::SetTraceDepth(depth); 
+     }
+@@ -2044,7 +2045,7 @@
+     /*!
+       Accessor function.
+     */ 
+-    uint32_t GetNumNodes(void) { return FullNode::mFullNodeVector.size(); }
++    boost::uint32_t GetNumNodes(void) { return FullNode::mFullNodeVector.size(); }
+     /*!
+       Accessor returns begin of node vector. 
+     */ 
+@@ -2063,7 +2064,7 @@
+    /*! 
+       Accessor function. 
+     */ 
+-    FullNode * GetNode(uint32_t nodenum) { 
++    FullNode * GetNode(boost::uint32_t nodenum) { 
+       if (nodenum >= FullNode::mFullNodeVector.size()) {
+         cerr << "ERROR: GetNode() -- out of bounds index" << endl; 
+         return NULL; 
+@@ -2104,19 +2105,19 @@
+      /*!
+       Accessor function
+     */
+-    uint32_t GetNumMetaArms(void) { return mMetaArms.size(); }
++    boost::uint32_t GetNumMetaArms(void) { return mMetaArms.size(); }
+     
+     /*!
+       Accessor function
+     */
+-    boost::shared_ptr<MetaArm> GetMetaArm(uint32_t metaArmNum) {
++    boost::shared_ptr<MetaArm> GetMetaArm(boost::uint32_t metaArmNum) {
+       return mMetaArms[metaArmNum]; 
+     }
+     /*!
+       Accessor function
+     */
+-    ArmSegment *GetArmSegment(uint32_t segnum) { 
++    ArmSegment *GetArmSegment(boost::uint32_t segnum) { 
+       if (segnum >= ArmSegment::mArmSegmentVector.size()) {
+         cerr << "" << endl; 
+         return NULL; 
+@@ -2127,7 +2128,7 @@
+     /*! 
+       Accessor function. 
+     */ 
+-    uint32_t GetNumArmSegments(void)  { 
++    boost::uint32_t GetNumArmSegments(void)  { 
+       return  ArmSegment::mArmSegmentVector.size(); 
+     }
+@@ -2200,11 +2201,11 @@
+     /*!
+       Read a node from the input file and write it out with its tag to the tagfile
+     */
+-    void CopyNodeFromFile(uint32_t &lineno, map<uint64_t, FullNode*> &nodehash, std::ifstream &datafile, std::ofstream &tagfile);
++    void CopyNodeFromFile(boost::uint32_t &lineno, map<boost::uint64_t, FullNode*> &nodehash, std::ifstream &datafile, std::ofstream &tagfile);
+     /*! 
+       Read a node and its neighbors from a file.  This has to be done in DataSet because we avoid duplicate neighbor structs by using pointers into a global neighbor array.
+     */ 
+-    void ReadMinimalNodeFromFile(uint32_t &lineno, std::ifstream &datafile);
++    void ReadMinimalNodeFromFile(boost::uint32_t &lineno, std::ifstream &datafile);
+     /*!
+       Make a first pass through the file:  load all as MinimalNodes, with minimal info: {domain and ID, whether out of bounds, neighbor IDs}
+     */ 
+@@ -2317,12 +2318,12 @@
+       When writing out VTK files, this is how many to put per block max.
+       Aids in speedy visualization. 
+     */ 
+-    uint32_t mElementsPerVTKFile; 
++    boost::uint32_t mElementsPerVTKFile; 
+     /*! 
+       Number of nodes in full dump data
+     */ 
+-    uint32_t mTotalDumpNodes; 
++    boost::uint32_t mTotalDumpNodes; 
+     /*!
+       if this is true, then complete dumps of all data are done, 
diff --git a/config/patches/paraview.003_surfacelic.patch b/config/patches/paraview.003_surfacelic.patch
new file mode 100644 (file)
index 0000000..ac90392
Binary files /dev/null and b/config/patches/paraview.003_surfacelic.patch differ
diff --git a/config/patches/paraview.004_forwarding.patch b/config/patches/paraview.004_forwarding.patch
new file mode 100644 (file)
index 0000000..22f698a
--- /dev/null
@@ -0,0 +1,12 @@
+diff -Naur ParaView-5.0.0_SRC_orig/CMake/pvForwardingExecutable.cmake ParaView-5.0.0_SRC_modif/CMake/pvForwardingExecutable.cmake
+--- ParaView-5.0.0_SRC_orig/CMake/pvForwardingExecutable.cmake 2015-12-16 20:09:48.000000000 +0300
++++ ParaView-5.0.0_SRC_modif/CMake/pvForwardingExecutable.cmake        2016-01-15 18:01:57.000000000 +0300
+@@ -81,7 +81,7 @@
+       add_executable(${exe_name}${PV_EXE_SUFFIX}
+         ${CMAKE_CURRENT_BINARY_DIR}/${exe_name}-forward.c)
+       set_target_properties(${exe_name}${PV_EXE_SUFFIX} PROPERTIES
+-        RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/launcher)
++        RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/launcher COMPILE_FLAGS -O2)
+       set_target_properties(${exe_name}${PV_EXE_SUFFIX} PROPERTIES
+         OUTPUT_NAME ${exe_name})
+       add_dependencies(${exe_name}${PV_EXE_SUFFIX} ${exe_name})
diff --git a/config/patches/qt.001_proxy_factory.patch b/config/patches/qt.001_proxy_factory.patch
new file mode 100644 (file)
index 0000000..c31936f
--- /dev/null
@@ -0,0 +1,12 @@
+diff -NaurwB /tmp/qt/qt-5.6.1__0/qtbase/src/network/kernel/qnetworkproxy_libproxy.cpp /tmp/qt/qt-5.6.1__1/qtbase/src/network/kernel/qnetworkproxy_libproxy.cpp
+--- /tmp/qt/qt-5.6.1__0/qtbase/src/network/kernel/qnetworkproxy_libproxy.cpp   2016-05-25 18:46:17.000000000 +0300
++++ /tmp/qt/qt-5.6.1__1/qtbase/src/network/kernel/qnetworkproxy_libproxy.cpp   2017-03-15 17:51:11.051090499 +0300
+@@ -74,7 +74,7 @@
+     QList<QUrl> ret;
+     if (factory) {
+-        char **proxies = px_proxy_factory_get_proxies(factory, url.toEncoded());
++        char **proxies = px_proxy_factory_get_proxies(factory, url.toEncoded().data());
+         if (proxies) {
+             for (int i = 0; proxies[i]; i++) {
+                 ret.append(QUrl::fromEncoded(proxies[i]));
diff --git a/config/patches/qt.002_webview_include.patch b/config/patches/qt.002_webview_include.patch
new file mode 100644 (file)
index 0000000..1cb42bf
--- /dev/null
@@ -0,0 +1,11 @@
+diff -Naur a/qtwebengine/examples/webenginewidgets/simplebrowser/webview.cpp b/qtwebengine/examples/webenginewidgets/simplebrowser/webview.cpp
+--- a/qtwebengine/examples/webenginewidgets/simplebrowser/webview.cpp  2016-05-26 21:01:25.000000000 +0300
++++ b/qtwebengine/examples/webenginewidgets/simplebrowser/webview.cpp  2016-06-22 11:19:20.000000000 +0300
+@@ -49,6 +49,7 @@
+ #include <QMessageBox>
+ #include <QNetworkReply>
+ #include <QTimer>
++#include <QDebug>
+ WebView::WebView(QWidget *parent)
+     : QWebEngineView(parent)
diff --git a/config/patches/qt.003_webengine.patch b/config/patches/qt.003_webengine.patch
new file mode 100755 (executable)
index 0000000..a9d3063
--- /dev/null
@@ -0,0 +1,25 @@
+diff -Naur qt-5.5.1_SRC_orig/qtwebengine/src/3rdparty/chromium/third_party/mojo/src/mojo/public/c/system/macros.h qt-5.5.1_SRC_modif/qtwebengine/src/3rdparty/chromium/third_party/mojo/src/mojo/public/c/system/macros.h
+--- qt-5.5.1_SRC_orig/qtwebengine/src/3rdparty/chromium/third_party/mojo/src/mojo/public/c/system/macros.h     2015-10-13 07:35:48.000000000 +0300
++++ qt-5.5.1_SRC_modif/qtwebengine/src/3rdparty/chromium/third_party/mojo/src/mojo/public/c/system/macros.h    2015-12-23 11:18:45.000000000 +0300
+@@ -66,10 +66,18 @@
+ // Unlike the C++11 |alignas()|, |alignment| must be an integer. It may not be a
+ // type, nor can it be an expression like |MOJO_ALIGNOF(type)| (due to the
+ // non-C++11 MSVS version).
+-#if __cplusplus >= 201103L
++#if defined(__GNUC__)
++  #if (__GNUC__<=4) and (_GNUC_MINOR__<= 7)
++    #define MOJO_ALIGNAS(alignment) __attribute__((aligned(alignment)))
++  #else
++    #if __cplusplus >= 201103L
++     #define MOJO_ALIGNAS(alignment) alignas(alignment)
++    #else
++     #define MOJO_ALIGNAS(alignment) __attribute__((aligned(alignment)))
++    #endif
++  #endif
++#elif __cplusplus >= 201103L
+ #define MOJO_ALIGNAS(alignment) alignas(alignment)
+-#elif defined(__GNUC__)
+-#define MOJO_ALIGNAS(alignment) __attribute__((aligned(alignment)))
+ #elif defined(_MSC_VER)
+ #define MOJO_ALIGNAS(alignment) __declspec(align(alignment))
+ #else
diff --git a/config/patches/qt.004_blender_scene.patch b/config/patches/qt.004_blender_scene.patch
new file mode 100644 (file)
index 0000000..11b5c6f
--- /dev/null
@@ -0,0 +1,76 @@
+diff -NaurwB /tmp/qt/qt-5.6.1__0/qt3d/src/3rdparty/assimp/code/BlenderScene.cpp /tmp/qt/qt-5.6.1__1/qt3d/src/3rdparty/assimp/code/BlenderScene.cpp
+--- /tmp/qt/qt-5.6.1__0/qt3d/src/3rdparty/assimp/code/BlenderScene.cpp 2017-03-15 17:56:09.572756601 +0300
++++ /tmp/qt/qt-5.6.1__1/qt3d/src/3rdparty/assimp/code/BlenderScene.cpp 2017-03-15 18:00:35.950259586 +0300
+@@ -677,39 +677,39 @@
+ //--------------------------------------------------------------------------------
+ void DNA::RegisterConverters() {
+-    converters["Object"] = DNA::FactoryPair( &Structure::Allocate<Object>, &Structure::Convert<Object> );
+-    converters["Group"] = DNA::FactoryPair( &Structure::Allocate<Group>, &Structure::Convert<Group> );
+-    converters["MTex"] = DNA::FactoryPair( &Structure::Allocate<MTex>, &Structure::Convert<MTex> );
+-    converters["TFace"] = DNA::FactoryPair( &Structure::Allocate<TFace>, &Structure::Convert<TFace> );
+-    converters["SubsurfModifierData"] = DNA::FactoryPair( &Structure::Allocate<SubsurfModifierData>, &Structure::Convert<SubsurfModifierData> );
+-    converters["MFace"] = DNA::FactoryPair( &Structure::Allocate<MFace>, &Structure::Convert<MFace> );
+-    converters["Lamp"] = DNA::FactoryPair( &Structure::Allocate<Lamp>, &Structure::Convert<Lamp> );
+-    converters["MDeformWeight"] = DNA::FactoryPair( &Structure::Allocate<MDeformWeight>, &Structure::Convert<MDeformWeight> );
+-    converters["PackedFile"] = DNA::FactoryPair( &Structure::Allocate<PackedFile>, &Structure::Convert<PackedFile> );
+-    converters["Base"] = DNA::FactoryPair( &Structure::Allocate<Base>, &Structure::Convert<Base> );
+-    converters["MTFace"] = DNA::FactoryPair( &Structure::Allocate<MTFace>, &Structure::Convert<MTFace> );
+-    converters["Material"] = DNA::FactoryPair( &Structure::Allocate<Material>, &Structure::Convert<Material> );
+-    converters["MTexPoly"] = DNA::FactoryPair( &Structure::Allocate<MTexPoly>, &Structure::Convert<MTexPoly> );
+-    converters["Mesh"] = DNA::FactoryPair( &Structure::Allocate<Mesh>, &Structure::Convert<Mesh> );
+-    converters["MDeformVert"] = DNA::FactoryPair( &Structure::Allocate<MDeformVert>, &Structure::Convert<MDeformVert> );
+-    converters["World"] = DNA::FactoryPair( &Structure::Allocate<World>, &Structure::Convert<World> );
+-    converters["MLoopCol"] = DNA::FactoryPair( &Structure::Allocate<MLoopCol>, &Structure::Convert<MLoopCol> );
+-    converters["MVert"] = DNA::FactoryPair( &Structure::Allocate<MVert>, &Structure::Convert<MVert> );
+-    converters["MEdge"] = DNA::FactoryPair( &Structure::Allocate<MEdge>, &Structure::Convert<MEdge> );
+-    converters["MLoopUV"] = DNA::FactoryPair( &Structure::Allocate<MLoopUV>, &Structure::Convert<MLoopUV> );
+-    converters["GroupObject"] = DNA::FactoryPair( &Structure::Allocate<GroupObject>, &Structure::Convert<GroupObject> );
+-    converters["ListBase"] = DNA::FactoryPair( &Structure::Allocate<ListBase>, &Structure::Convert<ListBase> );
+-    converters["MLoop"] = DNA::FactoryPair( &Structure::Allocate<MLoop>, &Structure::Convert<MLoop> );
+-    converters["ModifierData"] = DNA::FactoryPair( &Structure::Allocate<ModifierData>, &Structure::Convert<ModifierData> );
+-    converters["ID"] = DNA::FactoryPair( &Structure::Allocate<ID>, &Structure::Convert<ID> );
+-    converters["MCol"] = DNA::FactoryPair( &Structure::Allocate<MCol>, &Structure::Convert<MCol> );
+-    converters["MPoly"] = DNA::FactoryPair( &Structure::Allocate<MPoly>, &Structure::Convert<MPoly> );
+-    converters["Scene"] = DNA::FactoryPair( &Structure::Allocate<Scene>, &Structure::Convert<Scene> );
+-    converters["Library"] = DNA::FactoryPair( &Structure::Allocate<Library>, &Structure::Convert<Library> );
+-    converters["Tex"] = DNA::FactoryPair( &Structure::Allocate<Tex>, &Structure::Convert<Tex> );
+-    converters["Camera"] = DNA::FactoryPair( &Structure::Allocate<Camera>, &Structure::Convert<Camera> );
+-    converters["MirrorModifierData"] = DNA::FactoryPair( &Structure::Allocate<MirrorModifierData>, &Structure::Convert<MirrorModifierData> );
+-    converters["Image"] = DNA::FactoryPair( &Structure::Allocate<Image>, &Structure::Convert<Image> );
++    converters["Object"] = DNA::FactoryPair( (DNA::AllocProcPtr)&Structure::Allocate<Object>, (DNA::ConvertProcPtr)&Structure::Convert<Object> );
++    converters["Group"] = DNA::FactoryPair( (DNA::AllocProcPtr)&Structure::Allocate<Group>, (DNA::ConvertProcPtr)&Structure::Convert<Group> );
++    converters["MTex"] = DNA::FactoryPair( (DNA::AllocProcPtr)&Structure::Allocate<MTex>, (DNA::ConvertProcPtr)&Structure::Convert<MTex> );
++    converters["TFace"] = DNA::FactoryPair( (DNA::AllocProcPtr)&Structure::Allocate<TFace>, (DNA::ConvertProcPtr)&Structure::Convert<TFace> );
++    converters["SubsurfModifierData"] = DNA::FactoryPair( (DNA::AllocProcPtr)&Structure::Allocate<SubsurfModifierData>, (DNA::ConvertProcPtr)&Structure::Convert<SubsurfModifierData> );
++    converters["MFace"] = DNA::FactoryPair( (DNA::AllocProcPtr)&Structure::Allocate<MFace>, (DNA::ConvertProcPtr)&Structure::Convert<MFace> );
++    converters["Lamp"] = DNA::FactoryPair( (DNA::AllocProcPtr)&Structure::Allocate<Lamp>, (DNA::ConvertProcPtr)&Structure::Convert<Lamp> );
++    converters["MDeformWeight"] = DNA::FactoryPair( (DNA::AllocProcPtr)&Structure::Allocate<MDeformWeight>, (DNA::ConvertProcPtr)&Structure::Convert<MDeformWeight> );
++    converters["PackedFile"] = DNA::FactoryPair( (DNA::AllocProcPtr)&Structure::Allocate<PackedFile>, (DNA::ConvertProcPtr)&Structure::Convert<PackedFile> );
++    converters["Base"] = DNA::FactoryPair( (DNA::AllocProcPtr)&Structure::Allocate<Base>, (DNA::ConvertProcPtr)&Structure::Convert<Base> );
++    converters["MTFace"] = DNA::FactoryPair( (DNA::AllocProcPtr)&Structure::Allocate<MTFace>, (DNA::ConvertProcPtr)&Structure::Convert<MTFace> );
++    converters["Material"] = DNA::FactoryPair( (DNA::AllocProcPtr)&Structure::Allocate<Material>, (DNA::ConvertProcPtr)&Structure::Convert<Material> );
++    converters["MTexPoly"] = DNA::FactoryPair( (DNA::AllocProcPtr)&Structure::Allocate<MTexPoly>, (DNA::ConvertProcPtr)&Structure::Convert<MTexPoly> );
++    converters["Mesh"] = DNA::FactoryPair( (DNA::AllocProcPtr)&Structure::Allocate<Mesh>, (DNA::ConvertProcPtr)&Structure::Convert<Mesh> );
++    converters["MDeformVert"] = DNA::FactoryPair( (DNA::AllocProcPtr)&Structure::Allocate<MDeformVert>, (DNA::ConvertProcPtr)&Structure::Convert<MDeformVert> );
++    converters["World"] = DNA::FactoryPair( (DNA::AllocProcPtr)&Structure::Allocate<World>, (DNA::ConvertProcPtr)&Structure::Convert<World> );
++    converters["MLoopCol"] = DNA::FactoryPair( (DNA::AllocProcPtr)&Structure::Allocate<MLoopCol>, (DNA::ConvertProcPtr)&Structure::Convert<MLoopCol> );
++    converters["MVert"] = DNA::FactoryPair( (DNA::AllocProcPtr)&Structure::Allocate<MVert>, (DNA::ConvertProcPtr)&Structure::Convert<MVert> );
++    converters["MEdge"] = DNA::FactoryPair( (DNA::AllocProcPtr)&Structure::Allocate<MEdge>, (DNA::ConvertProcPtr)&Structure::Convert<MEdge> );
++    converters["MLoopUV"] = DNA::FactoryPair( (DNA::AllocProcPtr)&Structure::Allocate<MLoopUV>, (DNA::ConvertProcPtr)&Structure::Convert<MLoopUV> );
++    converters["GroupObject"] = DNA::FactoryPair( (DNA::AllocProcPtr)&Structure::Allocate<GroupObject>, (DNA::ConvertProcPtr)&Structure::Convert<GroupObject> );
++    converters["ListBase"] = DNA::FactoryPair( (DNA::AllocProcPtr)&Structure::Allocate<ListBase>, (DNA::ConvertProcPtr)&Structure::Convert<ListBase> );
++    converters["MLoop"] = DNA::FactoryPair( (DNA::AllocProcPtr)&Structure::Allocate<MLoop>, (DNA::ConvertProcPtr)&Structure::Convert<MLoop> );
++    converters["ModifierData"] = DNA::FactoryPair( (DNA::AllocProcPtr)&Structure::Allocate<ModifierData>, (DNA::ConvertProcPtr)&Structure::Convert<ModifierData> );
++    converters["ID"] = DNA::FactoryPair( (DNA::AllocProcPtr)&Structure::Allocate<ID>, (DNA::ConvertProcPtr)&Structure::Convert<ID> );
++    converters["MCol"] = DNA::FactoryPair( (DNA::AllocProcPtr)&Structure::Allocate<MCol>, (DNA::ConvertProcPtr)&Structure::Convert<MCol> );
++    converters["MPoly"] = DNA::FactoryPair( (DNA::AllocProcPtr)&Structure::Allocate<MPoly>, (DNA::ConvertProcPtr)&Structure::Convert<MPoly> );
++    converters["Scene"] = DNA::FactoryPair( (DNA::AllocProcPtr)&Structure::Allocate<Scene>, (DNA::ConvertProcPtr)&Structure::Convert<Scene> );
++    converters["Library"] = DNA::FactoryPair( (DNA::AllocProcPtr)&Structure::Allocate<Library>, (DNA::ConvertProcPtr)&Structure::Convert<Library> );
++    converters["Tex"] = DNA::FactoryPair( (DNA::AllocProcPtr)&Structure::Allocate<Tex>, (DNA::ConvertProcPtr)&Structure::Convert<Tex> );
++    converters["Camera"] = DNA::FactoryPair( (DNA::AllocProcPtr)&Structure::Allocate<Camera>, (DNA::ConvertProcPtr)&Structure::Convert<Camera> );
++    converters["MirrorModifierData"] = DNA::FactoryPair( (DNA::AllocProcPtr)&Structure::Allocate<MirrorModifierData>, (DNA::ConvertProcPtr)&Structure::Convert<MirrorModifierData> );
++    converters["Image"] = DNA::FactoryPair( (DNA::AllocProcPtr)&Structure::Allocate<Image>, (DNA::ConvertProcPtr)&Structure::Convert<Image> );
+ }
diff --git a/config/patches/qt.005_null_ptr.patch b/config/patches/qt.005_null_ptr.patch
new file mode 100644 (file)
index 0000000..78c01e9
--- /dev/null
@@ -0,0 +1,12 @@
+diff -Naur a/qtmultimedia/src/gsttools/qgstreamerbushelper.cpp b/qtmultimedia/src/gsttools/qgstreamerbushelper.cpp
+--- a/qtmultimedia/src/gsttools/qgstreamerbushelper.cpp        2016-05-31 13:23:00.000000000 +0300
++++ b/qtmultimedia/src/gsttools/qgstreamerbushelper.cpp        2016-06-22 12:03:49.000000000 +0300
+@@ -52,7 +52,7 @@
+         m_tag(0),
+         m_bus(bus),
+         m_helper(parent),
+-        m_intervalTimer(nullptr)
++        m_intervalTimer(NULL)
+     {
+         // glib event loop can be disabled either by env variable or QT_NO_GLIB define, so check the dispacher
+         QAbstractEventDispatcher *dispatcher = QCoreApplication::eventDispatcher();
diff --git a/config/patches/scotch.001_pthreads.patch b/config/patches/scotch.001_pthreads.patch
new file mode 100644 (file)
index 0000000..b654d1f
--- /dev/null
@@ -0,0 +1,50 @@
+diff -NaurwB scotch-5.1.11__0/src/Make.inc/Makefile.inc.x86-64_pc_linux2.prof scotch-5.1.11__1/src/Make.inc/Makefile.inc.x86-64_pc_linux2.prof
+--- scotch-5.1.11__0/src/Make.inc/Makefile.inc.x86-64_pc_linux2.prof   1970-01-01 03:00:00.000000000 +0300
++++ scotch-5.1.11__1/src/Make.inc/Makefile.inc.x86-64_pc_linux2.prof   2017-03-15 18:17:53.536110097 +0300
+@@ -0,0 +1,21 @@
++EXE           =
++LIB           = .a
++OBJ           = .o
++
++MAKE          = make
++AR            = ar
++ARFLAGS               = -ruv
++CAT           = cat
++CCS           = gcc
++CCP           = mpicc
++CCD           = gcc
++CFLAGS                = -fPIC -pg -O3 -Drestrict=__restrict -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_PTHREAD -DSCOTCH_RENAME -DSCOTCH_RENAME_PARSER
++CLIBFLAGS     =
++LDFLAGS               = -lz -lm -lrt -lpthread
++CP            = cp
++LEX           = flex -Pscotchyy -olex.yy.c
++LN            = ln
++MKDIR         = mkdir
++MV            = mv
++RANLIB                = ranlib
++YACC          = bison -pscotchyy -y -b y
+diff -NaurwB scotch-5.1.11__0/src/Makefile.inc scotch-5.1.11__1/src/Makefile.inc
+--- scotch-5.1.11__0/src/Makefile.inc  1970-01-01 03:00:00.000000000 +0300
++++ scotch-5.1.11__1/src/Makefile.inc  2017-03-15 18:17:53.536110097 +0300
+@@ -0,0 +1,21 @@
++EXE           =
++LIB           = .a
++OBJ           = .o
++
++MAKE          = make
++AR            = ar
++ARFLAGS               = -ruv
++CAT           = cat
++CCS           = gcc
++CCP           = mpicc
++CCD           = gcc
++CFLAGS                = -fPIC -pg -O3 -Drestrict=__restrict -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_PTHREAD -DSCOTCH_RENAME -DSCOTCH_RENAME_PARSER
++CLIBFLAGS     =
++LDFLAGS               = -lz -lm -lrt -lpthread
++CP            = cp
++LEX           = flex -Pscotchyy -olex.yy.c
++LN            = ln
++MKDIR         = mkdir
++MV            = mv
++RANLIB                = ranlib
++YACC          = bison -pscotchyy -y -b y
diff --git a/config/patches/solvespace.001_nogui.patch b/config/patches/solvespace.001_nogui.patch
new file mode 100644 (file)
index 0000000..b273ca6
--- /dev/null
@@ -0,0 +1,50 @@
+diff -Naur '--exclude=CVS' '--exclude=.git' solvespace-2.1.orig/CMakeLists.txt solvespace-2.1.p1/CMakeLists.txt
+--- solvespace-2.1.orig/CMakeLists.txt 2015-09-28 17:55:15.000000000 +0300
++++ solvespace-2.1.p1/CMakeLists.txt   2015-09-28 18:05:50.000000000 +0300
+@@ -28,6 +28,10 @@
+     set(GUI gtk2 CACHE STRING "GUI toolkit to use (one of: gtk2 gtk3)")
+ endif()
++# options
++
++option(BUILD_GUI "Build only the library part" ON)
++
+ # compiler
+ if(WIN32)
+@@ -54,6 +58,8 @@
+ CHECK_INCLUDE_FILE("stdint.h" HAVE_STDINT_H)
++if(BUILD_GUI)
++
+ find_package(OpenGL REQUIRED)
+ find_package(Perl)
+@@ -125,6 +131,8 @@
+     endif()
+ endif()
++endif(BUILD_GUI)
++
+ # components
+ if(WIN32)
+diff -Naur '--exclude=CVS' '--exclude=.git' solvespace-2.1.orig/src/CMakeLists.txt solvespace-2.1.p1/src/CMakeLists.txt
+--- solvespace-2.1.orig/src/CMakeLists.txt     2015-09-28 17:55:15.000000000 +0300
++++ solvespace-2.1.p1/src/CMakeLists.txt       2015-09-28 18:07:31.000000000 +0300
+@@ -79,6 +79,8 @@
+ # generated files
++if(BUILD_GUI)
++
+ file(GLOB icons "${CMAKE_CURRENT_SOURCE_DIR}/icons/*.png")
+ if(PERL_FOUND AND PERLMODULES_FOUND)
+@@ -384,3 +386,5 @@
+         --malloc-fill=0xac
+         --free-fill=0xde
+         $<TARGET_FILE:solvespace>)
++
++endif(BUILD_GUI)
index 8e8c7ffaedc8bf3eefe635b534e099ee53dafd7d..542b5db79e5a2e09739982b5c8508ea5b68b17cb 100644 (file)
@@ -1,3 +1,175 @@
 <?xml version="1.0" encoding="utf-8" ?>
 <!DOCTYPE config>
-<config />
+<config comment="SALOME 8.3" name="V8_3_0">
+  <product name="alabaster" version="0.7.6" />
+  <product name="babel" version="2.0" />
+  <product name="boost" version="1.52.0">
+    <patches>
+      <patch comment="Fix problem with compiling fcontext.cpp on some platforms" name="boost.001_fcontext.patch" />
+      <patch comment="Fix problem with compiling formatter.cpp on some platforms" name="boost.002_icu_formatter.patch" />
+    </patches>
+  </product>
+  <product name="cgnslib" version="3.1.3" />
+  <product name="cmake" version="3.3.0" />
+  <product name="cython" version="0.23.2" />
+  <product name="dateutils" version="2.4.2" />
+  <product name="distribute" version="0.7.3" />
+  <product name="docutils" version="0.12" />
+  <product name="doxygen" version="1.8.3.1" />
+  <product name="freeimage" version="3.16.0">
+    <patches>
+      <patch comment="Fix compilation problems" name="freeimage.001_sources.patch" />
+      <patch comment="Fix build procedure" name="freeimage.002_build_procedure.patch" />
+      <patch comment="Gcc 4.7 compatibility" name="freeimage.003_gcc47_compat.patch" />
+      <patch comment="Gcc 6 compatibility" name="freeimage.004_gcc66.patch" />
+    </patches>
+  </product>
+  <product name="freetype" version="2.4.11" />
+  <product name="gl2ps" version="1.3.9-svn-20160620">
+    <patches>
+      <patch comment="Fix problem with missing additional libraries" name="gl2ps.001_libs.patch" />
+    </patches>
+  </product>
+  <product name="graphviz" version="2.38.0">
+    <patches>
+      <patch comment="Fix build procedure" name="graphviz.001_build_procedure.patch" />
+    </patches>
+  </product>
+  <product name="hdf5" version="1.8.14" />
+  <product name="homardtool" version="11.8" />
+  <product name="h5py" version="2.5.0" />
+  <product name="jinja2" version="2.7.3" />
+  <product name="lapack" version="3.5.0" />
+  <product name="libxml2" version="2.9.0">
+    <patches>
+      <patch comment="Fix crash on 64bits platforms" name="libxml2.001_64bits_crash.patch" />
+    </patches>
+  </product>
+  <product name="markupsafe" version="0.23" />
+  <product name="matplotlib" version="1.4.3">
+    <patches>
+      <patch comment="Fix build procedure: create configuration file properly" name="matplotlib.001_build_procedure.patch" />
+    </patches>
+  </product>
+  <product name="medfile" version="3.2.1">
+    <patches>
+      <patch comment="Fix problem when builiding parallel support" name="medfile.001_parallel.patch" />
+      <patch comment="Compatibility with gcc6" name="medfile.002_gcc6.patch" />
+    </patches>
+  </product>
+  <product name="meshgems" version="2.4-4" />
+  <product name="metis" version="5.1.0" />
+  <product name="mpich2" version="1.4.1p1" />
+  <product name="mpi4py" version="1.3.1" />
+  <product name="netgen" version="5.3.1">
+    <patches>
+      <patch comment="General patch needed for SALOME platform" name="netgen.001_sources.patch" />
+    </patches>
+  </product>
+  <product name="nose" version="1.3.7" />
+  <product name="numpy" version="1.9.2" />
+  <product name="occt" version="7.1.0" />
+  <product name="omniorb" version="4.1.6">
+    <patches>
+      <patch comment="Fix compilation issues" name="omniorb.001_omninotify_compilation.patch" />
+      <patch comment="Fix for 64 bits platforms" name="omniorb.002_omninotify_64bits.patch" />
+    </patches>
+  </product>
+  <product name="omniorbpy" version="3.6" />
+  <product name="opencv" version="2.4.6.1">
+    <patches>
+      <patch comment="Fix compilation problem (reduce optimizaion level)" name="opencv.001_compile.patch" />
+      <patch comment="Gcc 6 compatibility patch" name="opencv.002_gcc6.patch" />
+    </patches>
+  </product>
+  <product name="openmpi" version="1.8.5" />
+  <product name="paco++" version="0.5.5">
+    <patches>
+      <patch comment="Gcc 4.4 compatibility" name="paco++.001_gcc44_compat.patch" />
+    </patches>
+  </product>
+  <product name="paraview" version="5.1.2-35c5231cb6">
+    <patches>
+      <patch comment="Fix problem with installation of VTKTargets.cmake" name="paraview.001_vtk_targets.patch" />
+      <patch comment="Fix compilation of VisItBridge utility" name="paraview.002_visitbridge.patch" />
+      <patch comment="Fix hangup on generation of docs in SurfaceLIC plugin" name="paraview.003_surfacelic.patch" />
+      <patch comment="Fix problem with forwarding executables on some platforms" name="paraview.004_forwarding.patch" />
+    </patches>
+  </product>
+  <product name="pkgconfig" version="1.1.0" />
+  <product name="pygments" version="2.0.2" />
+  <product name="pyparsing" version="2.0.3" />
+  <product name="pyqt" version="5.6.0" />
+  <product name="python" version="2.7.10" />
+  <product name="pytz" version="2015.4" />
+  <product name="qt" version="5.6.1">
+    <patches>
+      <patch comment="Fix problem with proxy factory (WebKit)." name="qt.001_proxy_factory.patch" />
+      <patch comment="Fix problem with compiling webview" name="qt.002_webview_include.patch" />
+      <patch comment="Fix problem with compiling QWebEngine with gcc 4.7" name="qt.003_webengine.patch" />
+      <patch comment="Fix compilation of blender scene (Qt 3D)" name="qt.004_blender_scene.patch" />
+      <patch comment="Fix compilation problem with null pointer (nullptr)" name="qt.005_null_ptr.patch" />
+    </patches>
+  </product>
+  <product name="qwt" version="6.1.2" />
+  <product name="scipy" version="0.15.1" />
+  <product name="scotch" version="5.1.11">
+    <patches>
+      <patch comment="Fix problem with linking to pthreads" name="scotch.001_pthreads.patch" />
+    </patches>
+  </product>
+  <product name="setuptools" version="18.3.2" />
+  <product name="sip" version="4.18" />
+  <product name="six" version="1.9.0" />
+  <product name="snowballstemmer" version="1.2.0" />
+  <product name="solvespace" version="2.1">
+    <patches>
+      <patch comment="To build w/o GUI" name="solvespace.001_nogui.patch" />
+    </patches>
+  </product>
+  <product name="sphinx" version="1.2.3" />
+  <product name="sphinxrtdtheme" version="0.1.9" />
+  <product name="swig" version="2.0.8" />
+  <product name="tcltk" version="8.6.0" />
+  <product name="tclx" version="8.4.1" />
+  <product name="tbb" version="4.2.4" />
+  <product name="eigen" version="3.2.7" />
+  <product name="planegcs" version="0.16" />
+  <product comment="SALOME Geometry module" name="geom" version="V8_3_0" />
+  <product comment="SALOME GUI module" name="gui" version="V8_3_0" />
+  <product comment="SALOME HexaBlock module" name="hexablock" version="V8_3_0" />
+  <product comment="SALOME Homard module" name="homard" version="V8_3_0" />
+  <product comment="SALOME JobManager module" name="jobmanager" version="V8_3_0" />
+  <product comment="SALOME Kernel module" name="kernel" version="V8_3_0" />
+  <product comment="SALOME Med module" name="med" version="V8_3_0" />
+  <product comment="SALOME ParaVis module" name="paravis" version="V8_3_0" />
+  <product comment="SALOME Mesh module" name="smesh" version="V8_3_0" />
+  <product comment="SALOME YACS module" name="yacs" version="V8_3_0" />
+  <product comment="SALOME MG-CadSurf meshing plugin" name="blsurfplugin" version="V8_3_0" />
+  <product comment="SALOME MG-Tetra meshing plugin" name="ghs3dplugin" version="V8_3_0" />
+  <product comment="SALOME MG-Tetra_HPC meshing plugin" name="ghs3dprlplugin" version="V8_3_0" />
+  <product comment="SALOME MG-Hexa meshing plugin" name="hexoticplugin" version="V8_3_0" />
+  <product comment="SALOME HexaBlock meshing plugin" name="hexablockplugin" version="V8_3_0" />
+  <product comment="SALOME MG-Hybrid meshing plugin" name="hybridplugin" version="V8_3_0" />
+  <product comment="SALOME Netgen meshing plugin" name="netgenplugin" version="V8_3_0" />
+  <product comment="SALOME Documentation tool" name="documentation" version="V8_3_0" />
+  <product comment="SALOME Hxx2salome tool" name="hxx2salome" version="V8_3_0" />
+  <product comment="libBatch library" name="libbatch" version="V8_3_0" />
+  <product comment="SALOME MedCoupling library" name="medcoupling" version="V8_3_0" />
+  <product comment="SALOME Tutorial" name="tutorial" version="V8_3_0" />
+  <product comment="SALOME YacsGen tool" name="yacsgen" version="V8_3_0" />
+  <product comment="SALOME AtomGen sample module" name="atomgen" version="V8_3_0" />
+  <product comment="SALOME Atomic sample module" name="atomic" version="V8_3_0" />
+  <product comment="SALOME AtomSolv sample module" name="atomsolv" version="V8_3_0" />
+  <product comment="SALOME Calculator sample module" name="calculator" version="V8_3_0" />
+  <product comment="SALOME Component sample module" name="component" version="V8_3_0" />
+  <product comment="SALOME data files" name="samples" version="V8_3_0" />
+  <product comment="SALOME DscCode sample module" name="dsccode" version="V8_3_0" />
+  <product comment="SALOME Hello sample module" name="hello" version="V8_3_0" />
+  <product comment="SALOME Light sample module" name="light" version="V8_3_0" />
+  <product comment="SALOME PyCalculator sample module" name="pycalculator" version="V8_3_0" />
+  <product comment="SALOME PyHello sample module" name="pyhello" version="V8_3_0" />
+  <product comment="SALOME PyLight sample module" name="pylight" version="V8_3_0" />
+  <product comment="SALOME Randomizer sample module" name="randomizer" version="V8_3_0" />
+  <product comment="SALOME Sierpinsky sample module" name="sierpinsky" version="V8_3_0" />
+</config>