Skip to content

Commit

Permalink
fix build, resolved baidu#2
Browse files Browse the repository at this point in the history
  • Loading branch information
yan97ao committed Jun 4, 2014
1 parent c23a4ee commit c59850b
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/sofa/pbrpc/boost_system_error_code.cc
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ using namespace boost::system::errc;
# endif

//----------------------------------------------------------------------------//
#define WEAK __attribute__((weak))

namespace
{
Expand Down Expand Up @@ -73,12 +72,12 @@ namespace

// generic_error_category implementation ---------------------------------//

WEAK const char * generic_error_category::name() const
const char * generic_error_category::name() const
{
return "generic";
}

WEAK std::string generic_error_category::message( int ev ) const
std::string generic_error_category::message( int ev ) const
{
static std::string unknown_err( "Unknown error" );
// strerror_r is preferred because it is always thread safe,
Expand Down Expand Up @@ -164,12 +163,12 @@ namespace
}
// system_error_category implementation --------------------------------//

WEAK const char * system_error_category::name() const
const char * system_error_category::name() const
{
return "system";
}

WEAK error_condition system_error_category::default_error_condition( int ev ) const
error_condition system_error_category::default_error_condition( int ev ) const
{
switch ( ev )
{
Expand Down Expand Up @@ -350,13 +349,13 @@ namespace

# if !defined( BOOST_WINDOWS_API )

WEAK std::string system_error_category::message( int ev ) const
std::string system_error_category::message( int ev ) const
{
return generic_category().message( ev );
}
# else

WEAK std::string system_error_category::message( int ev ) const
std::string system_error_category::message( int ev ) const
{
# ifndef BOOST_NO_ANSI_APIS
LPVOID lpMsgBuf = 0;
Expand Down

0 comments on commit c59850b

Please sign in to comment.