Ticket #4688: boost_1_47_0_filesystem_freebsd.patch

File boost_1_47_0_filesystem_freebsd.patch, 2.5 KB (added by anonymous, 11 years ago)

boost filesystem patch to include FreeBSD in the list of BSD platforms (!) that need locale fix

  • libs/filesystem/v2/src/v2_path.cpp

    diff -BbprN --unified=4 boost_1_47_0/libs/filesystem/v2/src/v2_path.cpp boost_1_47_0_ticket4688/libs/filesystem/v2/src/v2_path.cpp
    old new  
    2929#include <boost/system/error_code.hpp>
    3030
    3131#include <cwchar>     // for std::mbstate_t
    3232
    33 #if defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
     33#if defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) || defined(__FreeBSD__)
    3434# include <boost/filesystem/detail/utf8_codecvt_facet.hpp>
    3535#endif
    3636
    3737
    namespace  
    4242  // caught. (A previous version was at namespace scope, so initialization
    4343  // occurred before main(), preventing exceptions from being caught.)
    4444  std::locale & loc()
    4545  {
    46 #if !defined(macintosh) && !defined(__APPLE__) && !defined(__APPLE_CC__)
     46#if !defined(macintosh) && !defined(__APPLE__) && !defined(__APPLE_CC__) && !defined(__FreeBSD__)
    4747    // ISO C calls this "the locale-specific native environment":
    4848    static std::locale lc("");
    4949#else  // Mac OS
    5050    // "All BSD system functions expect their string parameters to be in UTF-8 encoding
  • libs/filesystem/v3/src/path.cpp

    diff -BbprN --unified=4 boost_1_47_0/libs/filesystem/v3/src/path.cpp boost_1_47_0_ticket4688/libs/filesystem/v3/src/path.cpp
    old new  
    3434
    3535#ifdef BOOST_WINDOWS_API
    3636# include "windows_file_codecvt.hpp"
    3737# include <windows.h>
    38 #elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
     38#elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) || defined(__FreeBSD__)
    3939# include <boost/filesystem/detail/utf8_codecvt_facet.hpp>
    4040#endif
    4141
    4242#ifdef BOOST_FILESYSTEM_DEBUG
    namespace  
    733733    std::locale global_loc = std::locale();
    734734    std::locale loc(global_loc, new windows_file_codecvt);
    735735    return loc;
    736736
    737 #   elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
     737#   elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) || defined(__FreeBSD__)
    738738    // "All BSD system functions expect their string parameters to be in UTF-8 encoding
    739739    // and nothing else." See
    740740    // http://developer.apple.com/mac/library/documentation/MacOSX/Conceptual/BPInternational/Articles/FileEncodings.html
    741741    //