[Boost-bugs] [Boost C++ Libraries] #6161: SunOS: bad putenv declaration

Subject: [Boost-bugs] [Boost C++ Libraries] #6161: SunOS: bad putenv declaration
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-11-22 11:40:54


#6161: SunOS: bad putenv declaration
------------------------------------+---------------------------------------
 Reporter: fguiliani@… | Owner:
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: Building Boost
  Version: Boost 1.48.0 | Severity: Regression
 Keywords: |
------------------------------------+---------------------------------------
 Boost 1.48.0 doesn't compile on SunOS 5.10 with the following error:

 sun.compile.c++ /boost-1.48.0.0/object-optimize/SunOS-5.10-i386/build-
 boost-test/boost/bin.v2/libs/test/build/sun/release/link-static/stdlib-
 sun-stlport/threading-multi/unit_test_parameters.o
 "/usr/include/stdlib.h", line 120: Error: putenv(char*) was declared
 before with a different language.


 The following patch does fix the problem:

 Index: boost/test/utils/runtime/config.hpp
 ===================================================================
 --- boost/test/utils/runtime/config.hpp (revision 182)
 +++ boost/test/utils/runtime/config.hpp (working copy)
 @@ -45,7 +45,9 @@
  #endif

  #ifdef __SUNPRO_CC
 -extern int putenv(char*);
 +extern "C" {
 + extern int putenv(char*);
 +}
  #endif

  namespace boost {

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