Re: [Boost-bugs] [Boost C++ Libraries] #7440: boost::filesystem compile error on solaris 10

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #7440: boost::filesystem compile error on solaris 10
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-06-24 19:09:01


#7440: boost::filesystem compile error on solaris 10
--------------------------------------+------------------------
  Reporter: aleksandar.vukajlovic@… | Owner: bemandawes
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: filesystem
   Version: Boost 1.51.0 | Severity: Problem
Resolution: | Keywords:
--------------------------------------+------------------------

Comment (by anonymous):

 The actual issue is caused by libs/locale/src/util/gregorian.cpp

 {{{
 int first_day_of_week(char const *terr) {
     static char const * const sat[] = {
         "AE","AF","BH","DJ","DZ","EG","ER","ET","IQ","IR",
         "JO","KE","KW","LY","MA","OM","QA","SA","SD","SO",
         "SY","TN","YE"
     };
     // workaround for Sun Solaris !@#%@#$%@#$%234
     #ifdef sun
     #undef sun
     #endif
     static char const * const sun[] = {
         "AR","AS","AZ","BW","CA","CN","FO","GE","GL","GU",
         "HK","IL","IN","JM","JP","KG","KR","LA","MH","MN",
         "MO","MP","MT","NZ","PH","PK","SG","TH","TT","TW",
         "UM","US","UZ","VI","ZW"
     };
     if(strcmp(terr,"MV") == 0)
         return 5; // fri
     if(std::binary_search<char const * const
 *>(sat,sat+sizeof(sat)/(sizeof(sat[0])),terr,comparator))
         return 6; // sat
     if(std::binary_search<char const * const
 *>(sun,sun+sizeof(sun)/(sizeof(sun[0])),terr,comparator))
         return 0; // sun
     // default
     return 1; // mon
 }
 }}}

 ''sun'' has actually been redefined!

 I will attach a patch that fixes this issue (and also adds the additional
 check for ''!__sun'' to perform better detection of Solaris).

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/7440#comment:6>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:13 UTC