Boost C++ Libraries: Ticket #9140: Building boost::log's snprintf.hpp in Sun Studio 12.3: some functions aren't defined that are expected https://svn.boost.org/trac10/ticket/9140 <p> I get the following error building with Sun Studio 12.3: </p> <pre class="wiki">"./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. </pre><p> Changes needed are something along the lines of: </p> <pre class="wiki">#if defined( __SUNPRO_CC ) #include &lt;stdio.h&gt; #else #include &lt;cstdio&gt; #endif </pre><p> ... and </p> <pre class="wiki">#if defined( __SUNPRO_CC ) using std::swprintf; using std::vswprintf; #else using ::swprintf; using ::vswprintf; #endif </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/9140 Trac 1.4.3 Andrey Semashev Sat, 21 Sep 2013 07:10:57 GMT <link>https://svn.boost.org/trac10/ticket/9140#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9140#comment:1</guid> <description> <p> The compiler has non-compliant standard headers. This issue can be worked around by <a href="http://www.boost.org/doc/libs/release/libs/compatibility/">Boost.Compatibility</a>. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Andrey Semashev</dc:creator> <pubDate>Sat, 21 Sep 2013 19:37:12 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/9140#comment:2 https://svn.boost.org/trac10/ticket/9140#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Should be fixed in <a class="changeset" href="https://svn.boost.org/trac10/changeset/85810" title="Corrected included headers to fix compilation problems on Solaris.">[85810]</a>. </p> Ticket Brian Vandenberg <phantall+boost@…> Mon, 23 Sep 2013 22:28:24 GMT <link>https://svn.boost.org/trac10/ticket/9140#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9140#comment:3</guid> <description> <p> I just tried the suggested fix and I'm still seeing errors indicating that snprintf / vsnprintf are not defined. </p> </description> <category>Ticket</category> </item> <item> <author>Brian Vandenberg <phantall+boost@…></author> <pubDate>Mon, 23 Sep 2013 22:43:12 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9140#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9140#comment:4</guid> <description> <p> ack. my apologies, I'm experimenting with getting boost::asio to build and have <code></code><code>-D_XOPEN_SOURCE=1</code><code></code> in my command-line args ... there's some odd stuff going on with that. </p> </description> <category>Ticket</category> </item> <item> <author>Brian Vandenberg <phantall+boost@…></author> <pubDate>Tue, 24 Sep 2013 16:05:36 GMT</pubDate> <title>cc set https://svn.boost.org/trac10/ticket/9140#comment:5 https://svn.boost.org/trac10/ticket/9140#comment:5 <ul> <li><strong>cc</strong> <span class="trac-author">phantall+boost@…</span> added </li> </ul> Ticket Andrey Semashev Tue, 24 Sep 2013 18:15:19 GMT <link>https://svn.boost.org/trac10/ticket/9140#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9140#comment:6</guid> <description> <p> So, is the problem fixed eventually? </p> </description> <category>Ticket</category> </item> <item> <author>Brian Vandenberg <phantall+boost@…></author> <pubDate>Tue, 24 Sep 2013 19:30:05 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9140#comment:7 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9140#comment:7</guid> <description> <p> I should've made that more clear. Yes, I applied the changes you made and the problem gets resolved. </p> </description> <category>Ticket</category> </item> </channel> </rss>