diff options
Diffstat (limited to 'indra/llcorehttp')
| -rw-r--r-- | indra/llcorehttp/CMakeLists.txt | 26 | ||||
| -rw-r--r-- | indra/llcorehttp/httpcommon.cpp | 9 | ||||
| -rw-r--r-- | indra/llcorehttp/httpcommon.h | 6 | ||||
| -rw-r--r-- | indra/llcorehttp/tests/test_httpstatus.hpp | 2 | 
4 files changed, 23 insertions, 20 deletions
| diff --git a/indra/llcorehttp/CMakeLists.txt b/indra/llcorehttp/CMakeLists.txt index b03ee6eeda..7482fc577f 100644 --- a/indra/llcorehttp/CMakeLists.txt +++ b/indra/llcorehttp/CMakeLists.txt @@ -148,7 +148,7 @@ if (LL_TESTS)  if (DARWIN)    # Path inside the app bundle where we'll need to copy libraries    set(LL_TEST_DESTINATION_DIR -    ${CMAKE_SOURCE_DIR}/../build-darwin-i386/sharedlibs/Resources +    ${CMAKE_BINARY_DIR}/sharedlibs/Resources    )    # Create the Contents/Resources directory @@ -164,21 +164,23 @@ if (DARWIN)    # Copy the required libraries to the package app    add_custom_command(TARGET INTEGRATION_TEST_llcorehttp PRE_BUILD -    COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/../build-darwin-i386/packages/lib/release/libapr-1.0.dylib ${LL_TEST_DESTINATION_DIR} -    DEPENDS ${CMAKE_SOURCE_DIR}/../build-darwin-i386/packages/lib/release/libapr-1.0.dylib +    COMMAND ${CMAKE_COMMAND} -E copy ${AUTOBUILD_INSTALL_DIR}/lib/release/libapr-1.0.dylib ${LL_TEST_DESTINATION_DIR} +    DEPENDS ${AUTOBUILD_INSTALL_DIR}/lib/release/libapr-1.0.dylib    )    add_custom_command(TARGET INTEGRATION_TEST_llcorehttp PRE_BUILD -    COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/../build-darwin-i386/packages/lib/release/libaprutil-1.0.dylib ${LL_TEST_DESTINATION_DIR} -    DEPENDS ${CMAKE_SOURCE_DIR}/../build-darwin-i386/packages/lib/release/libaprutil-1.0.dylib +    COMMAND ${CMAKE_COMMAND} -E copy ${AUTOBUILD_INSTALL_DIR}/lib/release/libaprutil-1.0.dylib ${LL_TEST_DESTINATION_DIR} +    DEPENDS ${AUTOBUILD_INSTALL_DIR}/lib/release/libaprutil-1.0.dylib    )    add_custom_command(TARGET INTEGRATION_TEST_llcorehttp PRE_BUILD -    COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/../build-darwin-i386/packages/lib/release/libexception_handler.dylib ${LL_TEST_DESTINATION_DIR} -    DEPENDS ${CMAKE_SOURCE_DIR}/../build-darwin-i386/packages/lib/release/libexception_handler.dylib -  ) -  add_custom_command(TARGET INTEGRATION_TEST_llcorehttp PRE_BUILD -    COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/../build-darwin-i386/packages/lib/release/libexpat.1.5.2.dylib ${LL_TEST_DESTINATION_DIR} -    DEPENDS ${CMAKE_SOURCE_DIR}/../build-darwin-i386/packages/lib/release/libexpat.1.5.2.dylib +    COMMAND ${CMAKE_COMMAND} -E copy ${AUTOBUILD_INSTALL_DIR}/lib/release/libexception_handler.dylib ${LL_TEST_DESTINATION_DIR} +    DEPENDS ${AUTOBUILD_INSTALL_DIR}/lib/release/libexception_handler.dylib    ) +  foreach(expat ${EXPAT_COPY}) +    add_custom_command(TARGET INTEGRATION_TEST_llcorehttp PRE_BUILD +      COMMAND ${CMAKE_COMMAND} -E copy ${AUTOBUILD_INSTALL_DIR}/lib/release/${expat} ${LL_TEST_DESTINATION_DIR} +      DEPENDS ${AUTOBUILD_INSTALL_DIR}/lib/release/${expat} +    ) +  endforeach(expat)  endif (DARWIN) @@ -214,7 +216,7 @@ endif (DARWIN)      # The following come from LLAddBuildTest.cmake's INTEGRATION_TEST_xxxx target.      set_target_properties(http_texture_load                            PROPERTIES -                          LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:CONSOLE ${TCMALLOC_LINK_FLAGS}" +                          LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:CONSOLE"                            LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMT;LIBCMTD;MSVCRT\" /INCREMENTAL:NO"                            LINK_FLAGS_RELEASE ""                            ) diff --git a/indra/llcorehttp/httpcommon.cpp b/indra/llcorehttp/httpcommon.cpp index c423047bb0..1829062af6 100644 --- a/indra/llcorehttp/httpcommon.cpp +++ b/indra/llcorehttp/httpcommon.cpp @@ -50,11 +50,12 @@ HttpStatus::type_enum_t EXT_CURL_EASY;  HttpStatus::type_enum_t EXT_CURL_MULTI;  HttpStatus::type_enum_t LLCORE; -HttpStatus::operator unsigned long() const +HttpStatus::operator U32() const  { -	static const int shift(sizeof(unsigned long) * 4); +	// Effectively, concatenate mType (high) with mStatus (low). +	static const int shift(sizeof(mDetails->mStatus) * 8); -	unsigned long result(((unsigned long)mDetails->mType) << shift | (unsigned long)(int)mDetails->mStatus); +	U32 result(U32(mDetails->mType) << shift | U32((int)mDetails->mStatus));  	return result;  } @@ -64,7 +65,7 @@ std::string HttpStatus::toHex() const  	std::ostringstream result;  	result.width(8);  	result.fill('0'); -	result << std::hex << operator unsigned long(); +	result << std::hex << operator U32();  	return result.str();  } diff --git a/indra/llcorehttp/httpcommon.h b/indra/llcorehttp/httpcommon.h index b2db01d038..ea0c38abd7 100644 --- a/indra/llcorehttp/httpcommon.h +++ b/indra/llcorehttp/httpcommon.h @@ -382,10 +382,10 @@ struct HttpStatus  	/// creates an ambiguous second path to integer conversion  	/// which tends to find programming errors such as formatting  	/// the status to a stream (operator<<). -	operator unsigned long() const; -	unsigned long toULong() const +	operator U32() const; +	U32 toULong() const  	{ -		return operator unsigned long(); +		return operator U32();  	}  	/// And to convert to a hex string. diff --git a/indra/llcorehttp/tests/test_httpstatus.hpp b/indra/llcorehttp/tests/test_httpstatus.hpp index 4502d32fe1..cbe3f574d4 100644 --- a/indra/llcorehttp/tests/test_httpstatus.hpp +++ b/indra/llcorehttp/tests/test_httpstatus.hpp @@ -244,7 +244,7 @@ void HttpStatusTestObjectType::test<7>()  	HttpStatus status(404);  	std::string msg = status.toHex();  	// std::cout << "Result:  " << msg << std::endl; -	ensure(msg == "01940001"); +	ensure_equals(msg, "01940001");  } | 
