[Boost-bugs] [Boost C++ Libraries] #9140: Building boost::log's snprintf.hpp in Sun Studio 12.3: some functions aren't defined that are expected

Subject: [Boost-bugs] [Boost C++ Libraries] #9140: Building boost::log's snprintf.hpp in Sun Studio 12.3: some functions aren't defined that are expected
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-09-20 23:34:24


#9140: Building boost::log's snprintf.hpp in Sun Studio 12.3: some functions
aren't defined that are expected
-------------------------------------------------+---------------------
 Reporter: Brian Vandenberg <phantall+boost@…> | Owner: andysem
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: log
  Version: Boost 1.54.0 | Severity: Problem
 Keywords: |
-------------------------------------------------+---------------------
 I get the following error building with Sun Studio 12.3:

 {{{
 "./boost/log/detail/snprintf.hpp", line 40: snprintf is not defined.
 "./boost/log/detail/snprintf.hpp", line 41: vsnprintf is not defined.
 "./boost/log/detail/snprintf.hpp", line 44: swprintf is not defined.
 "./boost/log/detail/snprintf.hpp", line 45: vswprintf is not defined.
 }}}

 Changes needed are something along the lines of:

 {{{
 #if defined( __SUNPRO_CC )
 #include <stdio.h>
 #else
 #include <cstdio>
 #endif
 }}}

 ... and

 {{{
 #if defined( __SUNPRO_CC )
 using std::swprintf;
 using std::vswprintf;
 #else
 using ::swprintf;
 using ::vswprintf;
 #endif
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9140>
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:14 UTC