Show
Ignore:
Timestamp:
04/06/10 01:23:22 (4 years ago)
Author:
shereef
Message:

fixes for boost <= v1.35, >= v1.37 ... i hope

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • ossiedev/trunk/system/ossie/framework/FileSystem_impl.cpp

    r9924 r9980  
    3535#endif 
    3636 
    37 #if BOOST_VERSION < 103499 
     37#if BOOST_VERSION < 103500 
    3838#  include <boost/filesystem/cerrno.hpp> 
    39 #elif BOOST_VERSION < 103799 
    40 #  include <boost/cerrno.hpp> 
    4139#else 
    42 #  warning "unknown boost version" 
    4340#  include <boost/cerrno.hpp> 
    4441#endif 
     
    120117 
    121118        fs::copy_file(sFile, dFile); 
    122 #if BOOST_VERSION < 103499 
    123119    } catch (const fs::filesystem_error &ex) { 
     120#if BOOST_VERSION < 103400 
     121        if (ex.error() == fs::not_found_error) 
     122#elif BOOST_VERSION < 103500 
    124123        if (ex.system_error() == ENOENT) 
     124#else 
     125        if (ex.code().value() == ENOENT) 
     126#endif 
    125127            throw CF::FileException(CF::CFENOENT, ex.what()); 
    126 #elif BOOST_VERSION < 103799 
    127     } catch (const boost::system::system_error &ex ) { 
    128         if (ex.code().value() == ENOENT) 
    129             throw CF::FileException(CF::CFENOENT, ex.what()); 
    130 #else 
    131     } catch (const boost::system::system_error &ex ) { 
    132         throw CF::FileException(CF::CFENOENT, ex.what()); 
    133 #endif 
    134128    } 
    135129} 
     
    197191        } 
    198192        DEBUG(4, FileSystem, "About to return from list."); 
    199 #if BOOST_VERSION < 103499 
    200193    } catch (const fs::filesystem_error &ex) { 
     194#if BOOST_VERSION < 103400 
     195        DEBUG(9, FileSystem, "Caught exception in list, error_code " << ex.error()); 
     196        if (ex.error() == fs::other_error) 
     197#elif BOOST_VERSION < 103500 
    201198        DEBUG(9, FileSystem, "Caught exception in list, error_code " << ex.system_error()); 
    202  
    203199        if (ex.system_error() == EINVAL) 
    204             throw CF::InvalidFileName(CF::CFEINVAL, ex.what()); 
    205 #elif BOOST_VERSION < 103799 
    206     } catch (const boost::system::system_error &ex) { 
     200#else 
    207201        DEBUG(9, FileSystem, "Caught exception in list, error_code " << ex.code().value()); 
    208202        if (ex.code().value() == EINVAL) 
     203#endif 
    209204            throw CF::InvalidFileName(CF::CFEINVAL, ex.what()); 
    210 #else 
    211     } catch (const boost::system::system_error &ex) { 
    212205        throw CF::FileException(CF::CFNOTSET, ex.what()); 
    213 #endif 
    214206    } 
    215207    DEBUG(4, FileSystem, "Leaving recursiveList")