diff -rNc D:\src\3rd-parties\boost_1_33_1\libs\program_options/src/options_description.cpp D:\src\3rd-parties\boost_1_33_1.patched\libs\program_options/src/options_description.cpp *** D:\src\3rd-parties\boost_1_33_1\libs\program_options/src/options_description.cpp Wed Jul 13 12:32:40 2005 --- D:\src\3rd-parties\boost_1_33_1.patched\libs\program_options/src/options_description.cpp Sun Feb 12 21:10:30 2006 *************** *** 17,22 **** --- 17,23 ---- #include #include #include + #include #include #include *************** *** 375,382 **** { // find last ' ' in the second half of the current paragraph line string::const_iterator last_space = ! find(reverse_iterator(line_end - 1), ! reverse_iterator(line_begin - 1), ' ') .base(); --- 376,383 ---- { // find last ' ' in the second half of the current paragraph line string::const_iterator last_space = ! find(boost::reverse_iterator(line_end - 1), ! boost::reverse_iterator(line_begin - 1), ' ') .base(); diff -rNc D:\src\3rd-parties\boost_1_33_1\libs\program_options/src/variables_map.cpp D:\src\3rd-parties\boost_1_33_1.patched\libs\program_options/src/variables_map.cpp *** D:\src\3rd-parties\boost_1_33_1\libs\program_options/src/variables_map.cpp Fri May 6 02:40:40 2005 --- D:\src\3rd-parties\boost_1_33_1.patched\libs\program_options/src/variables_map.cpp Sun Feb 12 21:12:47 2006 *************** *** 23,28 **** --- 23,30 ---- void store(const parsed_options& options, variables_map& xm, bool utf8) { + size_t i; + // TODO: what if we have different definition // for the same option name during different calls // 'store'. *************** *** 36,42 **** std::set new_final; // First, convert/store all given options ! for (size_t i = 0; i < options.options.size(); ++i) { const string& name = options.options[i].string_key; // Skip positional options without name --- 38,44 ---- std::set new_final; // First, convert/store all given options ! for (i = 0; i < options.options.size(); ++i) { const string& name = options.options[i].string_key; // Skip positional options without name *************** *** 78,90 **** if (!d.semantic()->is_composing()) new_final.insert(name); } - xm.m_final.insert(new_final.begin(), new_final.end()); // Second, apply default values. const vector >& all = desc.options(); ! for(unsigned i = 0; i < all.size(); ++i) { const option_description& d = *all[i]; string key = d.key(""); --- 80,95 ---- if (!d.semantic()->is_composing()) new_final.insert(name); } + std::set::const_iterator n, n_end = new_final.end(); + for (n = new_final.begin(); n != n_end; n++) { + xm.m_final.insert(*n); + } // Second, apply default values. const vector >& all = desc.options(); ! for(i = 0; i < all.size(); ++i) { const option_description& d = *all[i]; string key = d.key(""); diff -rNc D:\src\3rd-parties\boost_1_33_1\libs\program_options/test/unicode_test.cpp D:\src\3rd-parties\boost_1_33_1.patched\libs\program_options/test/unicode_test.cpp *** D:\src\3rd-parties\boost_1_33_1\libs\program_options/test/unicode_test.cpp Fri Apr 22 09:35:46 2005 --- D:\src\3rd-parties\boost_1_33_1.patched\libs\program_options/test/unicode_test.cpp Sun Feb 12 21:47:36 2006 *************** *** 18,26 **** --- 18,59 ---- #define BOOST_INCLUDE_MAIN // for testing, include rather than link #include + #include + #include + + // does STLport uses native STL for locales? + #if (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) \ + && defined(_STLP_NO_OWN_IOSTREAMS) + // and this native STL lib is old Dinkumware (has not defined _CPPLIB_VER) + # if (defined(_YVALS) && !defined(__IBMCPP__)) || !defined(_CPPLIB_VER) + # define BOOST_PROGRAM_OPTIONS_DETAIL_OLD_DINKUMWARE_BENEATH_STLPORT + # endif + #endif + #include using namespace std; + namespace boost { namespace program_options { namespace detail { + + template + inline std::locale + add_facet(const std::locale &l, Facet * f) { + return + #if defined BOOST_PROGRAM_OPTIONS_DETAIL_OLD_DINKUMWARE_BENEATH_STLPORT + // std namespace used for native locale + std::locale(std::_Addfac(l, f)); + #elif BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1) // old Dinkumware + // std namespace used for native locale + std::locale(std::_Addfac(l, f)); + #else + // standard compatible + std::locale(l, f); + #endif + } + + } } } // end namespaces detail, program_options, boost. + + // Test that unicode input is forwarded to unicode option without // problems. void test_unicode_to_unicode() *************** *** 47,53 **** { std::codecvt* facet = new boost::program_options::detail::utf8_codecvt_facet; ! locale::global(locale(locale(), facet)); options_description desc; --- 80,87 ---- { std::codecvt* facet = new boost::program_options::detail::utf8_codecvt_facet; ! ! locale::global(po::detail::add_facet(locale(), facet)); options_description desc; *************** *** 68,74 **** { std::codecvt* facet = new boost::program_options::detail::utf8_codecvt_facet; ! locale::global(locale(locale(), facet)); options_description desc; --- 102,109 ---- { std::codecvt* facet = new boost::program_options::detail::utf8_codecvt_facet; ! ! locale::global(po::detail::add_facet(locale(), facet)); options_description desc; *************** *** 133,139 **** { std::codecvt* facet = new boost::program_options::detail::utf8_codecvt_facet; ! locale::global(locale(locale(), facet)); options_description desc; --- 168,175 ---- { std::codecvt* facet = new boost::program_options::detail::utf8_codecvt_facet; ! ! locale::global(po::detail::add_facet(locale(), facet)); options_description desc;