Opened 8 years ago
Closed 8 years ago
#10991 closed Bugs (fixed)
cstdint.hpp doesn't work correctly on Solaris.
Reported by: | Owned by: | John Maddock | |
---|---|---|---|
Milestone: | To Be Determined | Component: | config |
Version: | Boost Development Trunk | Severity: | Problem |
Keywords: | Cc: |
Description
Issue: Several tests(over 100) fail when compiling with Oracle Solaris Studio 12.4 compiler on Solaris 11.2. An example is shown below:
CC -compat=5 -library=stlport4 -xO4 -erroff=%none -DBOOST_ALL_NO_LIB=1 -DBOOST_CHRONO_STATIC_LINK=1 -DBOOST_CHRONO_THREAD_DISABLED -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_SYSTEM_STATIC_LINK=1 -DBOOST_TEST_NO_AUTO_LINK=1 -DBOOST_TIMER_STATIC_LINK=1 -DNDEBUG -Dtypeof=typeof -I.. -c -o ./extended_p_square_quantile.o ../libs/accumulators/test/extended_p_square_quantile.cpp
"../boost/random/detail/polynomial.hpp", line 30: Error: uintptr_t is not a member of boost.
"../boost/random/detail/polynomial.hpp", line 33: Error: Type name expected instead of "digit_t".
"../boost/random/detail/polynomial.hpp", line 41: Error: Type name expected instead of "digit_t".
"../boost/random/detail/polynomial.hpp", line 58: Error: Type name expected instead of "digit_t".
"../boost/random/detail/polynomial.hpp", line 76: Error: Type name expected instead of "digit_t".
"../boost/random/detail/polynomial.hpp", line 104: Error: Type name expected instead of "digit_t".
"../boost/random/detail/polynomial.hpp", line 113: Error: Type name expected instead of "digit_t".
"../boost/random/detail/polynomial.hpp", line 121: Error: Type name expected instead of "digit_t".
"../boost/random/detail/polynomial.hpp", line 140: Error: Type name expected instead of "digit_t".
"../boost/random/detail/polynomial.hpp", line 167: Error: A value of type void is not allowed.
"../boost/random/detail/polynomial.hpp", line 167: Error: Unexpected type name "digit_t" encountered.
"../boost/random/detail/polynomial.hpp", line 167: Error: val is not defined.
"../boost/random/detail/polynomial.hpp", line 167: Error: Unexpected type name "std::size_t" encountered.
"../boost/random/detail/polynomial.hpp", line 167: Error: size is not defined.
"../boost/random/detail/polynomial.hpp", line 167: Error: Badly formed expression.
"../boost/random/detail/polynomial.hpp", line 191: Error: A value of type void is not allowed.
"../boost/random/detail/polynomial.hpp", line 191: Error: Unexpected type name "digit_t" encountered.
"../boost/random/detail/polynomial.hpp", line 191: Error: val is not defined.
"../boost/random/detail/polynomial.hpp", line 191: Error: Unexpected type name "std::size_t" encountered.
"../boost/random/detail/polynomial.hpp", line 191: Error: size is not defined.
"../boost/random/detail/polynomial.hpp", line 191: Error: Badly formed expression.
"../boost/random/detail/polynomial.hpp", line 225: Error: Identifier expected instead of "(".
"../boost/random/detail/polynomial.hpp", line 225: Error: In this declaration "(" is of an incomplete type "void".
"../boost/random/detail/polynomial.hpp", line 225: Error: "," expected instead of "(".
"../boost/random/detail/polynomial.hpp", line 240: Error: Unexpected type name "digit_t" encountered.
Compilation aborted, too many Error messages.
Reason: The boost/cstdint.hpp file which defines boost::uintptr_t, does not take into account that on Solaris uintptr_t is defined under /usr/include/sys/int_types.h.
Solution: The following diff resolves the issue.
% diff ./cstdint.hpp ./cstdint.hpp_new
393a394,403
#elif defined(SUNPRO_CC)
#include <sys/int_types.h>
namespace boost {
using ::intptr_t;
using ::uintptr_t;
}
#define BOOST_HAS_INTPTR_T
I believe this is fixed in develop.