From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on sa.int.altlinux.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.2.5 Date: Tue, 11 Sep 2012 08:48:02 +0400 From: "Ivan A. Melnikov" To: devel@lists.altlinux.org Message-ID: <20120911084802.503934d8@deimos.localdomain> In-Reply-To: <504E9836.7020102@yandex.ru> References: <20120905080503.0135b097@deimos.localdomain> <504E9836.7020102@yandex.ru> X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.12; x86_64-alt-linux-gnu) Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/hq//wXhKT2tVb7KITwoVElh" Subject: Re: [devel] IA: boost 1.51.0 X-BeenThere: devel@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: ALT Linux Team development discussions List-Id: ALT Linux Team development discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Sep 2012 04:48:10 -0000 Archived-At: List-Archive: List-Post: --MP_/hq//wXhKT2tVb7KITwoVElh Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Tue, 11 Sep 2012 05:47:34 +0400 =D0=A0=D0=B0=D0=B4=D0=B8=D0=BA =D0=AE=D1=81=D1=83=D0=BF=D0=BE=D0=B2 wrote: > On 05.09.2012 08:05, Ivan A. Melnikov wrote: > > 3. =D0=95=D1=81=D0=BB=D0=B8 =D0=BD=D0=B5=D1=82, =D1=82=D0=BE =D0=B2=D1= =81=D1=91 =D0=BA=D0=B0=D0=BA =D0=BE=D0=B1=D1=8B=D1=87=D0=BD=D0=BE: =D0=B8= =D0=BD=D0=BE=D0=B3=D0=B4=D0=B0 =D0=B2=D1=81=D1=91 =D1=83=D0=B6=D0=B5 =D1=81= =D0=B4=D0=B5=D0=BB=D0=B0=D0=BB =D0=B0=D0=BF=D1=81=D1=82=D1=80=D0=B8=D0=BC, > > =D0=B8=D0=BD=D0=BE=D0=B3=D0=B4=D0=B0 =D1=84=D0=B5=D0=B4=D0=BE=D1=80=D0= =B0 (=D1=83 =D0=BD=D0=B8=D1=85 boost 1.50.0 =D0=B2 f18 =D1=83=D0=B6=D0=B5 = =D0=B4=D0=BE=D0=B2=D0=BE=D0=BB=D1=8C=D0=BD=D0=BE =D0=B4=D0=B0=D0=B2=D0=BD= =D0=BE). =D0=95=D1=81=D0=BB=D0=B8 > > =D0=BD=D0=B5=D1=82, =D0=BF=D0=B8=D1=88=D0=B8=D1=82=D0=B5 =D0=BC=D0=BD= =D0=B5, =D0=BF=D0=BE=D0=B4=D0=B3=D0=BE=D1=82=D0=BE=D0=B2=D0=BB=D1=8E =D0=BF= =D0=B0=D1=82=D1=87. > =D0=9F=D1=80=D0=BE=D1=88=D1=83 =D0=BF=D0=BE=D0=BC=D0=BE=D1=87=D1=8C =D1= =81 zarafa. =D0=94=D0=BB=D1=8F =D0=BD=D0=B0=D1=87=D0=B0=D0=BB=D0=B0, On Wed, 5 Sep 2012 08:05:03 +0400 "Ivan A. Melnikov" wrote: [...] > 2. =D0=9D=D0=B0=D0=B9=D0=B4=D0=B8=D1=82=D0=B5, =D0=B3=D0=B4=D0=B5 =D0=BE= =D0=BF=D1=80=D0=B5=D0=B4=D0=B5=D0=BB=D1=91=D0=BD =D1=81=D0=B8=D0=BC=D0=B2= =D0=BE=D0=BB =D0=BF=D1=80=D0=B5=D0=BF=D1=80=D0=BE=D1=86=D0=B5=D1=81=D1=81= =D0=BE=D1=80=D0=B0 > BOOST_FILESYSTEM_VERSION =D0=B2 =D0=B7=D0=BD=D0=B0=D1=87=D0=B5=D0=BD=D0= =B8=D0=B5 2, =D0=B8 =D1=83=D0=B4=D0=B0=D0=BB=D0=B8=D1=82=D0=B5 =D0=B8=D0=BB= =D0=B8 =D0=BF=D0=B5=D1=80=D0=B5=D0=BE=D0=BF=D1=80=D0=B5=D0=B4=D0=B5=D0=BB= =D0=B8=D1=82=D0=B5 =D0=B2 > 3 (=D1=8F =D0=B1=D1=8B =D1=83=D0=B4=D0=B0=D0=BB=D0=B8=D0=BB, =D0=BD=D0=BE= =D0=B4=D0=B5=D0=BB=D0=BE =D0=B2=D0=BA=D1=83=D1=81=D0=B0).=20 [...] =D0=92 =D1=81=D0=BF=D0=B5=D0=BA=D0=B5 =D1=83 =D0=92=D0=B0=D1=81 =D0=B5=D1= =81=D1=82=D1=8C %add_optflags, -DBOOST_FILESYSTEM_VERSION=3D2 =D1=82=D0=B0= =D0=BC =D1=82=D0=B5=D0=BF=D0=B5=D1=80=D1=8C =D0=BB=D0=B8=D1=88=D0=BD=D0=B5=D0=B5. = =D0=95=D1=81=D0=BB=D0=B8 =D0=B5=D0=B3=D0=BE =D1=83=D0=B4=D0=B0=D0=BB=D0=B8= =D1=82=D1=8C, =D0=BE=D1=88=D0=B8=D0=B1=D0=BA=D0=B8 =D1=81=D1=82=D0=B0=D0=BD= =D1=83=D1=82 =D0=B3=D0=BE=D1=80=D0=B0=D0=B7=D0=B4=D0=BE =D0=B2=D0=B5=D1=81= =D0=BB=D0=B5=D0=B5 ;) > =D0=90=D0=BF=D1=81=D1=82=D1=80=D0=B8=D0=BC =D1=81=D1=83=D0=B4=D1=8F =D0= =BF=D0=BE =D0=B3=D0=B8=D1=82=D1=83 =D0=B5=D1=89=D0=B5 =D0=BD=D0=B5 =D1=87= =D0=B5=D1=81=D0=B0=D0=BB=D1=81=D1=8F:=20 > https://git.zarafa.com/zcp/zcp/commits/7.1 [...] =D0=90=D0=BF=D1=81=D1=82=D1=80=D0=B8=D0=BC =D1=87=D0=B5=D1=81=D0=B0=D0=BB= =D1=81=D1=8F =D0=B2 =D0=BC=D0=B0=D1=81=D1=82=D0=B5=D1=80=D0=B5: https://git.zarafa.com/zcp/zcp/commit/c6c79be9cb538fcce3457c9568a3dc6ae3913= 4ea https://git.zarafa.com/zcp/zcp/commit/dc4868099fc3099d1949fbd89ca3c1c318476= 234 =D0=9D=D0=B5=D1=81=D0=BA=D0=BE=D0=BB=D1=8C=D0=BA=D0=BE =D0=B8=D0=BD=D0=BE= =D0=B9 =D0=B2=D0=B0=D1=80=D0=B8=D0=B0=D0=BD=D1=82 =D0=BF=D1=80=D0=B5=D0=B4= =D0=BB=D0=B0=D0=B3=D0=B0=D1=8E=D1=82 =D1=84=D0=B5=D0=B4=D0=BE=D1=80=D0=BE= =D0=B2=D1=86=D1=8B: http://pkgs.fedoraproject.org/cgit/zarafa.git/tree/?h=3Df18 http://pkgs.fedoraproject.org/cgit/zarafa.git/tree/zarafa-7.0.9-boost150.pa= tch?h=3Df18 =D0=92=D0=B0=D1=80=D0=B8=D0=B0=D0=BD=D1=82 =D0=B0=D0=BF=D1=81=D1=82=D1=80= =D0=B8=D0=BC=D0=B0 =D0=B8=D0=BC=D1=85=D0=BE =D0=BB=D1=83=D1=87=D1=88=D0=B5,= =D0=B4=D0=B0 =D0=BA =D1=82=D0=BE=D0=BC=D1=83 =D0=B6=D0=B5 =D1=8D=D1=82=D0= =BE =D0=B0=D0=BF=D1=81=D1=82=D1=80=D0=B8=D0=BC. =D0=AF =D0=BE=D0=B1=D1=8A= =D0=B5=D0=B4=D0=B8=D0=BD=D0=B8=D0=BB =D0=B8=D1=85 =D0=B4=D0=B2=D0=B5 =D1=80=D0=B5=D0=B2=D0=B8=D0=B7=D0=B8=D0=B8 =D0=B2 =D0=BE= =D0=B4=D0=B8=D0=BD =D0=BF=D0=B0=D1=82=D1=87, =D0=B2=D1=8B=D0=BA=D0=B8=D0=BD= =D1=83=D0=BB =D0=BE=D1=82=D1=82=D1=83=D0=B4=D0=B0 =D0=BC=D0=BE=D0=B4=D0=B8= =D1=84=D0=B8=D0=BA=D0=B0=D1=86=D0=B8=D1=8E common/ecversion.h, =D0=BF=D1=80=D0=B8=D0=BB=D0=BE=D0=B6=D0=B8=D0=BB =D0=B8 =D0=BF=D0=BE=D0=BF= =D1=80=D0=B0=D0=B2=D0=B8=D0=BB =D0=B2 =D1=81=D0=BF=D0=B5=D0=BA=D0=B5 add_op= tflags -- =D0=B8 =D1=81=D0=B1=D0=BE=D1=80=D0=BA=D0=B0 =D0=B2=D1=80=D0=BE=D0= =B4=D0=B5 =D0=BF=D1=80=D0=BE=D1=88=D0=BB=D0=B0. =D0=9F=D0=B0=D1=82=D1=87 =D0=BF=D1=80=D0=B8=D0=BB=D0=B0=D0=B3=D0=B0=D1=8E. --=20 WBR, Ivan A. Melnikov --MP_/hq//wXhKT2tVb7KITwoVElh Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=zarafa-7.1.0-boost-filesystem-v3-support.patch This patch combines two upstream revisions from master branch, without modifications of common/ecversion.h. >>From c6c79be9cb538fcce3457c9568a3dc6ae39134ea Mon Sep 17 00:00:00 2001 From: marks Date: Mon, 27 Aug 2012 12:16:44 +0200 Subject: [PATCH] Committing svn revision 36808: For ZCP-10446: Support both v2 and v3 of the boost::filesystem library. #time 1.5h #review +review CR-ZCP @john --- common/ECConfigImpl.cpp | 24 ++++++++--------- common/ecversion.h | 32 +++++++++++----------- configure | 51 +---------------------------------- configure.ac | 32 +---------------------- mapi4linux/src/m4l.mapisvc.cpp | 6 +++- provider/libserver/ECSession.cpp | 3 +- provider/server/ECClientUpdate.cpp | 7 +++-- 7 files changed, 40 insertions(+), 115 deletions(-) --- >>From dc4868099fc3099d1949fbd89ca3c1c318476234 Mon Sep 17 00:00:00 2001 From: marks Date: Tue, 28 Aug 2012 07:58:06 +0200 Subject: [PATCH] Committing svn revision 36820: For ZCP-10446: Add boost_compat.h to Makefile.am. #time 1m +review CR-ZCP-1085 --- common/Makefile.am | 2 +- common/Makefile.in | 2 +- common/boost_compat.h | 87 +++++++++++++++++++++++++++++++++++++++++++++++++ common/ecversion.h | 32 +++++++++--------- 4 files changed, 105 insertions(+), 18 deletions(-) create mode 100644 common/boost_compat.h diff --git a/zarafa/common/ECConfigImpl.cpp b/zarafa/common/ECConfigImpl.cpp index 4ee458f..b5c923f 100644 --- a/zarafa/common/ECConfigImpl.cpp +++ b/zarafa/common/ECConfigImpl.cpp @@ -60,6 +60,8 @@ #include "charset/convert.h" +#include "boost_compat.h" + using namespace std; #ifdef _DEBUG @@ -69,7 +71,6 @@ static char THIS_FILE[] = __FILE__; #endif #include - namespace fs = boost::filesystem; const directive_t ECConfigImpl::s_sDirectives[] = { @@ -351,11 +352,11 @@ bool ECConfigImpl::ReadConfigFile(const path_type &file, unsigned int ulFlags, u m_currentFile = file; if (!exists(file)) { - errors.push_back("Config file '" + file.file_string() + "' does not exist."); + errors.push_back("Config file '" + path_to_string(file) + "' does not exist."); goto exit; } if (is_directory(file)) { - errors.push_back("Config file '" + file.file_string() + "' is a directory."); + errors.push_back("Config file '" + path_to_string(file) + "' is a directory."); goto exit; } @@ -367,8 +368,8 @@ bool ECConfigImpl::ReadConfigFile(const path_type &file, unsigned int ulFlags, u m_readFiles.insert(file); - if(!(fp = fopen(file.file_string().c_str(), "rt"))) { - errors.push_back("Unable to open config file '" + file.file_string() + "'"); + if(!(fp = fopen(path_to_string(file).c_str(), "rt"))) { + errors.push_back("Unable to open config file '" + path_to_string(file) + "'"); goto exit; } @@ -453,9 +454,6 @@ bool ECConfigImpl::HandleDirective(string &strLine, unsigned int ulFlags) } -#if (((BOOST_VERSION / 100) % 1000) < 36) - #define remove_filename remove_leaf -#endif bool ECConfigImpl::HandleInclude(const char *lpszArgs, unsigned int ulFlags) { string strValue; @@ -464,7 +462,7 @@ bool ECConfigImpl::HandleInclude(const char *lpszArgs, unsigned int ulFlags) file = (strValue = trim(lpszArgs, " \t\r\n")); if (!file.is_complete()) { // Rebuild the path - file = m_currentFile.remove_filename(); + file = remove_filename_from_path(m_currentFile); file /= strValue; } @@ -689,8 +687,8 @@ bool ECConfigImpl::WriteSettingsToFile(const char* szFileName) fs::path pathBakFile; pathOutFile = pathBakFile = szFileName; - pathOutFile.remove_filename() /= "config_out.cfg"; - pathBakFile.remove_filename() /= "config_bak.cfg"; + remove_filename_from_path(pathOutFile) /= "config_out.cfg"; + remove_filename_from_path(pathBakFile) /= "config_bak.cfg"; ifstream in(szFileName); @@ -709,7 +707,7 @@ bool ECConfigImpl::WriteSettingsToFile(const char* szFileName) } // open temp output file - ofstream out(pathOutFile.file_string().c_str()); + ofstream out(path_to_string(pathOutFile.string()).c_str()); settingmap_t::iterator iterSettings; const char* szName = NULL; @@ -730,7 +728,7 @@ bool ECConfigImpl::WriteSettingsToFile(const char* szFileName) // the stdio functions does not work in win release mode in some cases remove(szFileName); - rename(pathOutFile.file_string().c_str(),szFileName); + rename(path_to_string(pathOutFile).c_str(),szFileName); return true; } diff --git a/zarafa/common/Makefile.am b/zarafa/common/Makefile.am index d6d74cf..c3bfa3f 100644 --- a/zarafa/common/Makefile.am +++ b/zarafa/common/Makefile.am @@ -22,7 +22,7 @@ libcommon_mapi_la_include_HEADERS = rtfutil.h mapiext.h ECGuid.h ECTags.h ECDefs HtmlToTextParser.h HtmlEntity.h userutil.h ECFeatures.h ECFeatureList.h ECDebugPrint.h ECInterfaceDefs.h \ HrException.h ECIterators.h ECACL.h pthreadutil.h ECThreadPool.h MAPINotifSink.h \ ECDatabaseMySQL.h fileutil.h IStreamAdapter.h IECExchangeModifyTable.h \ - ConsoleTable.h MAPIConsoleTable.h ECFifoStream.h ECMAPIDebug.h \ + ConsoleTable.h MAPIConsoleTable.h ECFifoStream.h ECMAPIDebug.h boost_compat.h \ $(charset_HEADERS) $(utf8_HEADERS) $(ustringutil_HEADERS) $(mapiptr_HEADERS) libcommon_mapi_la_includedir = $(includedir)/zarafa diff --git a/zarafa/common/Makefile.in b/zarafa/common/Makefile.in index e2704d0..3ef28ca 100644 --- a/zarafa/common/Makefile.in +++ b/zarafa/common/Makefile.in @@ -405,7 +405,7 @@ libcommon_mapi_la_include_HEADERS = rtfutil.h mapiext.h ECGuid.h ECTags.h ECDefs HtmlToTextParser.h HtmlEntity.h userutil.h ECFeatures.h ECFeatureList.h ECDebugPrint.h ECInterfaceDefs.h \ HrException.h ECIterators.h ECACL.h pthreadutil.h ECThreadPool.h MAPINotifSink.h \ ECDatabaseMySQL.h fileutil.h IStreamAdapter.h IECExchangeModifyTable.h \ - ConsoleTable.h MAPIConsoleTable.h ECFifoStream.h ECMAPIDebug.h \ + ConsoleTable.h MAPIConsoleTable.h ECFifoStream.h ECMAPIDebug.h boost_compat.h \ $(charset_HEADERS) $(utf8_HEADERS) $(ustringutil_HEADERS) $(mapiptr_HEADERS) libcommon_mapi_la_includedir = $(includedir)/zarafa diff --git a/zarafa/configure b/zarafa/configure index 4d34570..0c1e9af 100755 --- a/zarafa/configure +++ b/zarafa/configure @@ -19613,8 +19613,6 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu fi -# BOOST_BIND -# BOOST_THREADS([mt]) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the toolset name used by Boost for $CXX" >&5 $as_echo_n "checking for the toolset name used by Boost for $CXX... " >&6; } if test "${boost_cv_lib_tag+set}" = set; then : @@ -20414,47 +20412,6 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking boost version compatibility" >&5 -$as_echo_n "checking boost version compatibility... " >&6; } -if test -n "$boost_major_version" -a $boost_major_version -ge 146; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: adding backward compatible flags" >&5 -$as_echo "adding backward compatible flags" >&6; } - BOOST_CPPFLAGS="$BOOSTCPPFLAGS -DBOOST_FILESYSTEM_VERSION=2" - - CXXFLAGS="$CXXFLAGS $BOOST_CPPFLAGS" - LIBS="$BOOST_FILESYSTEM_LIBS $BOOST_SYSTEM_LIBS" - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for boost filesystem version 2 presence" >&5 -$as_echo_n "checking for boost filesystem version 2 presence... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - -#include -namespace bfs = boost::filesystem; -int main() { - bfs::path path; - bfs::directory_iterator pi(path); - pi->path().file_string(); -} - -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } -else - as_fn_error $? "no, boost is too new" "$LINENO" 5 - -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - LIBS=$libs_keep - CFLAGS=$cflags_keep -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } -fi # Check whether --enable-icu was given. if test "${enable_icu+set}" = set; then : @@ -23465,12 +23422,10 @@ Curl libs : $CURL_LIBS Pam libs : $PAM_LIBS Krb5 libs : $KRB5_LIBS TCMalloc lib : $TCMALLOC_LIBS -Boost +Boost : Flags : $BOOST_CPPFLAGS FS ldflags : $BOOST_FILESYSTEM_LDFLAGS FS libs : $BOOST_FILESYSTEM_LIBS -# Thread ldflags : $BOOST_THREAD_LDFLAGS -# Thread libs : $BOOST_THREAD_LIBS ICU libs : $ICU_LIBS Swig : $want_swig Python module : $want_python @@ -23514,12 +23469,10 @@ Curl libs : $CURL_LIBS Pam libs : $PAM_LIBS Krb5 libs : $KRB5_LIBS TCMalloc lib : $TCMALLOC_LIBS -Boost +Boost : Flags : $BOOST_CPPFLAGS FS ldflags : $BOOST_FILESYSTEM_LDFLAGS FS libs : $BOOST_FILESYSTEM_LIBS -# Thread ldflags : $BOOST_THREAD_LDFLAGS -# Thread libs : $BOOST_THREAD_LIBS ICU libs : $ICU_LIBS Swig : $want_swig Python module : $want_python diff --git a/zarafa/configure.ac b/zarafa/configure.ac index 1b1d9ae..e512a93 100644 --- a/zarafa/configure.ac +++ b/zarafa/configure.ac @@ -693,36 +693,8 @@ AC_SUBST(EPOLL_CFLAGS) # Boost BOOST_REQUIRE([1.35]) BOOST_SMART_PTR -# BOOST_BIND -# BOOST_THREADS([mt]) BOOST_FILESYSTEM([mt]) BOOST_DATE_TIME([mt]) -AC_MSG_CHECKING([boost version compatibility]) -if test -n "$boost_major_version" -a $boost_major_version -ge 146; then - AC_MSG_RESULT([adding backward compatible flags]) - BOOST_CPPFLAGS="$BOOSTCPPFLAGS -DBOOST_FILESYSTEM_VERSION=2" - - CXXFLAGS="$CXXFLAGS $BOOST_CPPFLAGS" - LIBS="$BOOST_FILESYSTEM_LIBS $BOOST_SYSTEM_LIBS" - - AC_MSG_CHECKING([for boost filesystem version 2 presence]) - AC_LINK_IFELSE([ - AC_LANG_SOURCE([ -#include -namespace bfs = boost::filesystem; -int main() { - bfs::path path; - bfs::directory_iterator pi(path); - pi->path().file_string(); -} - ]) ], [ AC_MSG_RESULT([ok]) ], [ AC_MSG_ERROR([no, boost is too new]) - ]) - - LIBS=$libs_keep - CFLAGS=$cflags_keep -else - AC_MSG_RESULT([ok]) -fi AC_ARG_ENABLE(icu, AC_HELP_STRING([--enable-icu],[enable icu support]), [want_icu=${enableval}],[want_icu=auto]) if test "$want_icu" = "no"; then @@ -868,12 +840,10 @@ Curl libs : $CURL_LIBS Pam libs : $PAM_LIBS Krb5 libs : $KRB5_LIBS TCMalloc lib : $TCMALLOC_LIBS -Boost +Boost : Flags : $BOOST_CPPFLAGS FS ldflags : $BOOST_FILESYSTEM_LDFLAGS FS libs : $BOOST_FILESYSTEM_LIBS -# Thread ldflags : $BOOST_THREAD_LDFLAGS -# Thread libs : $BOOST_THREAD_LIBS ICU libs : $ICU_LIBS Swig : $want_swig Python module : $want_python diff --git a/zarafa/mapi4linux/src/m4l.mapisvc.cpp b/zarafa/mapi4linux/src/m4l.mapisvc.cpp index 88e8dae..4864c5c 100644 --- a/zarafa/mapi4linux/src/m4l.mapisvc.cpp +++ b/zarafa/mapi4linux/src/m4l.mapisvc.cpp @@ -56,6 +56,7 @@ #include "mapicode.h" #include "mapitags.h" #include "mapiutil.h" +#include "boost_compat.h" #include "Util.h" @@ -64,6 +65,7 @@ #include namespace ba = boost::algorithm; + #include namespace bfs = boost::filesystem; @@ -125,14 +127,14 @@ HRESULT INFLoader::LoadINFs() if (is_directory(inffile->status())) continue; - string strFilename = inffile->path().file_string(); + string strFilename = path_to_string(inffile->path()); string::size_type pos = strFilename.rfind(".inf", strFilename.size(), strlen(".inf")); if (pos == string::npos || strFilename.size() - pos != strlen(".inf")) // silently skip files not ending in pos continue; - hr = LoadINF(inffile->path().file_string().c_str()); + hr = LoadINF(path_to_string(inffile->path()).c_str()); if (hr != hrSuccess) goto exit; } diff --git a/zarafa/provider/libserver/ECSession.cpp b/zarafa/provider/libserver/ECSession.cpp index b48752e..a5598a1 100644 --- a/zarafa/provider/libserver/ECSession.cpp +++ b/zarafa/provider/libserver/ECSession.cpp @@ -84,6 +84,7 @@ #include "pthreadutil.h" #include "threadutil.h" +#include "boost_compat.h" #include namespace bfs = boost::filesystem; @@ -948,7 +949,7 @@ ECRESULT ECAuthSession::ValidateUserCertificate(struct soap *soap, char *lpszNam if (is_directory(key->status())) continue; - lpFileName = key->path().file_string().c_str(); + lpFileName = path_to_string(key->path()).c_str(); biofile = BIO_new_file(lpFileName, "r"); if (!biofile) { diff --git a/zarafa/provider/server/ECClientUpdate.cpp b/zarafa/provider/server/ECClientUpdate.cpp index 9fee168..e22ffd1 100644 --- a/zarafa/provider/server/ECClientUpdate.cpp +++ b/zarafa/provider/server/ECClientUpdate.cpp @@ -69,6 +69,7 @@ namespace ba = boost::algorithm; #include "ECSessionManager.h" #include "ECDatabase.h" #include "ECStatsCollector.h" +#include "boost_compat.h" /* class and add constructor params? */ extern ECRESULT GetBestServerPath(struct soap *soap, ECSession *lpecSession, const std::string &strServerName, std::string *lpstrServerPath); @@ -357,13 +358,13 @@ bool GetLatestVersionAtServer(char *szUpdatePath, unsigned int ulTrackid, Client bfs::directory_iterator update_last; for (bfs::directory_iterator update(updatesdir); update != update_last; update++) { - std::string strFilename = update->path().leaf(); + std::string strFilename = filename_from_path(update->path()); - if (!bfs::is_regular(*update) && !bfs::is_symlink(*update)) { + if (!bfs::is_regular_file(*update) && !bfs::is_symlink(*update)) { continue; } - if (!ba::starts_with(update->path().leaf(), strFileStart)) { + if (!ba::starts_with(strFilename, strFileStart)) { g_lpLogger->Log(EC_LOGLEVEL_DEBUG, "Client update: trackid: 0x%08X, Ignoring file %s for client update", ulTrackid, strFilename.c_str()); continue; } --MP_/hq//wXhKT2tVb7KITwoVElh--