From 5b4356cefbaa7dbdc8656e7283c110a893b1a89c Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Sun, 7 Nov 2010 16:55:50 +0100 Subject: IMP-692: SNOW-713: Global objects in libllcommon duplicated in plugins See http://jira.secondlife.com/browse/SNOW-713 This patch makes llcommon shared. It contains the following snowglobe (SVN) changesets: 3478, 3479, 3480, 3481, 3482, 3485, 3496, 3498, 3500, 3519 and 3531, plus the fix for all rejects. Note that changes to scripts/automated_build_scripts/opensrc-build.sh (changesets 3500 and 3625) were ignored as we don't have scripts/automated_build_scripts. --- linden/indra/cmake/00-Common.cmake | 2 +- linden/indra/cmake/APR.cmake | 20 +++--- linden/indra/cmake/CopyWinLibs.cmake | 6 ++ linden/indra/cmake/LLCommon.cmake | 13 +--- linden/indra/develop.py | 8 ++- linden/indra/llcharacter/llcharacter.cpp | 1 + linden/indra/llcommon/CMakeLists.txt | 23 +----- linden/indra/llcommon/imageids.h | 48 ++++++------- linden/indra/llcommon/indra_constants.h | 10 +-- linden/indra/llcommon/linden_common.h | 19 ++--- linden/indra/llcommon/llapp.cpp | 2 +- linden/indra/llcommon/llapp.h | 13 ++-- linden/indra/llcommon/llapr.h | 21 +++--- linden/indra/llcommon/llassettype.h | 2 +- linden/indra/llcommon/llbase32.h | 2 +- linden/indra/llcommon/llbase64.h | 2 +- linden/indra/llcommon/llcommon.h | 2 +- linden/indra/llcommon/llcrc.h | 2 +- linden/indra/llcommon/llcriticaldamp.h | 2 +- linden/indra/llcommon/llcursortypes.h | 2 +- linden/indra/llcommon/lldate.h | 6 +- linden/indra/llcommon/llerror.cpp | 2 + linden/indra/llcommon/llerror.h | 6 +- linden/indra/llcommon/llerrorcontrol.h | 46 ++++++------ linden/indra/llcommon/llerrorthread.cpp | 1 + linden/indra/llcommon/llerrorthread.h | 2 +- linden/indra/llcommon/llevent.h | 10 +-- linden/indra/llcommon/llfasttimer.cpp | 1 + linden/indra/llcommon/llfasttimer.h | 4 +- linden/indra/llcommon/llfile.h | 10 +-- linden/indra/llcommon/llfindlocale.h | 4 +- linden/indra/llcommon/llfixedbuffer.h | 2 +- linden/indra/llcommon/llformat.h | 2 +- linden/indra/llcommon/llframetimer.h | 2 +- linden/indra/llcommon/llheartbeat.h | 2 +- linden/indra/llcommon/llliveappconfig.h | 2 +- linden/indra/llcommon/lllivefile.h | 2 +- linden/indra/llcommon/lllog.h | 2 +- linden/indra/llcommon/llmd5.cpp | 1 + linden/indra/llcommon/llmd5.h | 2 +- linden/indra/llcommon/llmemory.cpp | 13 +++- linden/indra/llcommon/llmemory.h | 10 +-- linden/indra/llcommon/llmemorystream.h | 4 +- linden/indra/llcommon/llmemtype.h | 2 +- linden/indra/llcommon/llmetrics.h | 2 +- linden/indra/llcommon/llmortician.h | 2 +- linden/indra/llcommon/llpreprocessor.h | 62 ++++++++++------ linden/indra/llcommon/llprocesslauncher.h | 2 +- linden/indra/llcommon/llqueuedthread.cpp | 1 + linden/indra/llcommon/llqueuedthread.h | 4 +- linden/indra/llcommon/llrand.h | 12 ++-- linden/indra/llcommon/llrun.h | 6 +- linden/indra/llcommon/llsd.cpp | 12 +++- linden/indra/llcommon/llsd.h | 4 +- linden/indra/llcommon/llsdserialize.h | 18 ++--- linden/indra/llcommon/llsdserialize_xml.cpp | 2 +- linden/indra/llcommon/llsdutil.h | 22 +++--- linden/indra/llcommon/llsecondlifeurls.h | 8 +-- linden/indra/llcommon/llsimplehash.h | 2 +- linden/indra/llcommon/llstat.h | 14 ++-- linden/indra/llcommon/llstreamtools.h | 36 +++++----- linden/indra/llcommon/llstring.h | 83 ++++++++++++---------- linden/indra/llcommon/llstringtable.h | 8 +-- linden/indra/llcommon/llsys.h | 18 ++--- linden/indra/llcommon/llthread.h | 12 ++-- linden/indra/llcommon/lltimer.cpp | 4 +- linden/indra/llcommon/lltimer.h | 29 ++++---- linden/indra/llcommon/lluri.h | 4 +- linden/indra/llcommon/lluuid.h | 9 +-- linden/indra/llcommon/llworkerthread.h | 4 +- linden/indra/llcommon/metaclass.h | 2 +- linden/indra/llcommon/metaproperty.h | 2 +- linden/indra/llcommon/reflective.h | 2 +- linden/indra/llcommon/timing.h | 2 +- linden/indra/llcommon/u64.h | 10 +-- linden/indra/llinventory/llparcel.h | 2 +- linden/indra/llmath/lloctree.h | 6 +- linden/indra/llmath/lltreenode.h | 2 - linden/indra/llmessage/CMakeLists.txt | 4 +- linden/indra/llmessage/llassetstorage.cpp | 12 ++-- linden/indra/llmessage/llassetstorage.h | 6 +- linden/indra/llmessage/llcurl.cpp | 4 +- linden/indra/llmessage/llcurl.h | 2 +- linden/indra/llmessage/llhttpassetstorage.cpp | 2 +- linden/indra/llmessage/llhttpassetstorage.h | 2 + linden/indra/llmessage/llhttpnode.cpp | 18 ++--- linden/indra/llmessage/llhttpnode.h | 10 +-- linden/indra/llmessage/llpumpio.cpp | 1 + .../indra/llmessage/llregionpresenceverifier.cpp | 1 + linden/indra/llmessage/llsdappservices.cpp | 4 +- linden/indra/llmessage/llsdhttpserver.cpp | 4 +- linden/indra/llplugin/CMakeLists.txt | 4 -- linden/indra/llrender/llfontgl.cpp | 1 + linden/indra/llrender/llgl.cpp | 2 - linden/indra/llui/llfunctorregistry.cpp | 1 + linden/indra/llvfs/lldir.cpp | 1 + linden/indra/llvfs/llpidlock.cpp | 3 +- linden/indra/llvfs/llpidlock.h | 2 - linden/indra/llvfs/llvfile.cpp | 1 + linden/indra/llvfs/llvfs.cpp | 1 + linden/indra/llwindow/lldxhardware.cpp | 1 + linden/indra/llwindow/llwindowmacosx.h | 1 + linden/indra/llwindow/llwindowsdl.cpp | 6 +- linden/indra/llwindow/llwindowsdl.h | 2 +- linden/indra/llwindow/llwindowwin32.cpp | 2 + linden/indra/lscript/lscript_execute.h | 1 + .../lscript/lscript_execute/llscriptresource.cpp | 1 + linden/indra/media_plugins/base/CMakeLists.txt | 4 -- linden/indra/media_plugins/example/CMakeLists.txt | 4 -- .../media_plugins/gstreamer010/CMakeLists.txt | 12 ---- .../llmediaimplgstreamertriviallogging.h | 26 +++---- .../gstreamer010/media_plugin_gstreamer010.cpp | 2 +- linden/indra/media_plugins/webkit/CMakeLists.txt | 12 ---- linden/indra/newview/CMakeLists.txt | 14 +++- linden/indra/newview/llagent.cpp | 4 +- linden/indra/newview/llappviewer.h | 2 + linden/indra/newview/llfeaturemanager.cpp | 1 - linden/indra/newview/llfloaterabout.cpp | 1 - linden/indra/newview/llhomelocationresponder.cpp | 5 +- linden/indra/newview/llhomelocationresponder.h | 2 +- linden/indra/newview/llspatialpartition.cpp | 6 +- linden/indra/newview/llviewerassetstorage.h | 1 + linden/indra/newview/llwatchdog.h | 3 +- linden/indra/newview/viewer_manifest.py | 51 ++++++++++++- 124 files changed, 527 insertions(+), 469 deletions(-) (limited to 'linden/indra') diff --git a/linden/indra/cmake/00-Common.cmake b/linden/indra/cmake/00-Common.cmake index 4c04be9..c3aa9ea 100644 --- a/linden/indra/cmake/00-Common.cmake +++ b/linden/indra/cmake/00-Common.cmake @@ -210,7 +210,7 @@ if (LINUX OR DARWIN) set(GCC_WARNINGS "${GCC_WARNINGS} -Werror") endif (NOT GCC_DISABLE_FATAL_WARNINGS) - set(GCC_CXX_WARNINGS "${GCC_WARNINGS} -Wno-reorder -Wno-non-virtual-dtor") + set(GCC_CXX_WARNINGS "${GCC_WARNINGS} -Wno-reorder -Wno-non-virtual-dtor -Woverloaded-virtual") set(CMAKE_C_FLAGS "${GCC_WARNINGS} ${CMAKE_C_FLAGS}") set(CMAKE_CXX_FLAGS "${GCC_CXX_WARNINGS} ${CMAKE_CXX_FLAGS}") diff --git a/linden/indra/cmake/APR.cmake b/linden/indra/cmake/APR.cmake index e9f6411..d1f0898 100644 --- a/linden/indra/cmake/APR.cmake +++ b/linden/indra/cmake/APR.cmake @@ -14,27 +14,27 @@ else (STANDALONE) use_prebuilt_binary(apr_suite) if (WINDOWS) set(APR_LIBRARIES - debug ${ARCH_PREBUILT_DIRS_DEBUG}/apr-1.lib - optimized ${ARCH_PREBUILT_DIRS_RELEASE}/apr-1.lib + debug ${ARCH_PREBUILT_DIRS_DEBUG}/libapr-1.lib + optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libapr-1.lib ) set(APRICONV_LIBRARIES - debug ${ARCH_PREBUILT_DIRS_DEBUG}/apriconv-1.lib - optimized ${ARCH_PREBUILT_DIRS_RELEASE}/apriconv-1.lib + debug ${ARCH_PREBUILT_DIRS_DEBUG}/libapriconv-1.lib + optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libapriconv-1.lib ) # Doesn't need to link with iconv.dll set(APRICONV_LIBRARIES "") set(APRUTIL_LIBRARIES - debug ${ARCH_PREBUILT_DIRS_DEBUG}/aprutil-1.lib ${APRICONV_LIBRARIES} - optimized ${ARCH_PREBUILT_DIRS_RELEASE}/aprutil-1.lib ${APRICONV_LIBRARIES} + debug ${ARCH_PREBUILT_DIRS_DEBUG}/libaprutil-1.lib ${APRICONV_LIBRARIES} + optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libaprutil-1.lib ${APRICONV_LIBRARIES} ) elseif (DARWIN) set(APR_LIBRARIES - debug ${ARCH_PREBUILT_DIRS_DEBUG}/libapr-1.a - optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libapr-1.a + debug ${ARCH_PREBUILT_DIRS_DEBUG}/libapr-1.0.3.7.dylib + optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libapr-1.0.3.7.dylib ) set(APRUTIL_LIBRARIES - debug ${ARCH_PREBUILT_DIRS_DEBUG}/libaprutil-1.a - optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libaprutil-1.a + debug ${ARCH_PREBUILT_DIRS_DEBUG}/libaprutil-1.0.3.8.dylib + optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libaprutil-1.0.3.8.dylib ) set(APRICONV_LIBRARIES iconv) else (WINDOWS) diff --git a/linden/indra/cmake/CopyWinLibs.cmake b/linden/indra/cmake/CopyWinLibs.cmake index a091a31..f584689 100644 --- a/linden/indra/cmake/CopyWinLibs.cmake +++ b/linden/indra/cmake/CopyWinLibs.cmake @@ -29,6 +29,9 @@ set(debug_files openal32.dll openjpegd.dll libhunspell.dll + libapr-1.dll + libaprutil-1.dll + libapriconv-1.dll ) copy_if_different( @@ -209,6 +212,9 @@ set(release_files openal32.dll openjpeg.dll libhunspell.dll + libapr-1.dll + libaprutil-1.dll + libapriconv-1.dll ) copy_if_different( diff --git a/linden/indra/cmake/LLCommon.cmake b/linden/indra/cmake/LLCommon.cmake index 9158e98..410766e 100644 --- a/linden/indra/cmake/LLCommon.cmake +++ b/linden/indra/cmake/LLCommon.cmake @@ -12,15 +12,4 @@ set(LLCOMMON_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ) -# Files that need PIC code (pluginAPI) need to set REQUIRE_PIC on 64bit systems -# this will link against a llcommon built with Position Independent Code -# this is a requirment to link a static library (.a) to a DSO on 64 bit systems - -if(REQUIRE_PIC) - set(LLCOMMON_LIBRARIES llcommonPIC) -else(REQUIRE_PIC) - set(LLCOMMON_LIBRARIES llcommon) -endif(REQUIRE_PIC) - -#force clear the flag, files that need this must explicity set it themselves -set(REQUIRE_PIC 0) \ No newline at end of file +set(LLCOMMON_LIBRARIES llcommon) diff --git a/linden/indra/develop.py b/linden/indra/develop.py index 2ce9f91..e804374 100755 --- a/linden/indra/develop.py +++ b/linden/indra/develop.py @@ -76,6 +76,7 @@ class PlatformSetup(object): build_type = build_types['relwithdebinfo'] standalone = 'OFF' unattended = 'OFF' + universal = 'OFF' project_name = 'Imprudence' distcc = True cmake_opts = [] @@ -404,7 +405,7 @@ class DarwinSetup(UnixSetup): return 'darwin' def arch(self): - if self.unattended == 'ON': + if self.universal == 'ON': return 'universal' else: return UnixSetup.arch(self) @@ -417,10 +418,10 @@ class DarwinSetup(UnixSetup): standalone=self.standalone, unattended=self.unattended, project_name=self.project_name, - universal='', + universal=self.universal, type=self.build_type.upper() ) - if self.unattended == 'ON': + if self.universal == 'ON': args['universal'] = '-DCMAKE_OSX_ARCHITECTURES:STRING=\'i386\'' #if simple: # return 'cmake %(opts)s %(dir)r' % args @@ -696,6 +697,7 @@ Options: --standalone build standalone, without Linden prebuild libraries --unattended build unattended, do not invoke any tools requiring a human response + --universal build a universal binary on Mac OS X (unsupported) -t | --type=NAME build type ("Debug", "Release", or "RelWithDebInfo") -N | --no-distcc disable use of distcc -G | --generator=NAME generator name diff --git a/linden/indra/llcharacter/llcharacter.cpp b/linden/indra/llcharacter/llcharacter.cpp index dcdfe07..46ac326 100644 --- a/linden/indra/llcharacter/llcharacter.cpp +++ b/linden/indra/llcharacter/llcharacter.cpp @@ -38,6 +38,7 @@ #include "llcharacter.h" #include "llstring.h" +#include "llfasttimer.h" #define SKEL_HEADER "Linden Skeleton 1.0" diff --git a/linden/indra/llcommon/CMakeLists.txt b/linden/indra/llcommon/CMakeLists.txt index 7d001ae..5d590a9 100644 --- a/linden/indra/llcommon/CMakeLists.txt +++ b/linden/indra/llcommon/CMakeLists.txt @@ -4,6 +4,7 @@ project(llcommon) include(00-Common) include(LLCommon) +include(Linking) include_directories( ${EXPAT_INCLUDE_DIRS} @@ -192,31 +193,13 @@ set_source_files_properties(${llcommon_HEADER_FILES} list(APPEND llcommon_SOURCE_FILES ${llcommon_HEADER_FILES}) -add_library (llcommon ${llcommon_SOURCE_FILES}) +add_library (llcommon SHARED ${llcommon_SOURCE_FILES}) target_link_libraries( llcommon ${APRUTIL_LIBRARIES} ${APR_LIBRARIES} ${EXPAT_LIBRARIES} ${ZLIB_LIBRARIES} + ${WINDOWS_LIBRARIES} ) -if(HAVE_64_BIT) - add_library (llcommonPIC ${llcommon_SOURCE_FILES}) - add_dependencies(llcommonPIC prepare) - - if(WINDOWS) - add_definitions(/FIXED:NO) - else(WINDOWS) # not windows therefore gcc LINUX and DARWIN - add_definitions(-fPIC) - endif(WINDOWS) - - target_link_libraries( - llcommonPIC - ${APRUTIL_LIBRARIES} - ${APR_LIBRARIES} - ${EXPAT_LIBRARIES} - ${ZLIB_LIBRARIES} - ) -endif(HAVE_64_BIT) - diff --git a/linden/indra/llcommon/imageids.h b/linden/indra/llcommon/imageids.h index 7bae496..dc726dc 100644 --- a/linden/indra/llcommon/imageids.h +++ b/linden/indra/llcommon/imageids.h @@ -41,35 +41,35 @@ class LLUUID; -extern const LLUUID IMG_SMOKE; +LL_COMMON_API extern const LLUUID IMG_SMOKE; -extern const LLUUID IMG_DEFAULT; +LL_COMMON_API extern const LLUUID IMG_DEFAULT; -extern const LLUUID IMG_SUN; -extern const LLUUID IMG_MOON; -extern const LLUUID IMG_CLOUD_POOF; -extern const LLUUID IMG_SHOT; -extern const LLUUID IMG_SPARK; -extern const LLUUID IMG_FIRE; -extern const LLUUID IMG_FACE_SELECT; -extern const LLUUID IMG_DEFAULT_AVATAR; -extern const LLUUID IMG_INVISIBLE; +LL_COMMON_API extern const LLUUID IMG_SUN; +LL_COMMON_API extern const LLUUID IMG_MOON; +LL_COMMON_API extern const LLUUID IMG_CLOUD_POOF; +LL_COMMON_API extern const LLUUID IMG_SHOT; +LL_COMMON_API extern const LLUUID IMG_SPARK; +LL_COMMON_API extern const LLUUID IMG_FIRE; +LL_COMMON_API extern const LLUUID IMG_FACE_SELECT; +LL_COMMON_API extern const LLUUID IMG_DEFAULT_AVATAR; +LL_COMMON_API extern const LLUUID IMG_INVISIBLE; -extern const LLUUID IMG_EXPLOSION; -extern const LLUUID IMG_EXPLOSION_2; -extern const LLUUID IMG_EXPLOSION_3; -extern const LLUUID IMG_EXPLOSION_4; -extern const LLUUID IMG_SMOKE_POOF; +LL_COMMON_API extern const LLUUID IMG_EXPLOSION; +LL_COMMON_API extern const LLUUID IMG_EXPLOSION_2; +LL_COMMON_API extern const LLUUID IMG_EXPLOSION_3; +LL_COMMON_API extern const LLUUID IMG_EXPLOSION_4; +LL_COMMON_API extern const LLUUID IMG_SMOKE_POOF; -extern const LLUUID IMG_BIG_EXPLOSION_1; -extern const LLUUID IMG_BIG_EXPLOSION_2; +LL_COMMON_API extern const LLUUID IMG_BIG_EXPLOSION_1; +LL_COMMON_API extern const LLUUID IMG_BIG_EXPLOSION_2; -extern const LLUUID IMG_BLOOM1; -extern const LLUUID TERRAIN_DIRT_DETAIL; -extern const LLUUID TERRAIN_GRASS_DETAIL; -extern const LLUUID TERRAIN_MOUNTAIN_DETAIL; -extern const LLUUID TERRAIN_ROCK_DETAIL; +LL_COMMON_API extern const LLUUID IMG_BLOOM1; +LL_COMMON_API extern const LLUUID TERRAIN_DIRT_DETAIL; +LL_COMMON_API extern const LLUUID TERRAIN_GRASS_DETAIL; +LL_COMMON_API extern const LLUUID TERRAIN_MOUNTAIN_DETAIL; +LL_COMMON_API extern const LLUUID TERRAIN_ROCK_DETAIL; -extern const LLUUID DEFAULT_WATER_NORMAL; +LL_COMMON_API extern const LLUUID DEFAULT_WATER_NORMAL; #endif diff --git a/linden/indra/llcommon/indra_constants.h b/linden/indra/llcommon/indra_constants.h index 34d1538..279d280 100644 --- a/linden/indra/llcommon/indra_constants.h +++ b/linden/indra/llcommon/indra_constants.h @@ -263,15 +263,15 @@ const U8 GOD_LIKE = 1; const U8 GOD_NOT = 0; // "agent id" for things that should be done to ALL agents -extern const LLUUID LL_UUID_ALL_AGENTS; +LL_COMMON_API extern const LLUUID LL_UUID_ALL_AGENTS; // inventory library owner -extern const LLUUID ALEXANDRIA_LINDEN_ID; +LL_COMMON_API extern const LLUUID ALEXANDRIA_LINDEN_ID; -extern const LLUUID GOVERNOR_LINDEN_ID; -extern const LLUUID REALESTATE_LINDEN_ID; +LL_COMMON_API extern const LLUUID GOVERNOR_LINDEN_ID; +LL_COMMON_API extern const LLUUID REALESTATE_LINDEN_ID; // Maintenance's group id. -extern const LLUUID MAINTENANCE_GROUP_ID; +LL_COMMON_API extern const LLUUID MAINTENANCE_GROUP_ID; // Flags for kick message const U32 KICK_FLAGS_DEFAULT = 0x0; diff --git a/linden/indra/llcommon/linden_common.h b/linden/indra/llcommon/linden_common.h index 25dd629..bf844b9 100644 --- a/linden/indra/llcommon/linden_common.h +++ b/linden/indra/llcommon/linden_common.h @@ -51,16 +51,16 @@ #include #include #include -#include -#include +#include -// Work Microsoft compiler warnings +// Work around Microsoft compiler warnings in STL headers #ifdef LL_WINDOWS #pragma warning (disable : 4702) // unreachable code #pragma warning (disable : 4244) // conversion from time_t to S32 #endif // LL_WINDOWS -#include +// *TODO: Eliminate these, most library .cpp files don't need them. +// Add them to llviewerprecompiledheaders.h if necessary. #include #include #include @@ -76,18 +76,21 @@ #pragma warning (disable : 4512) // assignment operator could not be generated #pragma warning (disable : 4706) // assignment within conditional (even if((x = y)) ) #pragma warning (disable : 4265) // boost 1.36.0, non-virtual destructor in boost::exception_detail::* + +// Reenable warnings we disabled above +#pragma warning (3 : 4702) // unreachable code, we like level 3, not 4 +// moved msvc warnings to llpreprocessor.h *TODO - delete this comment after merge conflicts are unlikely -brad #endif // LL_WINDOWS // Linden only libs in alpha-order other than stdtypes.h +// *NOTE: Please keep includes here to a minimum, see above. #include "stdtypes.h" #include "lldefs.h" #include "llerror.h" #include "llextendedstatus.h" -#include "llfasttimer.h" +// Don't do this, adds 15K lines of header code to every library file. +//#include "llfasttimer.h" #include "llfile.h" #include "llformat.h" -#include "llstring.h" -#include "llsys.h" -#include "lltimer.h" #endif diff --git a/linden/indra/llcommon/llapp.cpp b/linden/indra/llcommon/llapp.cpp index 199315f..e269f59 100644 --- a/linden/indra/llcommon/llapp.cpp +++ b/linden/indra/llcommon/llapp.cpp @@ -420,7 +420,7 @@ void LLApp::incSigChildCount() int LLApp::getPid() { #if LL_WINDOWS - return 0; + return GetCurrentProcessId(); #else return getpid(); #endif diff --git a/linden/indra/llcommon/llapp.h b/linden/indra/llcommon/llapp.h index f8a593c..96112c9 100644 --- a/linden/indra/llcommon/llapp.h +++ b/linden/indra/llcommon/llapp.h @@ -34,14 +34,17 @@ #define LL_LLAPP_H #include -#include "llapr.h" #include "llrun.h" #include "llsd.h" // Forward declarations +template class LLAtomic32; +typedef LLAtomic32 LLAtomicU32; class LLErrorThread; -class LLApp; - +class LLLiveFile; +#if LL_LINUX +typedef struct siginfo siginfo_t; +#endif typedef void (*LLAppErrorHandler)(); typedef void (*LLAppChildCallback)(int pid, bool exited, int status); @@ -62,7 +65,7 @@ public: }; #endif -class LLApp +class LL_COMMON_API LLApp { friend class LLErrorThread; public: @@ -189,8 +192,6 @@ public: #if !LL_WINDOWS static U32 getSigChildCount(); static void incSigChildCount(); -#else -#define getpid GetCurrentProcessId #endif static int getPid(); diff --git a/linden/indra/llcommon/llapr.h b/linden/indra/llcommon/llapr.h index 7f770b0..2aed515 100644 --- a/linden/indra/llcommon/llapr.h +++ b/linden/indra/llcommon/llapr.h @@ -48,25 +48,24 @@ #include "apr_atomic.h" #include "llstring.h" -extern apr_thread_mutex_t* gLogMutexp; -extern apr_thread_mutex_t* gCallStacksLogMutexp; +extern LL_COMMON_API apr_thread_mutex_t* gLogMutexp; /** * @brief initialize the common apr constructs -- apr itself, the * global pool, and a mutex. */ -void ll_init_apr(); +void LL_COMMON_API ll_init_apr(); /** * @brief Cleanup those common apr constructs. */ -void ll_cleanup_apr(); +void LL_COMMON_API ll_cleanup_apr(); // //LL apr_pool //manage apr_pool_t, destroy allocated apr_pool in the destruction function. // -class LLAPRPool +class LL_COMMON_API LLAPRPool { public: LLAPRPool(apr_pool_t *parent = NULL, apr_size_t size = 0, BOOL releasePoolFlag = TRUE) ; @@ -92,7 +91,7 @@ protected: //which clears memory automatically. //so it can not hold static data or data after memory is cleared // -class LLVolatileAPRPool : protected LLAPRPool +class LL_COMMON_API LLVolatileAPRPool : protected LLAPRPool { public: LLVolatileAPRPool(apr_pool_t *parent = NULL, apr_size_t size = 0, BOOL releasePoolFlag = TRUE); @@ -126,7 +125,7 @@ private: * destructor handles the unlock. Instances of this class are * not thread safe. */ -class LLScopedLock : private boost::noncopyable +class LL_COMMON_API LLScopedLock : private boost::noncopyable { public: /** @@ -201,7 +200,7 @@ typedef LLAtomic32 LLAtomicS32; // 2, a global pool. // -class LLAPRFile : boost::noncopyable +class LL_COMMON_API LLAPRFile : boost::noncopyable { // make this non copyable since a copy closes the file private: @@ -257,10 +256,10 @@ public: * APR_SUCCESS. * @return Returns true if status is an error condition. */ -bool ll_apr_warn_status(apr_status_t status); +bool LL_COMMON_API ll_apr_warn_status(apr_status_t status); -void ll_apr_assert_status(apr_status_t status); +void LL_COMMON_API ll_apr_assert_status(apr_status_t status); -extern "C" apr_pool_t* gAPRPoolp; // Global APR memory pool +extern "C" LL_COMMON_API apr_pool_t* gAPRPoolp; // Global APR memory pool #endif // LL_LLAPR_H diff --git a/linden/indra/llcommon/llassettype.h b/linden/indra/llcommon/llassettype.h index 4077b8d..9f611ae 100644 --- a/linden/indra/llcommon/llassettype.h +++ b/linden/indra/llcommon/llassettype.h @@ -37,7 +37,7 @@ #include "stdenums.h" // for EDragAndDropType -class LLAssetType +class LL_COMMON_API LLAssetType { public: enum EType diff --git a/linden/indra/llcommon/llbase32.h b/linden/indra/llcommon/llbase32.h index 63a93e1..47cd893 100644 --- a/linden/indra/llcommon/llbase32.h +++ b/linden/indra/llcommon/llbase32.h @@ -34,7 +34,7 @@ #ifndef LLBASE32_H #define LLBASE32_h -class LLBase32 +class LL_COMMON_API LLBase32 { public: static std::string encode(const U8* input, size_t input_size); diff --git a/linden/indra/llcommon/llbase64.h b/linden/indra/llcommon/llbase64.h index 58414bb..15b27a6 100644 --- a/linden/indra/llcommon/llbase64.h +++ b/linden/indra/llcommon/llbase64.h @@ -34,7 +34,7 @@ #ifndef LLBASE64_H #define LLBASE64_h -class LLBase64 +class LL_COMMON_API LLBase64 { public: static std::string encode(const U8* input, size_t input_size); diff --git a/linden/indra/llcommon/llcommon.h b/linden/indra/llcommon/llcommon.h index 5f77988..851d4ac 100644 --- a/linden/indra/llcommon/llcommon.h +++ b/linden/indra/llcommon/llcommon.h @@ -38,7 +38,7 @@ #include "lltimer.h" #include "llfile.h" -class LLCommon +class LL_COMMON_API LLCommon { public: static void initClass(); diff --git a/linden/indra/llcommon/llcrc.h b/linden/indra/llcommon/llcrc.h index 27fae7d..7436906 100644 --- a/linden/indra/llcommon/llcrc.h +++ b/linden/indra/llcommon/llcrc.h @@ -50,7 +50,7 @@ // llinfos << "File crc: " << crc.getCRC() << llendl; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -class LLCRC +class LL_COMMON_API LLCRC { protected: U32 mCurrent; diff --git a/linden/indra/llcommon/llcriticaldamp.h b/linden/indra/llcommon/llcriticaldamp.h index ad98284..13e37d8 100644 --- a/linden/indra/llcommon/llcriticaldamp.h +++ b/linden/indra/llcommon/llcriticaldamp.h @@ -38,7 +38,7 @@ #include "llframetimer.h" -class LLCriticalDamp +class LL_COMMON_API LLCriticalDamp { public: LLCriticalDamp(); diff --git a/linden/indra/llcommon/llcursortypes.h b/linden/indra/llcommon/llcursortypes.h index bea7035..836ecc3 100644 --- a/linden/indra/llcommon/llcursortypes.h +++ b/linden/indra/llcommon/llcursortypes.h @@ -77,6 +77,6 @@ enum ECursorType { UI_CURSOR_COUNT // Number of elements in this enum (NOT a cursor) }; -ECursorType getCursorFromString(const std::string& cursor_string); +LL_COMMON_API ECursorType getCursorFromString(const std::string& cursor_string); #endif // LL_LLCURSORTYPES_H diff --git a/linden/indra/llcommon/lldate.h b/linden/indra/llcommon/lldate.h index 5e1a491..d27da79 100644 --- a/linden/indra/llcommon/lldate.h +++ b/linden/indra/llcommon/lldate.h @@ -46,7 +46,7 @@ * * The date class represents a point in time after epoch - 1970-01-01. */ -class LLDate +class LL_COMMON_API LLDate { public: /** @@ -153,9 +153,9 @@ private: }; // Helper function to stream out a date -std::ostream& operator<<(std::ostream& s, const LLDate& date); +LL_COMMON_API std::ostream& operator<<(std::ostream& s, const LLDate& date); // Helper function to stream in a date -std::istream& operator>>(std::istream& s, LLDate& date); +LL_COMMON_API std::istream& operator>>(std::istream& s, LLDate& date); #endif // LL_LLDATE_H diff --git a/linden/indra/llcommon/llerror.cpp b/linden/indra/llcommon/llerror.cpp index 30b61a9..edc570f 100644 --- a/linden/indra/llcommon/llerror.cpp +++ b/linden/indra/llcommon/llerror.cpp @@ -58,7 +58,9 @@ #include "llsd.h" #include "llsdserialize.h" #include "llstl.h" +#include "lltimer.h" +extern apr_thread_mutex_t* gCallStacksLogMutexp; namespace { #if !LL_WINDOWS diff --git a/linden/indra/llcommon/llerror.h b/linden/indra/llcommon/llerror.h index 37e922d..5a4c644 100644 --- a/linden/indra/llcommon/llerror.h +++ b/linden/indra/llcommon/llerror.h @@ -131,7 +131,7 @@ namespace LLError class CallSite; - class Log + class LL_COMMON_API Log { public: static bool shouldLog(CallSite&); @@ -140,7 +140,7 @@ namespace LLError static void flush(std::ostringstream*, const CallSite&); }; - class CallSite + class LL_COMMON_API CallSite { // Represents a specific place in the code where a message is logged // This is public because it is used by the macros below. It is not @@ -189,7 +189,7 @@ namespace LLError //LLCallStacks is designed not to be thread-safe. //so try not to use it in multiple parallel threads at same time. //Used in a single thread at a time is fine. - class LLCallStacks + class LL_COMMON_API LLCallStacks { private: static char** sBuffer ; diff --git a/linden/indra/llcommon/llerrorcontrol.h b/linden/indra/llcommon/llerrorcontrol.h index fae7547..54138b2 100644 --- a/linden/indra/llcommon/llerrorcontrol.h +++ b/linden/indra/llcommon/llerrorcontrol.h @@ -52,12 +52,12 @@ class LLSD; namespace LLError { - void initForServer(const std::string& identity); + LL_COMMON_API void initForServer(const std::string& identity); // resets all logging settings to defaults needed by server processes // logs to stderr, syslog, and windows debug log // the identity string is used for in the syslog - void initForApplication(const std::string& dir); + LL_COMMON_API void initForApplication(const std::string& dir); // resets all logging settings to defaults needed by applicaitons // logs to stderr and windows debug log // sets up log configuration from the file logcontrol.xml in dir @@ -68,14 +68,14 @@ namespace LLError Setting a level means log messages at that level or above. */ - void setPrintLocation(bool); - void setDefaultLevel(LLError::ELevel); - void setFunctionLevel(const std::string& function_name, LLError::ELevel); - void setClassLevel(const std::string& class_name, LLError::ELevel); - void setFileLevel(const std::string& file_name, LLError::ELevel); - void setTagLevel(const std::string& file_name, LLError::ELevel); + LL_COMMON_API void setPrintLocation(bool); + LL_COMMON_API void setDefaultLevel(LLError::ELevel); + LL_COMMON_API void setFunctionLevel(const std::string& function_name, LLError::ELevel); + LL_COMMON_API void setClassLevel(const std::string& class_name, LLError::ELevel); + LL_COMMON_API void setFileLevel(const std::string& file_name, LLError::ELevel); + LL_COMMON_API void setTagLevel(const std::string& file_name, LLError::ELevel); - void configure(const LLSD&); + LL_COMMON_API void configure(const LLSD&); // the LLSD can configure all of the settings // usually read automatically from the live errorlog.xml file @@ -85,25 +85,25 @@ namespace LLError */ typedef void(*FatalFunction)(const std::string& message); - void crashAndLoop(const std::string& message); + LL_COMMON_API void crashAndLoop(const std::string& message); // Default fatal funtion: access null pointer and loops forever - void setFatalFunction(FatalFunction); + LL_COMMON_API void setFatalFunction(FatalFunction); // The fatal function will be called when an message of LEVEL_ERROR // is logged. Note: supressing a LEVEL_ERROR message from being logged // (by, for example, setting a class level to LEVEL_NONE), will keep // the that message from causing the fatal funciton to be invoked. typedef std::string (*TimeFunction)(); - std::string utcTime(); + LL_COMMON_API std::string utcTime(); - void setTimeFunction(TimeFunction); + LL_COMMON_API void setTimeFunction(TimeFunction); // The function is use to return the current time, formatted for // display by those error recorders that want the time included. - class Recorder + class LL_COMMON_API Recorder { // An object that handles the actual output or error messages. public: @@ -117,17 +117,17 @@ namespace LLError // included in the text of the message }; - void addRecorder(Recorder*); - void removeRecorder(Recorder*); + LL_COMMON_API void addRecorder(Recorder*); + LL_COMMON_API void removeRecorder(Recorder*); // each error message is passed to each recorder via recordMessage() - void logToFile(const std::string& filename); - void logToFixedBuffer(LLFixedBuffer*); + LL_COMMON_API void logToFile(const std::string& filename); + LL_COMMON_API void logToFixedBuffer(LLFixedBuffer*); // Utilities to add recorders for logging to a file or a fixed buffer // A second call to the same function will remove the logger added // with the first. // Passing the empty string or NULL to just removes any prior. - std::string logFileName(); + LL_COMMON_API std::string logFileName(); // returns name of current logging file, empty string if none @@ -136,11 +136,11 @@ namespace LLError */ class Settings; - Settings* saveAndResetSettings(); - void restoreSettings(Settings *); + LL_COMMON_API Settings* saveAndResetSettings(); + LL_COMMON_API void restoreSettings(Settings *); - std::string abbreviateFile(const std::string& filePath); - int shouldLogCallCount(); + LL_COMMON_API std::string abbreviateFile(const std::string& filePath); + LL_COMMON_API int shouldLogCallCount(); }; diff --git a/linden/indra/llcommon/llerrorthread.cpp b/linden/indra/llcommon/llerrorthread.cpp index 4c779c5..e2b106a 100644 --- a/linden/indra/llcommon/llerrorthread.cpp +++ b/linden/indra/llcommon/llerrorthread.cpp @@ -32,6 +32,7 @@ #include "linden_common.h" #include "llerrorthread.h" #include "llapp.h" +#include "lltimer.h" LLErrorThread::LLErrorThread() : LLThread("Error"), diff --git a/linden/indra/llcommon/llerrorthread.h b/linden/indra/llcommon/llerrorthread.h index f1d6ffc..3121d29 100644 --- a/linden/indra/llcommon/llerrorthread.h +++ b/linden/indra/llcommon/llerrorthread.h @@ -35,7 +35,7 @@ #include "llthread.h" -class LLErrorThread : public LLThread +class LL_COMMON_API LLErrorThread : public LLThread { public: LLErrorThread(); diff --git a/linden/indra/llcommon/llevent.h b/linden/indra/llcommon/llevent.h index 60887a0..6b223a8 100644 --- a/linden/indra/llcommon/llevent.h +++ b/linden/indra/llcommon/llevent.h @@ -44,7 +44,7 @@ class LLEventDispatcher; class LLObservable; // Abstract event. All events derive from LLEvent -class LLEvent : public LLThreadSafeRefCount +class LL_COMMON_API LLEvent : public LLThreadSafeRefCount { protected: virtual ~LLEvent(); @@ -72,7 +72,7 @@ private: }; // Abstract listener. All listeners derive from LLEventListener -class LLEventListener : public LLThreadSafeRefCount +class LL_COMMON_API LLEventListener : public LLThreadSafeRefCount { protected: virtual ~LLEventListener(); @@ -89,7 +89,7 @@ public: }; // A listener which tracks references to it and cleans up when it's deallocated -class LLSimpleListener : public LLEventListener +class LL_COMMON_API LLSimpleListener : public LLEventListener { public: void clearDispatchers(); @@ -114,7 +114,7 @@ struct LLListenerEntry // Base class for a dispatcher - an object which listens // to events being fired and relays them to their // appropriate destinations. -class LLEventDispatcher : public LLThreadSafeRefCount +class LL_COMMON_API LLEventDispatcher : public LLThreadSafeRefCount { protected: virtual ~LLEventDispatcher(); @@ -157,7 +157,7 @@ private: // In order for this class to work properly, it needs // an instance of an LLEventDispatcher to route events to their // listeners. -class LLObservable +class LL_COMMON_API LLObservable { public: // Initialize with the default Dispatcher diff --git a/linden/indra/llcommon/llfasttimer.cpp b/linden/indra/llcommon/llfasttimer.cpp index 4aa23bb..5f091d5 100644 --- a/linden/indra/llcommon/llfasttimer.cpp +++ b/linden/indra/llcommon/llfasttimer.cpp @@ -42,6 +42,7 @@ #include #elif LL_DARWIN #include +#include "lltimer.h" // get_clock_count() #else #error "architecture not supported" #endif diff --git a/linden/indra/llcommon/llfasttimer.h b/linden/indra/llcommon/llfasttimer.h index 8c1cf47..602a2f7 100644 --- a/linden/indra/llcommon/llfasttimer.h +++ b/linden/indra/llcommon/llfasttimer.h @@ -35,9 +35,9 @@ #define FAST_TIMER_ON 1 -U64 get_cpu_clock_count(); +LL_COMMON_API U64 get_cpu_clock_count(); -class LLFastTimer +class LL_COMMON_API LLFastTimer { public: enum EFastTimerType diff --git a/linden/indra/llcommon/llfile.h b/linden/indra/llcommon/llfile.h index c6092f7..ee37605 100644 --- a/linden/indra/llcommon/llfile.h +++ b/linden/indra/llcommon/llfile.h @@ -70,7 +70,7 @@ typedef struct stat llstat; #include "llstring.h" // safe char* -> std::string conversion -class LLFile +class LL_COMMON_API LLFile { public: // All these functions take UTF8 path/filenames. @@ -95,7 +95,7 @@ public: #if USE_LLFILESTREAMS -class llifstream : public std::basic_istream < char , std::char_traits < char > > +class LL_COMMON_API llifstream : public std::basic_istream < char , std::char_traits < char > > { // input stream associated with a C stream public: @@ -136,7 +136,7 @@ private: }; -class llofstream : public std::basic_ostream< char , std::char_traits < char > > +class LL_COMMON_API llofstream : public std::basic_ostream< char , std::char_traits < char > > { public: typedef std::basic_ostream< char , std::char_traits < char > > _Myt; @@ -185,7 +185,7 @@ private: //#define llifstream std::ifstream //#define llofstream std::ofstream -class llifstream : public std::ifstream +class LL_COMMON_API llifstream : public std::ifstream { public: llifstream() : std::ifstream() @@ -203,7 +203,7 @@ public: }; -class llofstream : public std::ofstream +class LL_COMMON_API llofstream : public std::ofstream { public: llofstream() : std::ofstream() diff --git a/linden/indra/llcommon/llfindlocale.h b/linden/indra/llcommon/llfindlocale.h index f17c774..b812a06 100644 --- a/linden/indra/llcommon/llfindlocale.h +++ b/linden/indra/llcommon/llfindlocale.h @@ -59,8 +59,8 @@ typedef enum { /* This allocates/fills in a FL_Locale structure with pointers to strings (which should be treated as static), or NULL for inappropriate / undetected fields. */ -FL_Success FL_FindLocale(FL_Locale **locale, FL_Domain domain); +LL_COMMON_API FL_Success FL_FindLocale(FL_Locale **locale, FL_Domain domain); /* This should be used to free the struct written by FL_FindLocale */ -void FL_FreeLocale(FL_Locale **locale); +LL_COMMON_API void FL_FreeLocale(FL_Locale **locale); #endif /*__findlocale_h_*/ diff --git a/linden/indra/llcommon/llfixedbuffer.h b/linden/indra/llcommon/llfixedbuffer.h index 992a024..51d0701 100644 --- a/linden/indra/llcommon/llfixedbuffer.h +++ b/linden/indra/llcommon/llfixedbuffer.h @@ -41,7 +41,7 @@ // Fixed size buffer for console output and other things. -class LLFixedBuffer +class LL_COMMON_API LLFixedBuffer { public: LLFixedBuffer(const U32 max_lines = 20); diff --git a/linden/indra/llcommon/llformat.h b/linden/indra/llcommon/llformat.h index 44c62d9..ad30d4f 100644 --- a/linden/indra/llcommon/llformat.h +++ b/linden/indra/llcommon/llformat.h @@ -40,6 +40,6 @@ // *NOTE: buffer limited to 1024, (but vsnprintf prevents overrun) // should perhaps be replaced with boost::format. -std::string llformat(const char *fmt, ...); +LL_COMMON_API std::string llformat(const char *fmt, ...); #endif // LL_LLFORMAT_H diff --git a/linden/indra/llcommon/llframetimer.h b/linden/indra/llcommon/llframetimer.h index 8f51272..f4775a9 100644 --- a/linden/indra/llcommon/llframetimer.h +++ b/linden/indra/llcommon/llframetimer.h @@ -43,7 +43,7 @@ #include "lltimer.h" #include "timing.h" -class LLFrameTimer +class LL_COMMON_API LLFrameTimer { public: LLFrameTimer() : mStartTime( sFrameTime ), mExpiry(0), mStarted(TRUE) {} diff --git a/linden/indra/llcommon/llheartbeat.h b/linden/indra/llcommon/llheartbeat.h index fecb5b1..6f70269 100644 --- a/linden/indra/llcommon/llheartbeat.h +++ b/linden/indra/llcommon/llheartbeat.h @@ -40,7 +40,7 @@ // Note: Win32 does not support the heartbeat/smackdown system; // heartbeat-delivery turns into a no-op there. -class LLHeartbeat +class LL_COMMON_API LLHeartbeat { public: // secs_between_heartbeat: after a heartbeat is successfully delivered, diff --git a/linden/indra/llcommon/llliveappconfig.h b/linden/indra/llcommon/llliveappconfig.h index 55d84a4..3251a7c 100644 --- a/linden/indra/llcommon/llliveappconfig.h +++ b/linden/indra/llcommon/llliveappconfig.h @@ -37,7 +37,7 @@ class LLApp; -class LLLiveAppConfig : public LLLiveFile +class LL_COMMON_API LLLiveAppConfig : public LLLiveFile { public: // To use this, instantiate a LLLiveAppConfig object inside your main loop. diff --git a/linden/indra/llcommon/lllivefile.h b/linden/indra/llcommon/lllivefile.h index fddf006..72f16fd 100644 --- a/linden/indra/llcommon/lllivefile.h +++ b/linden/indra/llcommon/lllivefile.h @@ -36,7 +36,7 @@ const F32 configFileRefreshRate = 5.0; // seconds -class LLLiveFile +class LL_COMMON_API LLLiveFile { public: LLLiveFile(const std::string &filename, const F32 refresh_period = 5.f); diff --git a/linden/indra/llcommon/lllog.h b/linden/indra/llcommon/lllog.h index 7ac6c8a..4b6777b 100644 --- a/linden/indra/llcommon/lllog.h +++ b/linden/indra/llcommon/lllog.h @@ -41,7 +41,7 @@ class LLLogImpl; class LLApp; class LLSD; -class LLLog +class LL_COMMON_API LLLog { public: LLLog(LLApp* app); diff --git a/linden/indra/llcommon/llmd5.cpp b/linden/indra/llcommon/llmd5.cpp index 14b4f9f..887979b 100644 --- a/linden/indra/llcommon/llmd5.cpp +++ b/linden/indra/llcommon/llmd5.cpp @@ -83,6 +83,7 @@ documentation and/or software. #include "llmd5.h" #include +#include // how many bytes to grab at a time when checking files const int LLMD5::BLOCK_LEN = 4096; diff --git a/linden/indra/llcommon/llmd5.h b/linden/indra/llcommon/llmd5.h index d8bca03..df9d732 100644 --- a/linden/indra/llcommon/llmd5.h +++ b/linden/indra/llcommon/llmd5.h @@ -80,7 +80,7 @@ const int MD5RAW_BYTES = 16; const int MD5HEX_STR_SIZE = 33; // char hex[MD5HEX_STR_SIZE]; with null const int MD5HEX_STR_BYTES = 32; // message system fixed size -class LLMD5 { +class LL_COMMON_API LLMD5 { // first, some types: typedef unsigned int uint4; // assumes integer is 4 words long typedef unsigned short int uint2; // assumes short integer is 2 words long diff --git a/linden/indra/llcommon/llmemory.cpp b/linden/indra/llcommon/llmemory.cpp index a6de3d2..74004b0 100644 --- a/linden/indra/llcommon/llmemory.cpp +++ b/linden/indra/llcommon/llmemory.cpp @@ -283,6 +283,11 @@ LLRefCount::LLRefCount() : { } +LLRefCount::LLRefCount(const LLRefCount& other) +: mRef(0) +{ +} + LLRefCount::~LLRefCount() { if (mRef != 0) @@ -290,7 +295,13 @@ LLRefCount::~LLRefCount() llerrs << "deleting non-zero reference" << llendl; } } - + +LLRefCount& LLRefCount::operator=(const LLRefCount&) +{ + // do nothing, since ref count is specific to *this* reference + return *this; +} + //---------------------------------------------------------------------------- #if defined(LL_WINDOWS) diff --git a/linden/indra/llcommon/llmemory.h b/linden/indra/llcommon/llmemory.h index b5c0711..9aa4b85 100644 --- a/linden/indra/llcommon/llmemory.h +++ b/linden/indra/llcommon/llmemory.h @@ -45,7 +45,7 @@ const U32 LLREFCOUNT_SENTINEL_VALUE = 0xAAAAAAAA; //---------------------------------------------------------------------------- -class LLMemory +class LL_COMMON_API LLMemory { public: static void initClass(); @@ -68,12 +68,12 @@ private: //---------------------------------------------------------------------------- -class LLRefCount +class LL_COMMON_API LLRefCount { protected: - LLRefCount(const LLRefCount&); // not implemented + LLRefCount(const LLRefCount&); private: - LLRefCount&operator=(const LLRefCount&); // not implemented + LLRefCount&operator=(const LLRefCount&); protected: virtual ~LLRefCount(); // use unref() @@ -467,6 +467,6 @@ private: // Return the resident set size of the current process, in bytes. // Return value is zero if not known. -U64 getCurrentRSS(); +LL_COMMON_API U64 getCurrentRSS(); #endif diff --git a/linden/indra/llcommon/llmemorystream.h b/linden/indra/llcommon/llmemorystream.h index f348632..fa0f5d2 100644 --- a/linden/indra/llcommon/llmemorystream.h +++ b/linden/indra/llcommon/llmemorystream.h @@ -52,7 +52,7 @@ * be careful to always pass in a valid memory location that exists * for at least as long as this streambuf. */ -class LLMemoryStreamBuf : public std::streambuf +class LL_COMMON_API LLMemoryStreamBuf : public std::streambuf { public: LLMemoryStreamBuf(const U8* start, S32 length); @@ -74,7 +74,7 @@ protected: * be careful to always pass in a valid memory location that exists * for at least as long as this streambuf. */ -class LLMemoryStream : public std::istream +class LL_COMMON_API LLMemoryStream : public std::istream { public: LLMemoryStream(const U8* start, S32 length); diff --git a/linden/indra/llcommon/llmemtype.h b/linden/indra/llcommon/llmemtype.h index a9ebc20..d4cc67e 100644 --- a/linden/indra/llcommon/llmemtype.h +++ b/linden/indra/llcommon/llmemtype.h @@ -57,7 +57,7 @@ static void operator delete(void* p) { ll_release(p); } //---------------------------------------------------------------------------- -class LLMemType +class LL_COMMON_API LLMemType { public: // Also update sTypeDesc in llmemory.cpp diff --git a/linden/indra/llcommon/llmetrics.h b/linden/indra/llcommon/llmetrics.h index 1d91e8c..f6f49eb 100644 --- a/linden/indra/llcommon/llmetrics.h +++ b/linden/indra/llcommon/llmetrics.h @@ -38,7 +38,7 @@ class LLMetricsImpl; class LLSD; -class LLMetrics +class LL_COMMON_API LLMetrics { public: LLMetrics(); diff --git a/linden/indra/llcommon/llmortician.h b/linden/indra/llcommon/llmortician.h index 247632f..55a101a 100644 --- a/linden/indra/llcommon/llmortician.h +++ b/linden/indra/llcommon/llmortician.h @@ -35,7 +35,7 @@ #include "stdtypes.h" -class LLMortician +class LL_COMMON_API LLMortician { public: LLMortician() { mIsDead = FALSE; } diff --git a/linden/indra/llcommon/llpreprocessor.h b/linden/indra/llcommon/llpreprocessor.h index 2e4fd47..6886e3a 100644 --- a/linden/indra/llcommon/llpreprocessor.h +++ b/linden/indra/llcommon/llpreprocessor.h @@ -92,47 +92,63 @@ #endif - // Deal with the differeneces on Windows -#if LL_MSVC -namespace snprintf_hack -{ - int snprintf(char *str, size_t size, const char *format, ...); -} - -// #define snprintf safe_snprintf /* Flawfinder: ignore */ -using snprintf_hack::snprintf; -#endif // LL_MSVC - -// Static linking with apr on windows needs to be declared. -#ifdef LL_WINDOWS -#ifndef APR_DECLARE_STATIC -#define APR_DECLARE_STATIC // For APR on Windows -#endif -#ifndef APU_DECLARE_STATIC -#define APU_DECLARE_STATIC // For APR util on Windows -#endif -#endif - #if defined(LL_WINDOWS) #define BOOST_REGEX_NO_LIB 1 #define CURL_STATICLIB 1 #define XML_STATIC #endif // LL_WINDOWS - // Deal with VC6 problems #if LL_MSVC #pragma warning( 3 : 4701 ) // "local variable used without being initialized" Treat this as level 3, not level 4. #pragma warning( 3 : 4702 ) // "unreachable code" Treat this as level 3, not level 4. #pragma warning( 3 : 4189 ) // "local variable initialized but not referenced" Treat this as level 3, not level 4. //#pragma warning( 3 : 4018 ) // "signed/unsigned mismatch" Treat this as level 3, not level 4. +#pragma warning( 3 : 4263 ) // 'function' : member function does not override any base class virtual member function +#pragma warning( 3 : 4264 ) // "'virtual_function' : no override available for virtual member function from base 'class'; function is hidden" #pragma warning( 3 : 4265 ) // "class has virtual functions, but destructor is not virtual" -#pragma warning( disable : 4786 ) // silly MS warning deep inside their include file +//#pragma warning( disable : 4265 ) // boost 1.36.0, non-virtual destructor in boost::exception_detail::* +#pragma warning( 3 : 4266 ) // 'function' : no override available for virtual member function from base 'type'; function is hidden +#pragma warning (disable : 4180) // qualifier applied to function type has no meaning; ignored #pragma warning( disable : 4284 ) // silly MS warning deep inside their include file #pragma warning( disable : 4503 ) // 'decorated name length exceeded, name was truncated'. Does not seem to affect compilation. #pragma warning( disable : 4800 ) // 'BOOL' : forcing value to bool 'true' or 'false' (performance warning) #pragma warning( disable : 4996 ) // warning: deprecated + +// Linker optimization with "extern template" generates these warnings +#pragma warning( disable : 4231 ) // nonstandard extension used : 'extern' before template explicit instantiation +#pragma warning( disable : 4506 ) // no definition for inline function + +// level 4 warnings that we need to disable: +#pragma warning (disable : 4100) // unreferenced formal parameter +#pragma warning (disable : 4127) // conditional expression is constant (e.g. while(1) ) +#pragma warning (disable : 4244) // possible loss of data on conversions +#pragma warning (disable : 4396) // the inline specifier cannot be used when a friend declaration refers to a specialization of a function template +#pragma warning (disable : 4512) // assignment operator could not be generated +#pragma warning (disable : 4706) // assignment within conditional (even if((x = y)) ) + +#pragma warning (disable : 4251) // member needs to have dll-interface to be used by clients of class +#pragma warning (disable : 4275) // non dll-interface class used as base for dll-interface class #endif // LL_MSVC +#if LL_WINDOWS +#define LL_DLLEXPORT __declspec(dllexport) +#define LL_DLLIMPORT __declspec(dllimport) +#elif LL_LINUX +#define LL_DLLEXPORT __attribute__ ((visibility("default"))) +#define LL_DLLIMPORT +#else +#define LL_DLLEXPORT +#define LL_DLLIMPORT +#endif // LL_WINDOWS + +#ifdef llcommon_EXPORTS +// Compiling llcommon (shared) +#define LL_COMMON_API LL_DLLEXPORT +#else // llcommon_EXPORTS +// Using llcommon (shared) +#define LL_COMMON_API LL_DLLIMPORT +#endif // llcommon_EXPORTS + #endif // not LL_LINDEN_PREPROCESSOR_H diff --git a/linden/indra/llcommon/llprocesslauncher.h b/linden/indra/llcommon/llprocesslauncher.h index 9cdb0f6..b72be27 100644 --- a/linden/indra/llcommon/llprocesslauncher.h +++ b/linden/indra/llcommon/llprocesslauncher.h @@ -43,7 +43,7 @@ It also keeps track of whether the process is still running, and can kill it if required. */ -class LLProcessLauncher +class LL_COMMON_API LLProcessLauncher { LOG_CLASS(LLProcessLauncher); public: diff --git a/linden/indra/llcommon/llqueuedthread.cpp b/linden/indra/llcommon/llqueuedthread.cpp index caf4c2a..bee95be 100644 --- a/linden/indra/llcommon/llqueuedthread.cpp +++ b/linden/indra/llcommon/llqueuedthread.cpp @@ -32,6 +32,7 @@ #include "linden_common.h" #include "llqueuedthread.h" #include "llstl.h" +#include "lltimer.h" //============================================================================ diff --git a/linden/indra/llcommon/llqueuedthread.h b/linden/indra/llcommon/llqueuedthread.h index aa7c6e4..e0e0f1b 100644 --- a/linden/indra/llcommon/llqueuedthread.h +++ b/linden/indra/llcommon/llqueuedthread.h @@ -47,7 +47,7 @@ // Note: ~LLQueuedThread is O(N) N=# of queued threads, assumed to be small // It is assumed that LLQueuedThreads are rarely created/destroyed. -class LLQueuedThread : public LLThread +class LL_COMMON_API LLQueuedThread : public LLThread { //------------------------------------------------------------------------ public: @@ -80,7 +80,7 @@ public: //------------------------------------------------------------------------ public: - class QueuedRequest : public LLSimpleHashEntry + class LL_COMMON_API QueuedRequest : public LLSimpleHashEntry { friend class LLQueuedThread; diff --git a/linden/indra/llcommon/llrand.h b/linden/indra/llcommon/llrand.h index d12597b..73ea179 100644 --- a/linden/indra/llcommon/llrand.h +++ b/linden/indra/llcommon/llrand.h @@ -65,32 +65,32 @@ /** *@brief Generate a float from [0, RAND_MAX). */ -S32 ll_rand(); +LL_COMMON_API S32 ll_rand(); /** *@brief Generate a float from [0, val) or (val, 0]. */ -S32 ll_rand(S32 val); +LL_COMMON_API S32 ll_rand(S32 val); /** *@brief Generate a float from [0, 1.0). */ -F32 ll_frand(); +LL_COMMON_API F32 ll_frand(); /** *@brief Generate a float from [0, val) or (val, 0]. */ -F32 ll_frand(F32 val); +LL_COMMON_API F32 ll_frand(F32 val); /** *@brief Generate a double from [0, 1.0). */ -F64 ll_drand(); +LL_COMMON_API F64 ll_drand(); /** *@brief Generate a double from [0, val) or (val, 0]. */ -F64 ll_drand(F64 val); +LL_COMMON_API F64 ll_drand(F64 val); /** * @brief typedefs for good boost lagged fibonacci. diff --git a/linden/indra/llcommon/llrun.h b/linden/indra/llcommon/llrun.h index 77b23d9..0f8d51d 100644 --- a/linden/indra/llcommon/llrun.h +++ b/linden/indra/llcommon/llrun.h @@ -38,6 +38,8 @@ #include #include +#include "llpreprocessor.h" + class LLRunnable; /** @@ -48,7 +50,7 @@ class LLRunnable; * which are scheduled to run on a repeating or one time basis. * @see LLRunnable */ -class LLRunner +class LL_COMMON_API LLRunner { public: /** @@ -149,7 +151,7 @@ protected: * something useful. * @see LLRunner */ -class LLRunnable +class LL_COMMON_API LLRunnable { public: LLRunnable(); diff --git a/linden/indra/llcommon/llsd.cpp b/linden/indra/llcommon/llsd.cpp index 2cc94c2..be40bb6 100644 --- a/linden/indra/llcommon/llsd.cpp +++ b/linden/indra/llcommon/llsd.cpp @@ -75,7 +75,7 @@ protected: ///< This constructor is used for static objects and causes the // suppresses adjusting the debugging counters when they are // finally initialized. - + virtual ~Impl(); bool shared() const { return mUseCount > 1; } @@ -162,6 +162,7 @@ namespace virtual LLSD::Type type() const { return T; } + using LLSD::Impl::assign; virtual void assign(LLSD::Impl*& var, DataRef value) { if (shared()) { @@ -348,6 +349,10 @@ namespace virtual LLSD::Boolean asBoolean() const { return !mData.empty(); } + using LLSD::Impl::get; // Unhiding get(LLSD::Integer) + using LLSD::Impl::erase; // Unhiding erase(LLSD::Integer) + using LLSD::Impl::ref; // Unhiding ref(LLSD::Integer) + virtual bool has(const LLSD::String&) const; virtual LLSD get(const LLSD::String&) const; LLSD& insert(const LLSD::String& k, const LLSD& v); @@ -440,6 +445,11 @@ namespace virtual LLSD::Boolean asBoolean() const { return !mData.empty(); } virtual int size() const; + + using LLSD::Impl::get; // Unhiding get(LLSD::Integer) + using LLSD::Impl::erase; // Unhiding erase(LLSD::Integer) + using LLSD::Impl::ref; // Unhiding ref(LLSD::Integer) + virtual LLSD get(LLSD::Integer) const; void set(LLSD::Integer, const LLSD&); LLSD& insert(LLSD::Integer, const LLSD&); diff --git a/linden/indra/llcommon/llsd.h b/linden/indra/llcommon/llsd.h index d2845a3..552bb57 100644 --- a/linden/indra/llcommon/llsd.h +++ b/linden/indra/llcommon/llsd.h @@ -89,7 +89,7 @@ @nosubgrouping */ -class LLSD +class LL_COMMON_API LLSD { public: LLSD(); ///< initially Undefined @@ -387,7 +387,7 @@ struct llsd_select_string : public std::unary_function } }; -std::ostream& operator<<(std::ostream& s, const LLSD& llsd); +LL_COMMON_API std::ostream& operator<<(std::ostream& s, const LLSD& llsd); /** QUESTIONS & TO DOS - Would Binary be more convenient as usigned char* buffer semantics? diff --git a/linden/indra/llcommon/llsdserialize.h b/linden/indra/llcommon/llsdserialize.h index f7cd91b..a01b6dc 100644 --- a/linden/indra/llcommon/llsdserialize.h +++ b/linden/indra/llcommon/llsdserialize.h @@ -43,7 +43,7 @@ * @class LLSDParser * @brief Abstract base class for LLSD parsers. */ -class LLSDParser : public LLRefCount +class LL_COMMON_API LLSDParser : public LLRefCount { protected: /** @@ -220,7 +220,7 @@ protected: * @class LLSDNotationParser * @brief Parser which handles the original notation format for LLSD. */ -class LLSDNotationParser : public LLSDParser +class LL_COMMON_API LLSDNotationParser : public LLSDParser { protected: /** @@ -293,7 +293,7 @@ private: * @class LLSDXMLParser * @brief Parser which handles XML format LLSD. */ -class LLSDXMLParser : public LLSDParser +class LL_COMMON_API LLSDXMLParser : public LLSDParser { protected: /** @@ -341,7 +341,7 @@ private: * @class LLSDBinaryParser * @brief Parser which handles binary formatted LLSD. */ -class LLSDBinaryParser : public LLSDParser +class LL_COMMON_API LLSDBinaryParser : public LLSDParser { protected: /** @@ -406,7 +406,7 @@ private: * @class LLSDFormatter * @brief Abstract base class for formatting LLSD. */ -class LLSDFormatter : public LLRefCount +class LL_COMMON_API LLSDFormatter : public LLRefCount { protected: /** @@ -478,7 +478,7 @@ protected: * @class LLSDNotationFormatter * @brief Formatter which outputs the original notation format for LLSD. */ -class LLSDNotationFormatter : public LLSDFormatter +class LL_COMMON_API LLSDNotationFormatter : public LLSDFormatter { protected: /** @@ -519,7 +519,7 @@ public: * @class LLSDXMLFormatter * @brief Formatter which outputs the LLSD as XML. */ -class LLSDXMLFormatter : public LLSDFormatter +class LL_COMMON_API LLSDXMLFormatter : public LLSDFormatter { protected: /** @@ -587,7 +587,7 @@ protected: * Map: '{' + 4 byte integer size every(key + value) + '}'
* map keys are serialized as 'k' + 4 byte integer size + string */ -class LLSDBinaryFormatter : public LLSDFormatter +class LL_COMMON_API LLSDBinaryFormatter : public LLSDFormatter { protected: /** @@ -676,7 +676,7 @@ typedef LLSDOStreamer LLSDXMLStreamer; * @class LLSDSerialize * @brief Serializer / deserializer for the various LLSD formats */ -class LLSDSerialize +class LL_COMMON_API LLSDSerialize { public: enum ELLSD_Serialize diff --git a/linden/indra/llcommon/llsdserialize_xml.cpp b/linden/indra/llcommon/llsdserialize_xml.cpp index c12ca35..33206b4 100644 --- a/linden/indra/llcommon/llsdserialize_xml.cpp +++ b/linden/indra/llcommon/llsdserialize_xml.cpp @@ -562,7 +562,7 @@ void LLSDXMLParser::Impl::parsePart(const char* buf, int len) #ifdef XML_PARSER_PERFORMANCE_TESTS -extern U64 totalTime(); +extern LL_COMMON_API U64 totalTime(); U64 readElementTime = 0; U64 startElementTime = 0; U64 endElementTime = 0; diff --git a/linden/indra/llcommon/llsdutil.h b/linden/indra/llcommon/llsdutil.h index b67ad52..4740a30 100644 --- a/linden/indra/llcommon/llsdutil.h +++ b/linden/indra/llcommon/llsdutil.h @@ -68,28 +68,28 @@ LLSD ll_sd_from_color4(const LLColor4& c); LLColor4 ll_color4_from_sd(const LLSD& sd); // U32 -LLSD ll_sd_from_U32(const U32); -U32 ll_U32_from_sd(const LLSD& sd); +LL_COMMON_API LLSD ll_sd_from_U32(const U32); +LL_COMMON_API U32 ll_U32_from_sd(const LLSD& sd); // U64 -LLSD ll_sd_from_U64(const U64); -U64 ll_U64_from_sd(const LLSD& sd); +LL_COMMON_API LLSD ll_sd_from_U64(const U64); +LL_COMMON_API U64 ll_U64_from_sd(const LLSD& sd); // IP Address -LLSD ll_sd_from_ipaddr(const U32); -U32 ll_ipaddr_from_sd(const LLSD& sd); +LL_COMMON_API LLSD ll_sd_from_ipaddr(const U32); +LL_COMMON_API U32 ll_ipaddr_from_sd(const LLSD& sd); // Binary to string -LLSD ll_string_from_binary(const LLSD& sd); +LL_COMMON_API LLSD ll_string_from_binary(const LLSD& sd); //String to binary -LLSD ll_binary_from_string(const LLSD& sd); +LL_COMMON_API LLSD ll_binary_from_string(const LLSD& sd); // Serializes sd to static buffer and returns pointer, useful for gdb debugging. -char* ll_print_sd(const LLSD& sd); +LL_COMMON_API char* ll_print_sd(const LLSD& sd); // Serializes sd to static buffer and returns pointer, using "pretty printing" mode. -char* ll_pretty_print_sd(const LLSD& sd); +LL_COMMON_API char* ll_pretty_print_sd(const LLSD& sd); //compares the structure of an LLSD to a template LLSD and stores the //"valid" values in a 3rd LLSD. Default values @@ -98,7 +98,7 @@ char* ll_pretty_print_sd(const LLSD& sd); //Returns false if the test is of same type but values differ in type //Otherwise, returns true -BOOL compare_llsd_with_template( +LL_COMMON_API BOOL compare_llsd_with_template( const LLSD& llsd_to_test, const LLSD& template_llsd, LLSD& resultant_llsd); diff --git a/linden/indra/llcommon/llsecondlifeurls.h b/linden/indra/llcommon/llsecondlifeurls.h index 9c64b57..e3932d0 100644 --- a/linden/indra/llcommon/llsecondlifeurls.h +++ b/linden/indra/llcommon/llsecondlifeurls.h @@ -34,14 +34,14 @@ #define LL_LLSECONDLIFEURLS_H -extern const std::string AUCTION_URL; +LL_COMMON_API extern const std::string AUCTION_URL; -extern const std::string EVENTS_URL; +LL_COMMON_API extern const std::string EVENTS_URL; // Currency page -extern const std::string BUY_CURRENCY_URL; +LL_COMMON_API extern const std::string BUY_CURRENCY_URL; // Release Notes Redirect URL for Server and Viewer -extern const std::string RELEASE_NOTES_BASE_URL; +LL_COMMON_API extern const std::string RELEASE_NOTES_BASE_URL; #endif diff --git a/linden/indra/llcommon/llsimplehash.h b/linden/indra/llcommon/llsimplehash.h index 0ba2a30..5df93b6 100644 --- a/linden/indra/llcommon/llsimplehash.h +++ b/linden/indra/llcommon/llsimplehash.h @@ -64,7 +64,7 @@ public: }; template -class LLSimpleHash +class LL_COMMON_API LLSimpleHash { public: LLSimpleHash() diff --git a/linden/indra/llcommon/llstat.h b/linden/indra/llcommon/llstat.h index 66521a3..951091b 100644 --- a/linden/indra/llcommon/llstat.h +++ b/linden/indra/llcommon/llstat.h @@ -52,7 +52,7 @@ class LLSD; // amounts of time with very low memory cost. // -class LLStatAccum +class LL_COMMON_API LLStatAccum { protected: LLStatAccum(bool use_frame_timer); @@ -109,7 +109,7 @@ public: F64 mLastSampleValue; }; -class LLStatMeasure : public LLStatAccum +class LL_COMMON_API LLStatMeasure : public LLStatAccum // gathers statistics about things that are measured // ex.: tempature, time dilation { @@ -124,7 +124,7 @@ public: }; -class LLStatRate : public LLStatAccum +class LL_COMMON_API LLStatRate : public LLStatAccum // gathers statistics about things that can be counted over time // ex.: LSL instructions executed, messages sent, simulator frames completed // renders it in terms of rate of thing per second @@ -140,7 +140,7 @@ public: }; -class LLStatTime : public LLStatAccum +class LL_COMMON_API LLStatTime : public LLStatAccum // gathers statistics about time spent in a block of code // measure average duration per second in the block { @@ -171,7 +171,7 @@ private: // Use this class on the stack to record statistics about an area of code -class LLPerfBlock +class LL_COMMON_API LLPerfBlock { public: struct StatEntry @@ -213,7 +213,7 @@ private: // ---------------------------------------------------------------------------- -class LLPerfStats +class LL_COMMON_API LLPerfStats { public: LLPerfStats(const std::string& process_name = "unknown", S32 process_pid = 0); @@ -249,7 +249,7 @@ private: }; // ---------------------------------------------------------------------------- -class LLStat +class LL_COMMON_API LLStat { public: LLStat(const U32 num_bins = 32, BOOL use_frame_timer = FALSE); diff --git a/linden/indra/llcommon/llstreamtools.h b/linden/indra/llcommon/llstreamtools.h index a6dc4d5..371fac5 100644 --- a/linden/indra/llcommon/llstreamtools.h +++ b/linden/indra/llcommon/llstreamtools.h @@ -39,23 +39,23 @@ // unless specifed otherwise these all return input_stream.good() // skips spaces and tabs -bool skip_whitespace(std::istream& input_stream); +LL_COMMON_API bool skip_whitespace(std::istream& input_stream); // skips whitespace and newlines -bool skip_emptyspace(std::istream& input_stream); +LL_COMMON_API bool skip_emptyspace(std::istream& input_stream); // skips emptyspace and lines that start with a # -bool skip_comments_and_emptyspace(std::istream& input_stream); +LL_COMMON_API bool skip_comments_and_emptyspace(std::istream& input_stream); // skips to character after next newline -bool skip_line(std::istream& input_stream); +LL_COMMON_API bool skip_line(std::istream& input_stream); // skips to beginning of next non-emptyspace -bool skip_to_next_word(std::istream& input_stream); +LL_COMMON_API bool skip_to_next_word(std::istream& input_stream); // skips to character after the end of next keyword // a 'keyword' is defined as the first word on a line -bool skip_to_end_of_next_keyword(const char* keyword, std::istream& input_stream); +LL_COMMON_API bool skip_to_end_of_next_keyword(const char* keyword, std::istream& input_stream); // skip_to_start_of_next_keyword() is disabled -- might tickle corruption bug // in windows iostream @@ -65,14 +65,14 @@ bool skip_to_end_of_next_keyword(const char* keyword, std::istream& input_stream // characters are pulled out of input_stream and appended to output_string // returns result of input_stream.good() after characters are pulled -bool get_word(std::string& output_string, std::istream& input_stream); -bool get_line(std::string& output_string, std::istream& input_stream); +LL_COMMON_API bool get_word(std::string& output_string, std::istream& input_stream); +LL_COMMON_API bool get_line(std::string& output_string, std::istream& input_stream); // characters are pulled out of input_stream (up to a max of 'n') // and appended to output_string // returns result of input_stream.good() after characters are pulled -bool get_word(std::string& output_string, std::istream& input_stream, int n); -bool get_line(std::string& output_string, std::istream& input_stream, int n); +LL_COMMON_API bool get_word(std::string& output_string, std::istream& input_stream, int n); +LL_COMMON_API bool get_line(std::string& output_string, std::istream& input_stream, int n); // unget_line() is disabled -- might tickle corruption bug in windows iostream //// backs up the input_stream by line_size + 1 characters @@ -82,28 +82,28 @@ bool get_line(std::string& output_string, std::istream& input_stream, int n); // removes the last char in 'line' if it matches 'c' // returns true if removed last char -bool remove_last_char(char c, std::string& line); +LL_COMMON_API bool remove_last_char(char c, std::string& line); // replaces escaped characters with the correct characters from left to right // "\\" ---> '\\' // "\n" ---> '\n' -void unescape_string(std::string& line); +LL_COMMON_API void unescape_string(std::string& line); // replaces unescaped characters with expanded equivalents from left to right // '\\' ---> "\\" // '\n' ---> "\n" -void escape_string(std::string& line); +LL_COMMON_API void escape_string(std::string& line); // replaces each '\n' character with ' ' -void replace_newlines_with_whitespace(std::string& line); +LL_COMMON_API void replace_newlines_with_whitespace(std::string& line); // erases any double-quote characters in line -void remove_double_quotes(std::string& line); +LL_COMMON_API void remove_double_quotes(std::string& line); // the 'keyword' is defined as the first word on a line // the 'value' is everything after the keyword on the same line // starting at the first non-whitespace and ending right before the newline -void get_keyword_and_value(std::string& keyword, +LL_COMMON_API void get_keyword_and_value(std::string& keyword, std::string& value, const std::string& line); @@ -111,13 +111,13 @@ void get_keyword_and_value(std::string& keyword, // read anymore or until we hit the count. Some istream // implimentations have a max that they will read. // Returns the number of bytes read. -std::streamsize fullread( +LL_COMMON_API std::streamsize fullread( std::istream& istr, char* buf, std::streamsize requested); -std::istream& operator>>(std::istream& str, const char *tocheck); +LL_COMMON_API std::istream& operator>>(std::istream& str, const char *tocheck); #endif diff --git a/linden/indra/llcommon/llstring.h b/linden/indra/llcommon/llstring.h index bab89b1..3f2c8d8 100644 --- a/linden/indra/llcommon/llstring.h +++ b/linden/indra/llcommon/llstring.h @@ -144,7 +144,7 @@ struct char_traits }; #endif -class LLStringOps +class LL_COMMON_API LLStringOps { public: static char toUpper(char elem) { return toupper((unsigned char)elem); } @@ -179,8 +179,8 @@ public: * @brief Return a string constructed from in without crashing if the * pointer is NULL. */ -std::string ll_safe_string(const char* in); -std::string ll_safe_string(const char* in, S32 maxlen); +std::string LL_COMMON_API ll_safe_string(const char* in); +std::string LL_COMMON_API ll_safe_string(const char* in, S32 maxlen); // Allowing assignments from non-strings into format_map_t is apparently @@ -349,7 +349,7 @@ inline std::string chop_tail_copy( * @brief This translates a nybble stored as a hex value from 0-f back * to a nybble in the low order bits of the return byte. */ -U8 hex_as_nybble(char hex); +LL_COMMON_API U8 hex_as_nybble(char hex); /** * @brief read the contents of a file into a string. @@ -360,7 +360,7 @@ U8 hex_as_nybble(char hex); * @param filename The full name of the file to read. * @return Returns true on success. If false, str is unmodified. */ -bool _read_file_into_string(std::string& str, const std::string& filename); +LL_COMMON_API bool _read_file_into_string(std::string& str, const std::string& filename); /** * Unicode support @@ -369,52 +369,52 @@ bool _read_file_into_string(std::string& str, const std::string& filename); // Make the incoming string a utf8 string. Replaces any unknown glyph // with the UNKOWN_CHARACTER. Once any unknown glph is found, the rest // of the data may not be recovered. -std::string rawstr_to_utf8(const std::string& raw); +LL_COMMON_API std::string rawstr_to_utf8(const std::string& raw); // // We should never use UTF16 except when communicating with Win32! // typedef std::basic_string llutf16string; -LLWString utf16str_to_wstring(const llutf16string &utf16str, S32 len); -LLWString utf16str_to_wstring(const llutf16string &utf16str); +LL_COMMON_API LLWString utf16str_to_wstring(const llutf16string &utf16str, S32 len); +LL_COMMON_API LLWString utf16str_to_wstring(const llutf16string &utf16str); -llutf16string wstring_to_utf16str(const LLWString &utf32str, S32 len); -llutf16string wstring_to_utf16str(const LLWString &utf32str); +LL_COMMON_API llutf16string wstring_to_utf16str(const LLWString &utf32str, S32 len); +LL_COMMON_API llutf16string wstring_to_utf16str(const LLWString &utf32str); -llutf16string utf8str_to_utf16str ( const std::string& utf8str, S32 len); -llutf16string utf8str_to_utf16str ( const std::string& utf8str ); +LL_COMMON_API llutf16string utf8str_to_utf16str ( const std::string& utf8str, S32 len); +LL_COMMON_API llutf16string utf8str_to_utf16str ( const std::string& utf8str ); -LLWString utf8str_to_wstring(const std::string &utf8str, S32 len); -LLWString utf8str_to_wstring(const std::string &utf8str); +LL_COMMON_API LLWString utf8str_to_wstring(const std::string &utf8str, S32 len); +LL_COMMON_API LLWString utf8str_to_wstring(const std::string &utf8str); // Same function, better name. JC inline LLWString utf8string_to_wstring(const std::string& utf8_string) { return utf8str_to_wstring(utf8_string); } // -S32 wchar_to_utf8chars(llwchar inchar, char* outchars); +LL_COMMON_API S32 wchar_to_utf8chars(llwchar inchar, char* outchars); -std::string wstring_to_utf8str(const LLWString &utf32str, S32 len); -std::string wstring_to_utf8str(const LLWString &utf32str); +LL_COMMON_API std::string wstring_to_utf8str(const LLWString &utf32str, S32 len); +LL_COMMON_API std::string wstring_to_utf8str(const LLWString &utf32str); -std::string utf16str_to_utf8str(const llutf16string &utf16str, S32 len); -std::string utf16str_to_utf8str(const llutf16string &utf16str); +LL_COMMON_API std::string utf16str_to_utf8str(const llutf16string &utf16str, S32 len); +LL_COMMON_API std::string utf16str_to_utf8str(const llutf16string &utf16str); // Length of this UTF32 string in bytes when transformed to UTF8 -S32 wstring_utf8_length(const LLWString& wstr); +LL_COMMON_API S32 wstring_utf8_length(const LLWString& wstr); // Length in bytes of this wide char in a UTF8 string -S32 wchar_utf8_length(const llwchar wc); +LL_COMMON_API S32 wchar_utf8_length(const llwchar wc); -std::string utf8str_tolower(const std::string& utf8str); +LL_COMMON_API std::string utf8str_tolower(const std::string& utf8str); // Length in llwchar (UTF-32) of the first len units (16 bits) of the given UTF-16 string. -S32 utf16str_wstring_length(const llutf16string &utf16str, S32 len); +LL_COMMON_API S32 utf16str_wstring_length(const llutf16string &utf16str, S32 len); // Length in utf16string (UTF-16) of wlen wchars beginning at woffset. -S32 wstring_utf16_length(const LLWString & wstr, S32 woffset, S32 wlen); +LL_COMMON_API S32 wstring_utf16_length(const LLWString & wstr, S32 woffset, S32 wlen); // Length in wstring (i.e., llwchar count) of a part of a wstring specified by utf16 length (i.e., utf16 units.) -S32 wstring_wstring_length_from_utf16_length(const LLWString & wstr, S32 woffset, S32 utf16_length, BOOL *unaligned = NULL); +LL_COMMON_API S32 wstring_wstring_length_from_utf16_length(const LLWString & wstr, S32 woffset, S32 utf16_length, BOOL *unaligned = NULL); /** * @brief Properly truncate a utf8 string to a maximum byte count. @@ -426,11 +426,11 @@ S32 wstring_wstring_length_from_utf16_length(const LLWString & wstr, S32 woffset * @param max_len The maximum number of bytes in the return value. * @return Returns a valid utf8 string with byte count <= max_len. */ -std::string utf8str_truncate(const std::string& utf8str, const S32 max_len); +LL_COMMON_API std::string utf8str_truncate(const std::string& utf8str, const S32 max_len); -std::string utf8str_trim(const std::string& utf8str); +LL_COMMON_API std::string utf8str_trim(const std::string& utf8str); -S32 utf8str_compare_insensitive( +LL_COMMON_API S32 utf8str_compare_insensitive( const std::string& lhs, const std::string& rhs); @@ -441,17 +441,17 @@ S32 utf8str_compare_insensitive( * @param target_char The wchar to be replaced * @param replace_char The wchar which is written on replace */ -std::string utf8str_substChar( +LL_COMMON_API std::string utf8str_substChar( const std::string& utf8str, const llwchar target_char, const llwchar replace_char); -std::string utf8str_makeASCII(const std::string& utf8str); +LL_COMMON_API std::string utf8str_makeASCII(const std::string& utf8str); // Hack - used for evil notecards. -std::string mbcsstring_makeASCII(const std::string& str); +LL_COMMON_API std::string mbcsstring_makeASCII(const std::string& str); -std::string utf8str_removeCRLF(const std::string& utf8str); +LL_COMMON_API std::string utf8str_removeCRLF(const std::string& utf8str); #if LL_WINDOWS @@ -476,14 +476,21 @@ std::string utf8str_removeCRLF(const std::string& utf8str); * formatted string. * */ -int safe_snprintf(char* str, size_t size, const char* format, ...); + +// Deal with the differeneces on Windows +namespace snprintf_hack +{ + LL_COMMON_API int snprintf(char *str, size_t size, const char *format, ...); +} + +using snprintf_hack::snprintf; /** * @brief Convert a wide string to std::string * * This replaces the unsafe W2A macro from ATL. */ -std::string ll_convert_wide_to_string(const wchar_t* in); +LL_COMMON_API std::string ll_convert_wide_to_string(const wchar_t* in); //@} #endif // LL_WINDOWS @@ -506,7 +513,7 @@ namespace LLStringFn * with zero non-printable characters. * @param The replacement character. use LL_UNKNOWN_CHAR if unsure. */ - void replace_nonprintable_in_ascii( + LL_COMMON_API void replace_nonprintable_in_ascii( std::basic_string& string, char replacement); @@ -520,7 +527,7 @@ namespace LLStringFn * with zero non-printable characters and zero pipe characters. * @param The replacement character. use LL_UNKNOWN_CHAR if unsure. */ - void replace_nonprintable_and_pipe_in_ascii(std::basic_string& str, + LL_COMMON_API void replace_nonprintable_and_pipe_in_ascii(std::basic_string& str, char replacement); @@ -529,7 +536,7 @@ namespace LLStringFn * Returns a copy of the string with those characters removed. * Works with US ASCII and UTF-8 encoded strings. JC */ - std::string strip_invalid_xml(const std::string& input); + LL_COMMON_API std::string strip_invalid_xml(const std::string& input); /** @@ -540,7 +547,7 @@ namespace LLStringFn * with zero non-printable characters. * @param The replacement character. use LL_UNKNOWN_CHAR if unsure. */ - void replace_ascii_controlchars( + LL_COMMON_API void replace_ascii_controlchars( std::basic_string& string, char replacement); } diff --git a/linden/indra/llcommon/llstringtable.h b/linden/indra/llcommon/llstringtable.h index 4492063..b13b016 100644 --- a/linden/indra/llcommon/llstringtable.h +++ b/linden/indra/llcommon/llstringtable.h @@ -56,7 +56,7 @@ const U32 MAX_STRINGS_LENGTH = 256; -class LLStringTableEntry +class LL_COMMON_API LLStringTableEntry { public: LLStringTableEntry(const char *str) @@ -81,7 +81,7 @@ public: S32 mCount; }; -class LLStringTable +class LL_COMMON_API LLStringTable { public: LLStringTable(int tablesize); @@ -115,7 +115,7 @@ public: #endif }; -extern LLStringTable gStringTable; +extern LL_COMMON_API LLStringTable gStringTable; //============================================================================ @@ -125,7 +125,7 @@ extern LLStringTable gStringTable; typedef const std::string* LLStdStringHandle; -class LLStdStringTable +class LL_COMMON_API LLStdStringTable { public: LLStdStringTable(S32 tablesize = 0) diff --git a/linden/indra/llcommon/llsys.h b/linden/indra/llcommon/llsys.h index 03f48ca..d5575b2 100644 --- a/linden/indra/llcommon/llsys.h +++ b/linden/indra/llcommon/llsys.h @@ -45,7 +45,7 @@ #include #include -class LLOSInfo +class LL_COMMON_API LLOSInfo { public: LLOSInfo(); @@ -70,7 +70,7 @@ private: }; -class LLCPUInfo +class LL_COMMON_API LLCPUInfo { public: LLCPUInfo(); @@ -99,7 +99,7 @@ private: // // CLASS LLMemoryInfo -class LLMemoryInfo +class LL_COMMON_API LLMemoryInfo /*! @brief Class to query the memory subsystem @@ -123,15 +123,15 @@ public: }; -std::ostream& operator<<(std::ostream& s, const LLOSInfo& info); -std::ostream& operator<<(std::ostream& s, const LLCPUInfo& info); -std::ostream& operator<<(std::ostream& s, const LLMemoryInfo& info); +LL_COMMON_API std::ostream& operator<<(std::ostream& s, const LLOSInfo& info); +LL_COMMON_API std::ostream& operator<<(std::ostream& s, const LLCPUInfo& info); +LL_COMMON_API std::ostream& operator<<(std::ostream& s, const LLMemoryInfo& info); // gunzip srcfile into dstfile. Returns FALSE on error. -BOOL gunzip_file(const std::string& srcfile, const std::string& dstfile); +LL_COMMON_API BOOL gunzip_file(const std::string& srcfile, const std::string& dstfile); // gzip srcfile into dstfile. Returns FALSE on error. -BOOL gzip_file(const std::string& srcfile, const std::string& dstfile); +LL_COMMON_API BOOL gzip_file(const std::string& srcfile, const std::string& dstfile); -extern LLCPUInfo gSysCPU; +LL_COMMON_API extern LLCPUInfo gSysCPU; #endif // LL_LLSYS_H diff --git a/linden/indra/llcommon/llthread.h b/linden/indra/llcommon/llthread.h index ed76a3b..98d64ef 100644 --- a/linden/indra/llcommon/llthread.h +++ b/linden/indra/llcommon/llthread.h @@ -43,7 +43,7 @@ class LLThread; class LLMutex; class LLCondition; -class LLThread +class LL_COMMON_API LLThread { public: typedef enum e_thread_status @@ -125,7 +125,7 @@ protected: //============================================================================ -class LLMutex +class LL_COMMON_API LLMutex { public: LLMutex(apr_pool_t *apr_poolp); // NULL pool constructs a new pool for the mutex @@ -145,7 +145,7 @@ protected: }; // Actually a condition/mutex pair (since each condition needs to be associated with a mutex). -class LLCondition : public LLMutex +class LL_COMMON_API LLCondition : public LLMutex { public: LLCondition(apr_pool_t *apr_poolp); // Defaults to global pool, could use the thread pool as well. @@ -159,7 +159,7 @@ protected: apr_thread_cond_t *mAPRCondp; }; -class LLMutexLock +class LL_COMMON_API LLMutexLock { public: LLMutexLock(LLMutex* mutex) @@ -192,7 +192,7 @@ void LLThread::unlockData() // see llmemory.h for LLPointer<> definition -class LLThreadSafeRefCount +class LL_COMMON_API LLThreadSafeRefCount { public: static void initThreadSafeRefCount(); // creates sMutex @@ -244,7 +244,7 @@ private: // Simple responder for self destructing callbacks // Pure virtual class -class LLResponder : public LLThreadSafeRefCount +class LL_COMMON_API LLResponder : public LLThreadSafeRefCount { protected: virtual ~LLResponder(); diff --git a/linden/indra/llcommon/lltimer.cpp b/linden/indra/llcommon/lltimer.cpp index fb3e1ef..2d283ec 100644 --- a/linden/indra/llcommon/lltimer.cpp +++ b/linden/indra/llcommon/lltimer.cpp @@ -33,6 +33,7 @@ #include "linden_common.h" #include "lltimer.h" +#include "timing.h" // totalTime prototype. #include "u64.h" @@ -51,9 +52,6 @@ // // Locally used constants // -const U32 SEC_PER_DAY = 86400; -const F64 SEC_TO_MICROSEC = 1000000.f; -const U64 SEC_TO_MICROSEC_U64 = 1000000; const F64 USEC_TO_SEC_F64 = 0.000001; diff --git a/linden/indra/llcommon/lltimer.h b/linden/indra/llcommon/lltimer.h index a653233..8590328 100644 --- a/linden/indra/llcommon/lltimer.h +++ b/linden/indra/llcommon/lltimer.h @@ -39,6 +39,7 @@ #include #include "stdtypes.h" +#include "llpreprocessor.h" #include "lldate.h" #include @@ -54,7 +55,7 @@ const U32 USEC_PER_HOUR = USEC_PER_MIN * MIN_PER_HOUR; const U32 SEC_PER_HOUR = SEC_PER_MIN * MIN_PER_HOUR; const F64 SEC_PER_USEC = 1.0 / (F64) USEC_PER_SEC; -class LLTimer +class LL_COMMON_API LLTimer { public: static LLTimer *sTimer; // global timer @@ -113,17 +114,17 @@ public: // // Various functions for initializing/accessing clock and timing stuff. Don't use these without REALLY knowing how they work. // -U64 get_clock_count(); -F64 calc_clock_frequency(U32 msecs); -void update_clock_frequencies(); +LL_COMMON_API U64 get_clock_count(); +LL_COMMON_API F64 calc_clock_frequency(U32 msecs); +LL_COMMON_API void update_clock_frequencies(); // Sleep for milliseconds -void ms_sleep(U32 ms); -U32 micro_sleep(U64 us, U32 max_yields = 0xFFFFFFFF); +LL_COMMON_API void ms_sleep(U32 ms); +LL_COMMON_API U32 micro_sleep(U64 us, U32 max_yields = 0xFFFFFFFF); // Returns the correct UTC time in seconds, like time(NULL). // Useful on the viewer, which may have its local clock set wrong. -time_t time_corrected(); +LL_COMMON_API time_t time_corrected(); static inline time_t time_min() { @@ -154,25 +155,25 @@ static inline time_t time_max() } // Correction factor used by time_corrected() above. -extern S32 gUTCOffset; +LL_COMMON_API extern S32 gUTCOffset; // Is the current computer (in its current time zone) // observing daylight savings time? -BOOL is_daylight_savings(); +LL_COMMON_API BOOL is_daylight_savings(); // Converts internal "struct tm" time buffer to Pacific Standard/Daylight Time // Usage: // S32 utc_time; // utc_time = time_corrected(); // struct tm* internal_time = utc_to_pacific_time(utc_time, gDaylight); -struct tm* utc_to_pacific_time(time_t utc_time, BOOL pacific_daylight_time); -struct tm* utc_to_offset_time(time_t utc_time, S32 offset, BOOL DST); +LL_COMMON_API struct tm* utc_to_pacific_time(time_t utc_time, BOOL pacific_daylight_time); +LL_COMMON_API struct tm* utc_to_offset_time(time_t utc_time, S32 offset, BOOL DST); -void microsecondsToTimecodeString(U64 current_time, std::string& tcstring); -void secondsToTimecodeString(F32 current_time, std::string& tcstring); +LL_COMMON_API void microsecondsToTimecodeString(U64 current_time, std::string& tcstring); +LL_COMMON_API void secondsToTimecodeString(F32 current_time, std::string& tcstring); // class for scheduling a function to be called at a given frequency (approximate, inprecise) -class LLEventTimer +class LL_COMMON_API LLEventTimer { public: LLEventTimer(F32 period); // period is the amount of time between each call to tick() in seconds diff --git a/linden/indra/llcommon/lluri.h b/linden/indra/llcommon/lluri.h index 156d80b..57bbedf 100644 --- a/linden/indra/llcommon/lluri.h +++ b/linden/indra/llcommon/lluri.h @@ -47,7 +47,7 @@ class LLApp; * See: http://www.ietf.org/rfc/rfc3986.txt * */ -class LLURI +class LL_COMMON_API LLURI { public: LLURI(); @@ -189,6 +189,6 @@ private: }; // this operator required for tut -bool operator!=(const LLURI& first, const LLURI& second); +LL_COMMON_API bool operator!=(const LLURI& first, const LLURI& second); #endif // LL_LLURI_H diff --git a/linden/indra/llcommon/lluuid.h b/linden/indra/llcommon/lluuid.h index 4b32138..c78fb12 100644 --- a/linden/indra/llcommon/lluuid.h +++ b/linden/indra/llcommon/lluuid.h @@ -35,6 +35,7 @@ #include #include #include "stdtypes.h" +#include "llpreprocessor.h" const S32 UUID_BYTES = 16; const S32 UUID_WORDS = 4; @@ -47,7 +48,7 @@ struct uuid_time_t { U32 low; }; -class LLUUID +class LL_COMMON_API LLUUID { public: // @@ -106,8 +107,8 @@ public: LLUUID combine(const LLUUID& other) const; void combine(const LLUUID& other, LLUUID& result) const; - friend std::ostream& operator<<(std::ostream& s, const LLUUID &uuid); - friend std::istream& operator>>(std::istream& s, LLUUID &uuid); + friend LL_COMMON_API std::ostream& operator<<(std::ostream& s, const LLUUID &uuid); + friend LL_COMMON_API std::istream& operator>>(std::istream& s, LLUUID &uuid); void toString(char *out) const; // Does not allocate memory, needs 36 characters (including \0) void toString(std::string& out) const; @@ -323,7 +324,7 @@ typedef std::set uuid_list_t; */ typedef LLUUID LLAssetID; -class LLTransactionID : public LLUUID +class LL_COMMON_API LLTransactionID : public LLUUID { public: LLTransactionID() : LLUUID() { } diff --git a/linden/indra/llcommon/llworkerthread.h b/linden/indra/llcommon/llworkerthread.h index 708d812..33d4c40 100644 --- a/linden/indra/llcommon/llworkerthread.h +++ b/linden/indra/llcommon/llworkerthread.h @@ -50,7 +50,7 @@ class LLWorkerClass; // Note: ~LLWorkerThread is O(N) N=# of worker threads, assumed to be small // It is assumed that LLWorkerThreads are rarely created/destroyed. -class LLWorkerThread : public LLQueuedThread +class LL_COMMON_API LLWorkerThread : public LLQueuedThread { friend class LLWorkerClass; public: @@ -114,7 +114,7 @@ public: // Only one background task can be active at a time (per instance). // i.e. don't call addWork() if haveWork() returns true -class LLWorkerClass +class LL_COMMON_API LLWorkerClass { friend class LLWorkerThread; friend class LLWorkerThread::WorkRequest; diff --git a/linden/indra/llcommon/metaclass.h b/linden/indra/llcommon/metaclass.h index cc10f16..f38bcd2 100644 --- a/linden/indra/llcommon/metaclass.h +++ b/linden/indra/llcommon/metaclass.h @@ -43,7 +43,7 @@ class LLReflective; class LLMetaProperty; class LLMetaMethod; -class LLMetaClass +class LL_COMMON_API LLMetaClass { public: diff --git a/linden/indra/llcommon/metaproperty.h b/linden/indra/llcommon/metaproperty.h index e5ac359..6c016c5 100644 --- a/linden/indra/llcommon/metaproperty.h +++ b/linden/indra/llcommon/metaproperty.h @@ -41,7 +41,7 @@ class LLMetaClass; class LLReflective; -class LLMetaProperty +class LL_COMMON_API LLMetaProperty { public: LLMetaProperty(const std::string& name, const LLMetaClass& object_class); diff --git a/linden/indra/llcommon/reflective.h b/linden/indra/llcommon/reflective.h index e2c18eb..a135376 100644 --- a/linden/indra/llcommon/reflective.h +++ b/linden/indra/llcommon/reflective.h @@ -36,7 +36,7 @@ #define LL_REFLECTIVE_H class LLMetaClass; -class LLReflective +class LL_COMMON_API LLReflective { public: LLReflective(); diff --git a/linden/indra/llcommon/timing.h b/linden/indra/llcommon/timing.h index 2b9f60a..cfc637e 100644 --- a/linden/indra/llcommon/timing.h +++ b/linden/indra/llcommon/timing.h @@ -44,6 +44,6 @@ const U64 SEC_TO_MICROSEC_U64 = 1000000; const U32 SEC_PER_DAY = 86400; // This is just a stub, implementation in lltimer.cpp. This file will be deprecated in the future. -U64 totalTime(); // Returns current system time in microseconds +LL_COMMON_API U64 totalTime(); // Returns current system time in microseconds #endif diff --git a/linden/indra/llcommon/u64.h b/linden/indra/llcommon/u64.h index 09a6b3e..eb51131 100644 --- a/linden/indra/llcommon/u64.h +++ b/linden/indra/llcommon/u64.h @@ -39,14 +39,14 @@ * @param str The string to parse. * @return Returns the first U64 value found in the string or 0 on failure. */ -U64 str_to_U64(const std::string& str); +LL_COMMON_API U64 str_to_U64(const std::string& str); /** * @brief Given a U64 value, return a printable representation. * @param value The U64 to turn into a printable character array. * @return Returns the result string. */ -std::string U64_to_str(U64 value); +LL_COMMON_API std::string U64_to_str(U64 value); /** * @brief Given a U64 value, return a printable representation. @@ -65,16 +65,16 @@ std::string U64_to_str(U64 value); * @param result_size The size of the buffer allocated. Use U64_BUF. * @return Returns the result pointer. */ -char* U64_to_str(U64 value, char* result, S32 result_size); +LL_COMMON_API char* U64_to_str(U64 value, char* result, S32 result_size); /** * @brief Convert a U64 to the closest F64 value. */ -F64 U64_to_F64(const U64 value); +LL_COMMON_API F64 U64_to_F64(const U64 value); /** * @brief Helper function to wrap strtoull() which is not available on windows. */ -U64 llstrtou64(const char* str, char** end, S32 base); +LL_COMMON_API U64 llstrtou64(const char* str, char** end, S32 base); #endif diff --git a/linden/indra/llinventory/llparcel.h b/linden/indra/llinventory/llparcel.h index 47571d0..8faa673 100644 --- a/linden/indra/llinventory/llparcel.h +++ b/linden/indra/llinventory/llparcel.h @@ -39,7 +39,7 @@ #include "llparcelflags.h" #include "llpermissions.h" #include "v3math.h" - +#include "lltimer.h" // Grid out of which parcels taken is stepped every 4 meters. const F32 PARCEL_GRID_STEP_METERS = 4.f; diff --git a/linden/indra/llmath/lloctree.h b/linden/indra/llmath/lloctree.h index bced84c..2029554 100644 --- a/linden/indra/llmath/lloctree.h +++ b/linden/indra/llmath/lloctree.h @@ -68,8 +68,7 @@ template class LLOctreeTraveler : public LLTreeTraveler { public: - virtual void traverse(const LLTreeNode* node); - virtual void visit(const LLTreeNode* state) { } + virtual void traverse(const LLOctreeNode* node); virtual void visit(const LLOctreeNode* branch) = 0; }; @@ -705,9 +704,8 @@ public: // LLOctreeTraveler //======================== template -void LLOctreeTraveler::traverse(const LLTreeNode* tree_node) +void LLOctreeTraveler::traverse(const LLOctreeNode* node) { - const LLOctreeNode* node = (const LLOctreeNode*) tree_node; node->accept(this); for (U32 i = 0; i < node->getChildCount(); i++) { diff --git a/linden/indra/llmath/lltreenode.h b/linden/indra/llmath/lltreenode.h index ee98362..ccbeda5 100644 --- a/linden/indra/llmath/lltreenode.h +++ b/linden/indra/llmath/lltreenode.h @@ -82,8 +82,6 @@ class LLTreeTraveler { public: virtual ~LLTreeTraveler() { }; - virtual void traverse(const LLTreeNode* node) = 0; - virtual void visit(const LLTreeNode* node) = 0; }; template diff --git a/linden/indra/llmessage/CMakeLists.txt b/linden/indra/llmessage/CMakeLists.txt index 4723281..a5e4249 100644 --- a/linden/indra/llmessage/CMakeLists.txt +++ b/linden/indra/llmessage/CMakeLists.txt @@ -218,7 +218,7 @@ IF (NOT LINUX AND VIEWER) # These can not be found when we try to run the tests, so we had to disable them, for the viewer build. # TODO: Can someone with viewer knowledge figure out how to make these find the correct so. #ADD_BUILD_TEST(llhttpclientadapter llmessage) - ADD_BUILD_TEST(lltrustedmessageservice llmessage) - ADD_BUILD_TEST(lltemplatemessagedispatcher llmessage) + #ADD_BUILD_TEST(lltrustedmessageservice llmessage) + #ADD_BUILD_TEST(lltemplatemessagedispatcher llmessage) ENDIF (NOT LINUX AND VIEWER) diff --git a/linden/indra/llmessage/llassetstorage.cpp b/linden/indra/llmessage/llassetstorage.cpp index 16a96b7..0ab1081 100644 --- a/linden/indra/llmessage/llassetstorage.cpp +++ b/linden/indra/llmessage/llassetstorage.cpp @@ -1028,12 +1028,12 @@ LLSD LLAssetStorage::getPendingDetails(LLAssetStorage::ERequestType rt, { const request_list_t* requests = getRequestList(rt); LLSD sd; - sd["requests"] = getPendingDetails(requests, asset_type, detail_prefix); + sd["requests"] = getPendingDetailsImpl(requests, asset_type, detail_prefix); return sd; } // virtual -LLSD LLAssetStorage::getPendingDetails(const LLAssetStorage::request_list_t* requests, +LLSD LLAssetStorage::getPendingDetailsImpl(const LLAssetStorage::request_list_t* requests, LLAssetType::EType asset_type, const std::string& detail_prefix) const { @@ -1116,11 +1116,11 @@ LLSD LLAssetStorage::getPendingRequest(LLAssetStorage::ERequestType rt, const LLUUID& asset_id) const { const request_list_t* requests = getRequestList(rt); - return getPendingRequest(requests, asset_type, asset_id); + return getPendingRequestImpl(requests, asset_type, asset_id); } // virtual -LLSD LLAssetStorage::getPendingRequest(const LLAssetStorage::request_list_t* requests, +LLSD LLAssetStorage::getPendingRequestImpl(const LLAssetStorage::request_list_t* requests, LLAssetType::EType asset_type, const LLUUID& asset_id) const { @@ -1139,7 +1139,7 @@ bool LLAssetStorage::deletePendingRequest(LLAssetStorage::ERequestType rt, const LLUUID& asset_id) { request_list_t* requests = getRequestList(rt); - if (deletePendingRequest(requests, asset_type, asset_id)) + if (deletePendingRequestImpl(requests, asset_type, asset_id)) { llinfos << "Asset " << getRequestName(rt) << " request for " << asset_id << "." << LLAssetType::lookup(asset_type) @@ -1150,7 +1150,7 @@ bool LLAssetStorage::deletePendingRequest(LLAssetStorage::ERequestType rt, } // virtual -bool LLAssetStorage::deletePendingRequest(LLAssetStorage::request_list_t* requests, +bool LLAssetStorage::deletePendingRequestImpl(LLAssetStorage::request_list_t* requests, LLAssetType::EType asset_type, const LLUUID& asset_id) { diff --git a/linden/indra/llmessage/llassetstorage.h b/linden/indra/llmessage/llassetstorage.h index c094ef4..83cfdf6 100644 --- a/linden/indra/llmessage/llassetstorage.h +++ b/linden/indra/llmessage/llassetstorage.h @@ -315,15 +315,15 @@ public: void markAssetToxic( const LLUUID& uuid ); protected: - virtual LLSD getPendingDetails(const request_list_t* requests, + virtual LLSD getPendingDetailsImpl(const request_list_t* requests, LLAssetType::EType asset_type, const std::string& detail_prefix) const; - virtual LLSD getPendingRequest(const request_list_t* requests, + virtual LLSD getPendingRequestImpl(const request_list_t* requests, LLAssetType::EType asset_type, const LLUUID& asset_id) const; - virtual bool deletePendingRequest(request_list_t* requests, + virtual bool deletePendingRequestImpl(request_list_t* requests, LLAssetType::EType asset_type, const LLUUID& asset_id); diff --git a/linden/indra/llmessage/llcurl.cpp b/linden/indra/llmessage/llcurl.cpp index 12321fe..202332c 100644 --- a/linden/indra/llmessage/llcurl.cpp +++ b/linden/indra/llmessage/llcurl.cpp @@ -120,7 +120,7 @@ LLCurl::Responder::~Responder() } // virtual -void LLCurl::Responder::error( +void LLCurl::Responder::errorWithContent( U32 status, const std::string& reason, const LLSD&) @@ -161,7 +161,7 @@ void LLCurl::Responder::completed(U32 status, const std::string& reason, const L } else { - error(status, reason, content); + errorWithContent(status, reason, content); } } diff --git a/linden/indra/llmessage/llcurl.h b/linden/indra/llmessage/llcurl.h index 3e9c0d4..32637b2 100644 --- a/linden/indra/llmessage/llcurl.h +++ b/linden/indra/llmessage/llcurl.h @@ -85,7 +85,7 @@ public: return((200 <= status) && (status < 300)); } - virtual void error( + virtual void errorWithContent( U32 status, const std::string& reason, const LLSD& content); diff --git a/linden/indra/llmessage/llhttpassetstorage.cpp b/linden/indra/llmessage/llhttpassetstorage.cpp index dfdad59..49dbdbd 100644 --- a/linden/indra/llmessage/llhttpassetstorage.cpp +++ b/linden/indra/llmessage/llhttpassetstorage.cpp @@ -626,7 +626,7 @@ LLSD LLHTTPAssetStorage::getPendingRequest(LLAssetStorage::ERequestType rt, const request_list_t* running = getRunningList(rt); if (running) { - LLSD sd = LLAssetStorage::getPendingRequest(running, asset_type, asset_id); + LLSD sd = LLAssetStorage::getPendingRequestImpl(running, asset_type, asset_id); if (sd) { sd["is_running"] = true; diff --git a/linden/indra/llmessage/llhttpassetstorage.h b/linden/indra/llmessage/llhttpassetstorage.h index 5786c5d..231437d 100644 --- a/linden/indra/llmessage/llhttpassetstorage.h +++ b/linden/indra/llmessage/llhttpassetstorage.h @@ -62,6 +62,8 @@ public: virtual ~LLHTTPAssetStorage(); + using LLAssetStorage::storeAssetData; // Unhiding virtuals... + virtual void storeAssetData( const LLUUID& uuid, LLAssetType::EType atype, diff --git a/linden/indra/llmessage/llhttpnode.cpp b/linden/indra/llmessage/llhttpnode.cpp index 2ba900a..440b91f 100644 --- a/linden/indra/llmessage/llhttpnode.cpp +++ b/linden/indra/llmessage/llhttpnode.cpp @@ -98,19 +98,19 @@ namespace { } // virtual -LLSD LLHTTPNode::get() const +LLSD LLHTTPNode::simpleGet() const { throw NotImplemented(); } // virtual -LLSD LLHTTPNode::put(const LLSD& input) const +LLSD LLHTTPNode::simplePut(const LLSD& input) const { throw NotImplemented(); } // virtual -LLSD LLHTTPNode::post(const LLSD& input) const +LLSD LLHTTPNode::simplePost(const LLSD& input) const { throw NotImplemented(); } @@ -121,7 +121,7 @@ void LLHTTPNode::get(LLHTTPNode::ResponsePtr response, const LLSD& context) cons { try { - response->result(get()); + response->result(simpleGet()); } catch (NotImplemented) { @@ -134,7 +134,7 @@ void LLHTTPNode::put(LLHTTPNode::ResponsePtr response, const LLSD& context, cons { try { - response->result(put(input)); + response->result(simplePut(input)); } catch (NotImplemented) { @@ -147,7 +147,7 @@ void LLHTTPNode::post(LLHTTPNode::ResponsePtr response, const LLSD& context, con { try { - response->result(post(input)); + response->result(simplePost(input)); } catch (NotImplemented) { @@ -160,7 +160,7 @@ void LLHTTPNode::del(LLHTTPNode::ResponsePtr response, const LLSD& context) cons { try { - response->result(del(context)); + response->result(simpleDel(context)); } catch (NotImplemented) { @@ -170,7 +170,7 @@ void LLHTTPNode::del(LLHTTPNode::ResponsePtr response, const LLSD& context) cons } // virtual -LLSD LLHTTPNode::del(const LLSD&) const +LLSD LLHTTPNode::simpleDel(const LLSD&) const { throw NotImplemented(); } @@ -388,7 +388,7 @@ LLHTTPNode::Response::~Response() { } -void LLHTTPNode::Response::status(S32 code) +void LLHTTPNode::Response::statusUnknownError(S32 code) { status(code, "Unknown Error"); } diff --git a/linden/indra/llmessage/llhttpnode.h b/linden/indra/llmessage/llhttpnode.h index 17ffd66..87f0c48 100644 --- a/linden/indra/llmessage/llhttpnode.h +++ b/linden/indra/llmessage/llhttpnode.h @@ -83,10 +83,10 @@ public: //@{ public: - virtual LLSD get() const; - virtual LLSD put(const LLSD& input) const; - virtual LLSD post(const LLSD& input) const; - virtual LLSD del(const LLSD& context) const; + virtual LLSD simpleGet() const; + virtual LLSD simplePut(const LLSD& input) const; + virtual LLSD simplePost(const LLSD& input) const; + virtual LLSD simpleDel(const LLSD& context) const; /** * @brief Abstract Base Class declaring Response interface. @@ -116,7 +116,7 @@ public: /** * @brief Return no body, just status code and 'UNKNOWN ERROR'. */ - virtual void status(S32 code); + virtual void statusUnknownError(S32 code); virtual void notFound(const std::string& message); virtual void notFound(); diff --git a/linden/indra/llmessage/llpumpio.cpp b/linden/indra/llmessage/llpumpio.cpp index 3e3f0b3..8ef2b16 100644 --- a/linden/indra/llmessage/llpumpio.cpp +++ b/linden/indra/llmessage/llpumpio.cpp @@ -43,6 +43,7 @@ #include "llmemtype.h" #include "llstl.h" #include "llstat.h" +#include "llfasttimer.h" // These should not be enabled in production, but they can be // intensely useful during development for finding certain kinds of diff --git a/linden/indra/llmessage/llregionpresenceverifier.cpp b/linden/indra/llmessage/llregionpresenceverifier.cpp index 24410a7..04eba34 100644 --- a/linden/indra/llmessage/llregionpresenceverifier.cpp +++ b/linden/indra/llmessage/llregionpresenceverifier.cpp @@ -30,6 +30,7 @@ * $/LicenseInfo$ */ +#include "linden_common.h" #include "llregionpresenceverifier.h" #include "llhttpclientinterface.h" #include diff --git a/linden/indra/llmessage/llsdappservices.cpp b/linden/indra/llmessage/llsdappservices.cpp index dc135c5..b87c0cd 100644 --- a/linden/indra/llmessage/llsdappservices.cpp +++ b/linden/indra/llmessage/llsdappservices.cpp @@ -56,7 +56,7 @@ public: desc.source(__FILE__, __LINE__); } - virtual LLSD get() const + virtual LLSD simpleGet() const { LLSD result; LLApp* app = LLApp::instance(); @@ -82,7 +82,7 @@ public: desc.source(__FILE__, __LINE__); } - virtual LLSD get() const + virtual LLSD simpleGet() const { return LLApp::instance()->getOptionData( LLApp::PRIORITY_RUNTIME_OVERRIDE); diff --git a/linden/indra/llmessage/llsdhttpserver.cpp b/linden/indra/llmessage/llsdhttpserver.cpp index 00fc170..7d06c29 100644 --- a/linden/indra/llmessage/llsdhttpserver.cpp +++ b/linden/indra/llmessage/llsdhttpserver.cpp @@ -62,7 +62,7 @@ public: desc.source(__FILE__, __LINE__); } - virtual LLSD get() const + virtual LLSD simpleGet() const { LLSD result = "hello"; return result; @@ -86,7 +86,7 @@ public: desc.source(__FILE__, __LINE__); } - virtual LLSD post(const LLSD& params) const + virtual LLSD simplePost(const LLSD& params) const { return params; } diff --git a/linden/indra/llplugin/CMakeLists.txt b/linden/indra/llplugin/CMakeLists.txt index 73cd9a3..7a7f4e5 100644 --- a/linden/indra/llplugin/CMakeLists.txt +++ b/linden/indra/llplugin/CMakeLists.txt @@ -2,10 +2,6 @@ project(llplugin) -if(HAVE_64_BIT) - set(REQUIRE_PIC) -endif(HAVE_64_BIT) - include(00-Common) include(CURL) include(LLCommon) diff --git a/linden/indra/llrender/llfontgl.cpp b/linden/indra/llrender/llfontgl.cpp index 5d3d6a7..7baec81 100644 --- a/linden/indra/llrender/llfontgl.cpp +++ b/linden/indra/llrender/llfontgl.cpp @@ -42,6 +42,7 @@ #include "llrender.h" #include "v4color.h" #include "llstl.h" +#include "llfasttimer.h" const S32 BOLD_OFFSET = 1; diff --git a/linden/indra/llrender/llgl.cpp b/linden/indra/llrender/llgl.cpp index 2e9b2bd..4a4ff1b 100644 --- a/linden/indra/llrender/llgl.cpp +++ b/linden/indra/llrender/llgl.cpp @@ -547,8 +547,6 @@ void LLGLManager::shutdownGL() // these are used to turn software blending on. They appear in the Debug/Avatar menu // presence of vertex skinning/blending or vertex programs will set these to FALSE by default. -extern LLCPUInfo gSysCPU; - void LLGLManager::initExtensions() { #if LL_MESA_HEADLESS diff --git a/linden/indra/llui/llfunctorregistry.cpp b/linden/indra/llui/llfunctorregistry.cpp index 0c5b165..5f9644f 100644 --- a/linden/indra/llui/llfunctorregistry.cpp +++ b/linden/indra/llui/llfunctorregistry.cpp @@ -31,6 +31,7 @@ * $/LicenseInfo$ **/ +#include "linden_common.h" #include "llfunctorregistry.h" // This is a default functor always resident in the system. diff --git a/linden/indra/llvfs/lldir.cpp b/linden/indra/llvfs/lldir.cpp index b8a4794..0c93cbb 100644 --- a/linden/indra/llvfs/lldir.cpp +++ b/linden/indra/llvfs/lldir.cpp @@ -43,6 +43,7 @@ #include "lldir.h" #include "llerror.h" #include "lluuid.h" +#include "lltimer.h" #if LL_WINDOWS #include "lldir_win32.h" diff --git a/linden/indra/llvfs/llpidlock.cpp b/linden/indra/llvfs/llpidlock.cpp index 93ac120..cb64428 100755 --- a/linden/indra/llvfs/llpidlock.cpp +++ b/linden/indra/llvfs/llpidlock.cpp @@ -39,6 +39,7 @@ #include "llsdserialize.h" #include "llnametable.h" #include "llframetimer.h" +#include "llapp.h" #if LL_WINDOWS //For windows platform. bool isProcessAlive(U32 pid) @@ -60,7 +61,7 @@ class LLPidLockFile public: LLPidLockFile( ) : mSaving(FALSE), mWaiting(FALSE), - mClean(TRUE), mPID(getpid()) + mClean(TRUE), mPID(LLApp::getPid()) { mLockName = gDirUtilp->getTempDir() + "/savelock"; } diff --git a/linden/indra/llvfs/llpidlock.h b/linden/indra/llvfs/llpidlock.h index 42aee4d..efcfd91 100755 --- a/linden/indra/llvfs/llpidlock.h +++ b/linden/indra/llvfs/llpidlock.h @@ -41,8 +41,6 @@ class LLFrameTimer; #include -#define getpid GetCurrentProcessId - #else //Everyone Else #include diff --git a/linden/indra/llvfs/llvfile.cpp b/linden/indra/llvfs/llvfile.cpp index 6b1563b..630975a 100644 --- a/linden/indra/llvfs/llvfile.cpp +++ b/linden/indra/llvfs/llvfile.cpp @@ -38,6 +38,7 @@ #include "llthread.h" #include "llstat.h" #include "llvfs.h" +#include "llfasttimer.h" const S32 LLVFile::READ = 0x00000001; const S32 LLVFile::WRITE = 0x00000002; diff --git a/linden/indra/llvfs/llvfs.cpp b/linden/indra/llvfs/llvfs.cpp index 9bf5b59..dea8c9c 100644 --- a/linden/indra/llvfs/llvfs.cpp +++ b/linden/indra/llvfs/llvfs.cpp @@ -47,6 +47,7 @@ #include "llvfs.h" #include "llstl.h" +#include "lltimer.h" const S32 FILE_BLOCK_MASK = 0x000003FF; // 1024-byte blocks const S32 VFS_CLEANUP_SIZE = 5242880; // how much space we free up in a single stroke diff --git a/linden/indra/llwindow/lldxhardware.cpp b/linden/indra/llwindow/lldxhardware.cpp index e0cb82d..d8058ba 100644 --- a/linden/indra/llwindow/lldxhardware.cpp +++ b/linden/indra/llwindow/lldxhardware.cpp @@ -47,6 +47,7 @@ #include "llstring.h" #include "llstl.h" +#include "lltimer.h" void (*gWriteDebug)(const char* msg) = NULL; LLDXHardware gDXHardware; diff --git a/linden/indra/llwindow/llwindowmacosx.h b/linden/indra/llwindow/llwindowmacosx.h index 92c73e8..d4c1b44 100644 --- a/linden/indra/llwindow/llwindowmacosx.h +++ b/linden/indra/llwindow/llwindowmacosx.h @@ -34,6 +34,7 @@ #define LL_LLWINDOWMACOSX_H #include "llwindow.h" +#include "lltimer.h" #include #include diff --git a/linden/indra/llwindow/llwindowsdl.cpp b/linden/indra/llwindow/llwindowsdl.cpp index 16106af..f7d7587 100644 --- a/linden/indra/llwindow/llwindowsdl.cpp +++ b/linden/indra/llwindow/llwindowsdl.cpp @@ -42,6 +42,7 @@ #include "llstring.h" #include "lldir.h" #include "llfindlocale.h" +#include "lltimer.h" #include "indra_constants.h" @@ -1940,11 +1941,6 @@ void LLWindowSDL::setCursor(ECursorType cursor) } } -ECursorType LLWindowSDL::getCursor() -{ - return mCurrentCursor; -} - void LLWindowSDL::initCursors() { int i; diff --git a/linden/indra/llwindow/llwindowsdl.h b/linden/indra/llwindow/llwindowsdl.h index 37b0835..e632dfe 100644 --- a/linden/indra/llwindow/llwindowsdl.h +++ b/linden/indra/llwindow/llwindowsdl.h @@ -36,6 +36,7 @@ // Simple Directmedia Layer (http://libsdl.org/) implementation of LLWindow class #include "llwindow.h" +#include "lltimer.h" #include "SDL/SDL.h" #include "SDL/SDL_endian.h" @@ -77,7 +78,6 @@ public: /*virtual*/ void hideCursorUntilMouseMove(); /*virtual*/ BOOL isCursorHidden(); /*virtual*/ void setCursor(ECursorType cursor); - /*virtual*/ ECursorType getCursor(); /*virtual*/ void captureMouse(); /*virtual*/ void releaseMouse(); /*virtual*/ void setMouseClipping( BOOL b ); diff --git a/linden/indra/llwindow/llwindowwin32.cpp b/linden/indra/llwindow/llwindowwin32.cpp index 12a488a..7bc9a3b 100644 --- a/linden/indra/llwindow/llwindowwin32.cpp +++ b/linden/indra/llwindow/llwindowwin32.cpp @@ -59,6 +59,8 @@ #include "llpreeditor.h" +#include "llfasttimer.h" + // culled from winuser.h #ifndef WM_MOUSEWHEEL /* Added to be compatible with later SDK's */ const S32 WM_MOUSEWHEEL = 0x020A; diff --git a/linden/indra/lscript/lscript_execute.h b/linden/indra/lscript/lscript_execute.h index 9a631c4..e2263fd 100644 --- a/linden/indra/lscript/lscript_execute.h +++ b/linden/indra/lscript/lscript_execute.h @@ -36,6 +36,7 @@ #include "lscript_byteconvert.h" #include "linked_lists.h" #include "lscript_library.h" +#include "lltimer.h" // Return values for run() methods const U32 NO_DELETE_FLAG = 0x0000; diff --git a/linden/indra/lscript/lscript_execute/llscriptresource.cpp b/linden/indra/lscript/lscript_execute/llscriptresource.cpp index 6c4776c..05ab8eb 100644 --- a/linden/indra/lscript/lscript_execute/llscriptresource.cpp +++ b/linden/indra/lscript/lscript_execute/llscriptresource.cpp @@ -30,6 +30,7 @@ * $/LicenseInfo$ */ +#include "linden_common.h" #include "llscriptresource.h" #include "llerror.h" diff --git a/linden/indra/media_plugins/base/CMakeLists.txt b/linden/indra/media_plugins/base/CMakeLists.txt index dd0b0a0..8d62043 100644 --- a/linden/indra/media_plugins/base/CMakeLists.txt +++ b/linden/indra/media_plugins/base/CMakeLists.txt @@ -2,10 +2,6 @@ project(media_plugin_base) -if(HAVE_64_BIT) - set(REQUIRE_PIC) -endif(HAVE_64_BIT) - include(00-Common) include(LLCommon) include(LLImage) diff --git a/linden/indra/media_plugins/example/CMakeLists.txt b/linden/indra/media_plugins/example/CMakeLists.txt index bac5fa2..7822300 100644 --- a/linden/indra/media_plugins/example/CMakeLists.txt +++ b/linden/indra/media_plugins/example/CMakeLists.txt @@ -2,10 +2,6 @@ project(media_plugin_example) -if(HAVE_64_BIT) - set(REQUIRE_PIC) -endif(HAVE_64_BIT) - include(00-Common) include(LLCommon) include(LLImage) diff --git a/linden/indra/media_plugins/gstreamer010/CMakeLists.txt b/linden/indra/media_plugins/gstreamer010/CMakeLists.txt index a031157..4401e64 100644 --- a/linden/indra/media_plugins/gstreamer010/CMakeLists.txt +++ b/linden/indra/media_plugins/gstreamer010/CMakeLists.txt @@ -2,10 +2,6 @@ project(media_plugin_gstreamer010) -if(HAVE_64_BIT) - set(REQUIRE_PIC) -endif(HAVE_64_BIT) - include(00-Common) include(LLCommon) include(LLImage) @@ -34,14 +30,6 @@ include_directories( ### media_plugin_gstreamer010 -if(NOT CMAKE_SIZEOF_VOID_P MATCHES 4) - if(WINDOWS) - add_definitions(/FIXED:NO) - else(WINDOWS) # not windows therefore gcc LINUX and DARWIN - add_definitions(-fPIC) - endif(WINDOWS) -endif (NOT CMAKE_SIZEOF_VOID_P MATCHES 4) - set(media_plugin_gstreamer010_SOURCE_FILES media_plugin_gstreamer010.cpp llmediaimplgstreamervidplug.cpp diff --git a/linden/indra/media_plugins/gstreamer010/llmediaimplgstreamertriviallogging.h b/linden/indra/media_plugins/gstreamer010/llmediaimplgstreamertriviallogging.h index 0ea096a..bb90aa1 100755 --- a/linden/indra/media_plugins/gstreamer010/llmediaimplgstreamertriviallogging.h +++ b/linden/indra/media_plugins/gstreamer010/llmediaimplgstreamertriviallogging.h @@ -38,31 +38,23 @@ #include -extern "C" { -#include -//#include //fiuxme -} - -#define MSGMODULEFOO "(media plugin)" - -#ifdef LL_LINUX ///////////////////////////////////////////////////////////////////////// // Debug/Info/Warning macros. - -#define STDERRMSG(...) do{\ - fprintf(stderr, " pid:%d: ", (int)getpid());\ - fprintf(stderr, MSGMODULEFOO " %s:%d: ", __FUNCTION__, __LINE__);\ - fprintf(stderr, __VA_ARGS__);\ - fputc('\n',stderr);\ - }while(0) +#if LL_WINDOWS +#include +#define LL_GETPID GetCurrentProcessId #else +#include +#include +#define LL_GETPID getpid +#endif +#define MSGMODULEFOO "(media plugin)" #define STDERRMSG(...) do{\ + fprintf(stderr, " pid:%d: ", (int)LL_GETPID());\ fprintf(stderr, MSGMODULEFOO " %s:%d: ", __FUNCTION__, __LINE__);\ fprintf(stderr, __VA_ARGS__);\ fputc('\n',stderr);\ }while(0) -#endif - #define NULLMSG(...) do{}while(0) #define DEBUGMSG NULLMSG diff --git a/linden/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp b/linden/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp index 44bc32e..78e46ca 100755 --- a/linden/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp +++ b/linden/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp @@ -175,7 +175,7 @@ MediaPluginGStreamer010::MediaPluginGStreamer010( mCommand ( COMMAND_NONE ) { std::ostringstream str; - INFOMSG("MediaPluginGStreamer010 constructor - my PID=%u", U32(getpid())); + INFOMSG("MediaPluginGStreamer010 constructor - my PID=%u", U32(LL_GETPID())); } /////////////////////////////////////////////////////////////////////////////// diff --git a/linden/indra/media_plugins/webkit/CMakeLists.txt b/linden/indra/media_plugins/webkit/CMakeLists.txt index 2ab4a95..303a774 100644 --- a/linden/indra/media_plugins/webkit/CMakeLists.txt +++ b/linden/indra/media_plugins/webkit/CMakeLists.txt @@ -2,10 +2,6 @@ project(media_plugin_webkit) -if(HAVE_64_BIT) - set(REQUIRE_PIC) -endif(HAVE_64_BIT) - include(00-Common) include(LLCommon) include(LLImage) @@ -34,20 +30,12 @@ include_directories( ${LLQTWEBKIT_INCLUDE_DIR} ) - ### media_plugin_webkit set(media_plugin_webkit_SOURCE_FILES media_plugin_webkit.cpp ) -if(NOT CMAKE_SIZEOF_VOID_P MATCHES 4) - if(WINDOWS) - add_definitions(/FIXED:NO) - else(WINDOWS) # not windows therefore gcc LINUX and DARWIN - add_definitions(-fPIC) - endif(WINDOWS) -endif (NOT CMAKE_SIZEOF_VOID_P MATCHES 4) set(media_plugin_webkit_HEADER_FILES volume_catcher.h ) diff --git a/linden/indra/newview/CMakeLists.txt b/linden/indra/newview/CMakeLists.txt index a4d99f2..8683bae 100644 --- a/linden/indra/newview/CMakeLists.txt +++ b/linden/indra/newview/CMakeLists.txt @@ -1538,11 +1538,23 @@ if (INSTALL) include(${CMAKE_CURRENT_SOURCE_DIR}/ViewerInstall.cmake) endif (INSTALL) -ADD_VIEWER_BUILD_TEST(llagentaccess viewer) +#ADD_VIEWER_BUILD_TEST(llagentaccess viewer) # Don't do these for DARWIN or LINUX here -- they're taken care of by viewer_manifest.py if (WINDOWS) + get_target_property(BUILT_LLCOMMON llcommon LOCATION) + add_custom_command( + TARGET ${VIEWER_BINARY_NAME} POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS + -E + copy_if_different + ${BUILT_LLCOMMON} + ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR} + COMMENT "Copying llcommon.dll to the runtime folder." + ) + get_target_property(BUILT_SLPLUGIN SLPlugin LOCATION) add_custom_command( TARGET ${VIEWER_BINARY_NAME} POST_BUILD diff --git a/linden/indra/newview/llagent.cpp b/linden/indra/newview/llagent.cpp index 8109196..5a1700a 100644 --- a/linden/indra/newview/llagent.cpp +++ b/linden/indra/newview/llagent.cpp @@ -5573,7 +5573,7 @@ class LLAgentDropGroupViewerNode : public LLHTTPNode !input.has("body") ) { //what to do with badly formed message? - response->status(400); + response->statusUnknownError(400); response->result(LLSD("Invalid message parameters")); } @@ -5646,7 +5646,7 @@ class LLAgentDropGroupViewerNode : public LLHTTPNode else { //what to do with badly formed message? - response->status(400); + response->statusUnknownError(400); response->result(LLSD("Invalid message parameters")); } } diff --git a/linden/indra/newview/llappviewer.h b/linden/indra/newview/llappviewer.h index 9d72457..7b3230a 100644 --- a/linden/indra/newview/llappviewer.h +++ b/linden/indra/newview/llappviewer.h @@ -33,6 +33,8 @@ #ifndef LL_LLAPPVIEWER_H #define LL_LLAPPVIEWER_H +#include "llsys.h" // LLOSInfo + class LLTextureCache; class LLImageDecodeThread; class LLTextureFetch; diff --git a/linden/indra/newview/llfeaturemanager.cpp b/linden/indra/newview/llfeaturemanager.cpp index 54da31b..bf43fcf 100644 --- a/linden/indra/newview/llfeaturemanager.cpp +++ b/linden/indra/newview/llfeaturemanager.cpp @@ -62,7 +62,6 @@ // externs // extern LLMemoryInfo gSysMemory; -extern LLCPUInfo gSysCPU; #if LL_DARWIN const char FEATURE_TABLE_FILENAME[] = "featuretable_mac.txt"; diff --git a/linden/indra/newview/llfloaterabout.cpp b/linden/indra/newview/llfloaterabout.cpp index 5c037d6..f7163ee 100644 --- a/linden/indra/newview/llfloaterabout.cpp +++ b/linden/indra/newview/llfloaterabout.cpp @@ -68,7 +68,6 @@ #include "lldxhardware.h" #endif -extern LLCPUInfo gSysCPU; extern LLMemoryInfo gSysMemory; extern U32 gPacketsIn; diff --git a/linden/indra/newview/llhomelocationresponder.cpp b/linden/indra/newview/llhomelocationresponder.cpp index e609237..c00d8e7 100644 --- a/linden/indra/newview/llhomelocationresponder.cpp +++ b/linden/indra/newview/llhomelocationresponder.cpp @@ -105,7 +105,8 @@ void LLHomeLocationResponder::result( const LLSD& content ) } } -void LLHomeLocationResponder::error( const LLSD& content ) +void LLHomeLocationResponder::error( U32 status, const std::string& reason ) { - llinfos << "received error(" << ll_pretty_print_sd( content ) << ")" << llendl; + llinfos << "received error(" << reason << ")" << llendl; } + diff --git a/linden/indra/newview/llhomelocationresponder.h b/linden/indra/newview/llhomelocationresponder.h index 1e222cd..3a1d8eb 100644 --- a/linden/indra/newview/llhomelocationresponder.h +++ b/linden/indra/newview/llhomelocationresponder.h @@ -42,7 +42,7 @@ class LLHomeLocationResponder : public LLHTTPClient::Responder { virtual void result( const LLSD& content ); - virtual void error( const LLSD& content ); + virtual void error( U32 status, const std::string& reason ); }; #endif diff --git a/linden/indra/newview/llspatialpartition.cpp b/linden/indra/newview/llspatialpartition.cpp index c1d5ff3..d9fa5b5 100644 --- a/linden/indra/newview/llspatialpartition.cpp +++ b/linden/indra/newview/llspatialpartition.cpp @@ -826,7 +826,7 @@ class LLSpatialSetStateDiff : public LLSpatialSetState public: LLSpatialSetStateDiff(U32 state) : LLSpatialSetState(state) { } - virtual void traverse(const LLSpatialGroup::TreeNode* n) + virtual void traverse(const LLSpatialGroup::OctreeNode* n) { LLSpatialGroup* group = (LLSpatialGroup*) n->getListener(0); @@ -885,7 +885,7 @@ class LLSpatialClearStateDiff : public LLSpatialClearState public: LLSpatialClearStateDiff(U32 state) : LLSpatialClearState(state) { } - virtual void traverse(const LLSpatialGroup::TreeNode* n) + virtual void traverse(const LLSpatialGroup::OctreeNode* n) { LLSpatialGroup* group = (LLSpatialGroup*) n->getListener(0); @@ -1519,7 +1519,7 @@ public: return false; } - virtual void traverse(const LLSpatialGroup::TreeNode* n) + virtual void traverse(const LLSpatialGroup::OctreeNode* n) { LLSpatialGroup* group = (LLSpatialGroup*) n->getListener(0); diff --git a/linden/indra/newview/llviewerassetstorage.h b/linden/indra/newview/llviewerassetstorage.h index 15c11c7..512b590 100644 --- a/linden/indra/newview/llviewerassetstorage.h +++ b/linden/indra/newview/llviewerassetstorage.h @@ -47,6 +47,7 @@ public: LLViewerAssetStorage(LLMessageSystem *msg, LLXferManager *xfer, LLVFS *vfs); + using LLAssetStorage::storeAssetData; virtual void storeAssetData( const LLTransactionID& tid, LLAssetType::EType atype, diff --git a/linden/indra/newview/llwatchdog.h b/linden/indra/newview/llwatchdog.h index ed7d5bd..1a10e33 100644 --- a/linden/indra/newview/llwatchdog.h +++ b/linden/indra/newview/llwatchdog.h @@ -64,9 +64,10 @@ public: /* virtual */ bool isAlive() const; /* virtual */ void reset(); - /* virtual */ void start(const std::string& state); + /* virtual */ void start() { start(""); }; /* virtual */ void stop(); + void start(const std::string& state); void setTimeout(F32 d); void ping(const std::string& state); const std::string& getState() {return mPingState; } diff --git a/linden/indra/newview/viewer_manifest.py b/linden/indra/newview/viewer_manifest.py index 41495ca..a93e058 100755 --- a/linden/indra/newview/viewer_manifest.py +++ b/linden/indra/newview/viewer_manifest.py @@ -248,6 +248,14 @@ class WindowsManifest(ViewerManifest): # For spellchecking self.path("libhunspell.dll") + # Get llcommon and deps. + if self.prefix(src=self.args['configuration'], dst=""): + self.path('libapr-1.dll') + self.path('libaprutil-1.dll') + self.path('libapriconv-1.dll') + self.path('llcommon.dll') + self.end_prefix() + # For textures if self.prefix(src="../../libraries/i686-win32/lib/release", dst=""): self.path("openjpeg.dll") @@ -732,14 +740,51 @@ class DarwinManifest(ViewerManifest): self.path("vivox-runtime/universal-darwin/SLVoice", "SLVoice") #self.path("vivox-runtime/universal-darwin/SLVoiceAgent.app", "SLVoiceAgent.app") + libdir = "../../libraries/universal-darwin/lib_release" + dylibs = {} + + #for lib in "llkdu", "llcommon": + for lib in "llcommon": + libfile = "lib%s.dylib" % lib + try: + self.path(self.find_existing_file(os.path.join(os.pardir, + lib, + self.args['configuration'], + libfile), + os.path.join(libdir, libfile)), + dst=libfile) + except RuntimeError: + print "Skipping %s" % libfile + dylibs[lib] = False + else: + dylibs[lib] = True + + for libfile in ("libapr-1.0.3.7.dylib", + "libaprutil-1.0.3.8.dylib", + "libexpat.0.5.0.dylib"): + self.path(os.path.join(libdir, libfile), libfile) + #libfmodwrapper.dylib #self.path(self.args['configuration'] + "/libfmodwrapper.dylib", "libfmodwrapper.dylib") # our apps # self.path("../mac_crash_logger/" + self.args['configuration'] + "/mac-crash-logger.app", "mac-crash-logger.app") self.path("../mac_updater/" + self.args['configuration'] + "/mac-updater.app", "mac-updater.app") - - # plugin launcher + + # our apps dependencies on shared libs + mac_crash_logger_res_path = self.dst_path_of("mac-crash-logger.app/Contents/Resources") + mac_updater_res_path = self.dst_path_of("mac-updater.app/Contents/Resources") + for libfile in ("libllcommon.dylib", + "libapr-1.0.3.7.dylib", + "libaprutil-1.0.3.8.dylib", + "libexpat.0.5.0.dylib"): + target_lib = os.path.join('../../..', libfile) + self.run_command("ln -sf %(target)r %(link)r" % + {'target': target_lib, + 'link' : os.path.join(mac_crash_logger_res_path, libfile)} + ) + + # plugin launcher self.path("../llplugin/slplugin/" + self.args['configuration'] + "/SLPlugin", "SLPlugin") # plugins @@ -895,6 +940,8 @@ class LinuxManifest(ViewerManifest): # Per platform MIME config on the cheap. See SNOW-307 / DEV-41388 self.path("skins/default/xui/en-us/mime_types_linux.xml", "skins/default/xui/en-us/mime_types.xml") + self.path("../llcommon/libllcommon.so", "lib/libllcommon.so") + self.path("featuretable_linux.txt") -- cgit v1.1 From 38d4ef2f26545c630fe80e7edc59b0a77641938a Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Sun, 7 Nov 2010 18:38:46 +0100 Subject: IMP-692: SNOW-713: Fixed compile bug fixes. Changes: * Added changes from snowglobe 1.5 to indra/llcommon/llstring.h (compile errors as a result of a missing include, but I copied everything else too). * Added #include "linden_common.h" to emeraldboobutils.cpp. Really it's one the header files that needed that, but that's how this header works: every source file should include it as first header anyway, then there is no need for other headers to do that. * Renamed LLPanelRegionOpenSettingsInfo::sendUpdate(void*) to LLPanelRegionOpenSettingsInfo::onClickOrs because it was hiding a virtual function (BOOL sendUpdate(void)). * Made cutToClipboard more equal to copyToClipboard (was also hiding a virtual function). * Install libllcommon.so in lib64 on Linux_x86_64, instead of lib. --- linden/indra/llcommon/llstring.h | 25 ++++++++++++++++++++----- linden/indra/newview/emeraldboobutils.cpp | 1 + linden/indra/newview/llfloaterregioninfo.cpp | 6 +++--- linden/indra/newview/llfloaterregioninfo.h | 2 +- linden/indra/newview/llfolderview.h | 2 +- linden/indra/newview/llinventorybridge.h | 2 +- linden/indra/newview/llpanelinventory.cpp | 5 +++-- linden/indra/newview/viewer_manifest.py | 10 ++++++---- 8 files changed, 36 insertions(+), 17 deletions(-) (limited to 'linden/indra') diff --git a/linden/indra/llcommon/llstring.h b/linden/indra/llcommon/llstring.h index 3f2c8d8..44f5f07 100644 --- a/linden/indra/llcommon/llstring.h +++ b/linden/indra/llcommon/llstring.h @@ -34,12 +34,13 @@ #define LL_LLSTRING_H #include +#include +#include #if LL_LINUX || LL_SOLARIS #include #include #endif -#include "linden_common.h" #include @@ -173,6 +174,8 @@ public: static S32 collate(const char* a, const char* b) { return strcoll(a, b); } static S32 collate(const llwchar* a, const llwchar* b); + + static bool isHexString(const std::string& str); }; /** @@ -236,7 +239,8 @@ public: static void replaceTabsWithSpaces( std::basic_string& string, size_type spaces_per_tab ); static void replaceNonstandardASCII( std::basic_string& string, T replacement ); static void replaceChar( std::basic_string& string, T target, T replacement ); - + static void replaceString( std::basic_string& string, std::basic_string target, std::basic_string replacement ); + static BOOL containsNonprintable(const std::basic_string& string); static void stripNonprintable(std::basic_string& string); @@ -908,11 +912,22 @@ template void LLStringUtilBase::replaceChar( std::basic_string& string, T target, T replacement ) { size_type found_pos = 0; - for (found_pos = string.find(target, found_pos); - found_pos != std::basic_string::npos; - found_pos = string.find(target, found_pos)) + while( (found_pos = string.find(target, found_pos)) != std::basic_string::npos ) { string[found_pos] = replacement; + found_pos++; // avoid infinite defeat if target == replacement + } +} + +//static +template +void LLStringUtilBase::replaceString( std::basic_string& string, std::basic_string target, std::basic_string replacement ) +{ + size_type found_pos = 0; + while( (found_pos = string.find(target, found_pos)) != std::basic_string::npos ) + { + string.replace( found_pos, target.length(), replacement ); + found_pos += replacement.length(); // avoid infinite defeat if replacement contains target } } diff --git a/linden/indra/newview/emeraldboobutils.cpp b/linden/indra/newview/emeraldboobutils.cpp index f68d6a7..f440940 100644 --- a/linden/indra/newview/emeraldboobutils.cpp +++ b/linden/indra/newview/emeraldboobutils.cpp @@ -1,3 +1,4 @@ +#include "linden_common.h" #include "emeraldboobutils.h" std::ostream &operator<<(std::ostream &os, const EmeraldGlobalBoobConfig &v) diff --git a/linden/indra/newview/llfloaterregioninfo.cpp b/linden/indra/newview/llfloaterregioninfo.cpp index 8ae3fa2..d4ffe22 100644 --- a/linden/indra/newview/llfloaterregioninfo.cpp +++ b/linden/indra/newview/llfloaterregioninfo.cpp @@ -908,7 +908,7 @@ BOOL LLPanelRegionOpenSettingsInfo::postBuild() initHelpBtn("show_tags_help", "HelpShowTags"); initHelpBtn("allow_parcel_windlight_help", "HelpAllowParcelWindLight"); - childSetAction("apply_ors_btn", sendUpdate, this); + childSetAction("apply_ors_btn", onClickOrs, this); refreshFromRegion(gAgent.getRegion()); @@ -926,12 +926,12 @@ BOOL LLPanelRegionOpenSettingsInfo::postBuild() // strings[7] = restrict pushobject // strings[8] = 'Y' - allow parcel subdivide, 'N' - not // strings[9] = 'Y' - block parcel search, 'N' - allow -void LLPanelRegionOpenSettingsInfo::sendUpdate(void* userdata) +void LLPanelRegionOpenSettingsInfo::onClickOrs(void* userdata) { LLPanelRegionOpenSettingsInfo* self; self = (LLPanelRegionOpenSettingsInfo*)userdata; - llinfos << "LLPanelRegionOpenSettingsInfo::sendUpdate()" << llendl; + llinfos << "LLPanelRegionOpenSettingsInfo::onClickOrs()" << llendl; LLSD body; std::string url = gAgent.getRegion()->getCapability("DispatchOpenRegionSettings"); diff --git a/linden/indra/newview/llfloaterregioninfo.h b/linden/indra/newview/llfloaterregioninfo.h index ee01c7c..ae0c993 100644 --- a/linden/indra/newview/llfloaterregioninfo.h +++ b/linden/indra/newview/llfloaterregioninfo.h @@ -188,7 +188,7 @@ public: virtual BOOL postBuild(); protected: - static void sendUpdate(void* userdata); + static void onClickOrs(void* userdata); }; ///////////////////////////////////////////////////////////////////////////// diff --git a/linden/indra/newview/llfolderview.h b/linden/indra/newview/llfolderview.h index 9fad72e..40da669 100644 --- a/linden/indra/newview/llfolderview.h +++ b/linden/indra/newview/llfolderview.h @@ -97,7 +97,7 @@ public: virtual void move( LLFolderViewEventListener* parent_listener ) = 0; virtual BOOL isItemCopyable() const = 0; virtual BOOL copyToClipboard() const = 0; - virtual void cutToClipboard() = 0; + virtual BOOL cutToClipboard() const = 0; virtual BOOL isClipboardPasteable() const = 0; virtual void pasteFromClipboard() = 0; virtual void buildContextMenu(LLMenuGL& menu, U32 flags) = 0; diff --git a/linden/indra/newview/llinventorybridge.h b/linden/indra/newview/llinventorybridge.h index 2004678..5a53aa5 100644 --- a/linden/indra/newview/llinventorybridge.h +++ b/linden/indra/newview/llinventorybridge.h @@ -221,7 +221,7 @@ public: virtual void move(LLFolderViewEventListener* new_parent_bridge) {} virtual BOOL isItemCopyable() const { return FALSE; } virtual BOOL copyToClipboard() const { return FALSE; } - virtual void cutToClipboard() {} + virtual BOOL cutToClipboard() const { return FALSE; } virtual BOOL isClipboardPasteable() const; virtual void pasteFromClipboard() {} void getClipboardEntries(bool show_asset_id, std::vector &items, diff --git a/linden/indra/newview/llpanelinventory.cpp b/linden/indra/newview/llpanelinventory.cpp index 9cd2759..277ab15 100644 --- a/linden/indra/newview/llpanelinventory.cpp +++ b/linden/indra/newview/llpanelinventory.cpp @@ -145,7 +145,7 @@ public: virtual void move(LLFolderViewEventListener* parent_listener); virtual BOOL isItemCopyable() const; virtual BOOL copyToClipboard() const; - virtual void cutToClipboard(); + virtual BOOL cutToClipboard() const; virtual BOOL isClipboardPasteable() const; virtual void pasteFromClipboard(); virtual void buildContextMenu(LLMenuGL& menu, U32 flags); @@ -594,8 +594,9 @@ BOOL LLTaskInvFVBridge::copyToClipboard() const return FALSE; } -void LLTaskInvFVBridge::cutToClipboard() +BOOL LLTaskInvFVBridge::cutToClipboard() const { + return FALSE; } BOOL LLTaskInvFVBridge::isClipboardPasteable() const diff --git a/linden/indra/newview/viewer_manifest.py b/linden/indra/newview/viewer_manifest.py index a93e058..f631d1f 100755 --- a/linden/indra/newview/viewer_manifest.py +++ b/linden/indra/newview/viewer_manifest.py @@ -228,7 +228,7 @@ class WindowsManifest(ViewerManifest): self.path("LICENSE-libraries.txt") self.end_prefix("../..") - + self.path("imprudence.url") # Plugin host application @@ -741,7 +741,7 @@ class DarwinManifest(ViewerManifest): #self.path("vivox-runtime/universal-darwin/SLVoiceAgent.app", "SLVoiceAgent.app") libdir = "../../libraries/universal-darwin/lib_release" - dylibs = {} + dylibs = {} #for lib in "llkdu", "llcommon": for lib in "llcommon": @@ -940,8 +940,6 @@ class LinuxManifest(ViewerManifest): # Per platform MIME config on the cheap. See SNOW-307 / DEV-41388 self.path("skins/default/xui/en-us/mime_types_linux.xml", "skins/default/xui/en-us/mime_types.xml") - self.path("../llcommon/libllcommon.so", "lib/libllcommon.so") - self.path("featuretable_linux.txt") @@ -997,6 +995,8 @@ class Linux_i686Manifest(LinuxManifest): super(Linux_i686Manifest, self).construct() self.path("imprudence-stripped","bin/do-not-directly-run-imprudence-bin") + self.path("../llcommon/libllcommon.so", "lib/libllcommon.so") + if (not self.standalone()) and self.prefix("../../libraries/i686-linux/lib_release_client", dst="lib"): self.path("libapr-1.so.0") self.path("libaprutil-1.so.0") @@ -1114,6 +1114,8 @@ class Linux_x86_64Manifest(LinuxManifest): self.path("imprudence-stripped","bin/do-not-directly-run-imprudence-bin") # self.path("../linux_crash_logger/linux-crash-logger-stripped","linux-crash-logger.bin") + self.path("../llcommon/libllcommon.so", "lib64/libllcommon.so") + self.path("linux_tools/launch_url.sh","launch_url.sh") if self.prefix("res-sdl"): self.path("*") -- cgit v1.1 From eeb08e9b2abd3ec1404dce77151899d90908df6a Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Sun, 7 Nov 2010 21:17:11 +0100 Subject: IMP-692: SNOW-713: Removed isHexString again, since it is not defined anywhere. --- linden/indra/llcommon/llstring.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'linden/indra') diff --git a/linden/indra/llcommon/llstring.h b/linden/indra/llcommon/llstring.h index 44f5f07..ae5d84c 100644 --- a/linden/indra/llcommon/llstring.h +++ b/linden/indra/llcommon/llstring.h @@ -174,8 +174,6 @@ public: static S32 collate(const char* a, const char* b) { return strcoll(a, b); } static S32 collate(const llwchar* a, const llwchar* b); - - static bool isHexString(const std::string& str); }; /** -- cgit v1.1 From 346e88760c55921ca474886168a89b104fd3f4cc Mon Sep 17 00:00:00 2001 From: Robin Cornelius Date: Sun, 7 Nov 2010 20:28:12 +0000 Subject: Correctly stage libhunspell.dll in viewer_manifest.py --- linden/indra/newview/viewer_manifest.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'linden/indra') diff --git a/linden/indra/newview/viewer_manifest.py b/linden/indra/newview/viewer_manifest.py index f631d1f..1383bba 100755 --- a/linden/indra/newview/viewer_manifest.py +++ b/linden/indra/newview/viewer_manifest.py @@ -246,7 +246,9 @@ class WindowsManifest(ViewerManifest): #self.path("fmod.dll") # For spellchecking - self.path("libhunspell.dll") + if self.prefix(src=self.args['configuration'], dst=""): + self.path("libhunspell.dll") + self.end_prefix() # Get llcommon and deps. if self.prefix(src=self.args['configuration'], dst=""): -- cgit v1.1 From c722768ddd66c4bf07d562517953ee520a2a10d0 Mon Sep 17 00:00:00 2001 From: Robin Cornelius Date: Sun, 7 Nov 2010 20:29:53 +0000 Subject: As we currently do not build the gstreamer plugin for windows, do not try to stage it in viewer_manifest.py --- linden/indra/newview/viewer_manifest.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'linden/indra') diff --git a/linden/indra/newview/viewer_manifest.py b/linden/indra/newview/viewer_manifest.py index 1383bba..30c0271 100755 --- a/linden/indra/newview/viewer_manifest.py +++ b/linden/indra/newview/viewer_manifest.py @@ -278,12 +278,7 @@ class WindowsManifest(ViewerManifest): if self.prefix(src='../media_plugins/webkit/%s' % self.args['configuration'], dst="llplugin"): self.path("media_plugin_webkit.dll") self.end_prefix() - - # Media plugins - Gstreamer - if self.prefix(src='../media_plugins/gstreamer/%s' % self.args['configuration'], dst="llplugin"): - self.path("media_plugin_gstreamer010.dll", "media_plugin_gstreamer.dll") - self.end_prefix() - + # For WebKit/Qt plugin runtimes if self.prefix(src="../../libraries/i686-win32/lib/release", dst="llplugin"): self.path("libeay32.dll") -- cgit v1.1 From 44c07eb2c58c4898752ad813d46c224ccd7229f1 Mon Sep 17 00:00:00 2001 From: Armin Weatherwax Date: Mon, 8 Nov 2010 19:51:32 +0100 Subject: feature: add a tiny context menu to areasearch scroll list items rightclick one of the results and teleport or cam to the object or bring it in edit mode --- linden/indra/llui/llscrolllistctrl.cpp | 38 +++++++ linden/indra/llui/llscrolllistctrl.h | 4 + linden/indra/newview/jcfloaterareasearch.cpp | 117 +++++++++++++++++++++ linden/indra/newview/jcfloaterareasearch.h | 17 +++ .../skins/default/xui/en-us/menu_areasearch.xml | 16 +++ 5 files changed, 192 insertions(+) create mode 100644 linden/indra/newview/skins/default/xui/en-us/menu_areasearch.xml (limited to 'linden/indra') diff --git a/linden/indra/llui/llscrolllistctrl.cpp b/linden/indra/llui/llscrolllistctrl.cpp index 9635f99..1248a9a 100644 --- a/linden/indra/llui/llscrolllistctrl.cpp +++ b/linden/indra/llui/llscrolllistctrl.cpp @@ -605,6 +605,7 @@ LLScrollListCtrl::LLScrollListCtrl(const std::string& name, const LLRect& rect, mHighlightedColor( LLUI::sColorsGroup->getColor("ScrollHighlightedColor") ), mBorderThickness( 2 ), mOnDoubleClickCallback( NULL ), + mOnRightMouseDownCallback( NULL ), mOnMaximumSelectCallback( NULL ), mOnSortChangedCallback( NULL ), mHighlightedItem(-1), @@ -2082,6 +2083,27 @@ BOOL LLScrollListCtrl::handleDoubleClick(S32 x, S32 y, MASK mask) return TRUE; } +BOOL LLScrollListCtrl::handleRightMouseDown(S32 x, S32 y, MASK mask) +{ + //BOOL handled = FALSE; + BOOL handled = handleClick(x, y, mask); + + if (!handled) + { + // Offer the click to the children, even if we aren't enabled + // so the scroll bars will work. + if (NULL == LLView::childrenHandleRightMouseDown(x, y, mask)) + { + if( mCanSelect && mOnRightMouseDownCallback ) + { + mOnRightMouseDownCallback( x, y, mCallbackUserData ); + } + } + } + + return TRUE; +} + BOOL LLScrollListCtrl::handleClick(S32 x, S32 y, MASK mask) { // which row was clicked on? @@ -3631,6 +3653,22 @@ BOOL LLColumnHeader::handleDoubleClick(S32 x, S32 y, MASK mask) return TRUE; } +BOOL LLColumnHeader::handleRightMouseDown(S32 x, S32 y, MASK mask) +{ + if (canResize() && mResizeBar->getRect().pointInRect(x, y)) + { + // reshape column to max content width + LLRect column_rect = getRect(); + column_rect.mRight = column_rect.mLeft + mColumn->mMaxContentWidth; + userSetShape(column_rect); + } + else + { + onClick(this); + } + return TRUE; +} + void LLColumnHeader::setImage(const std::string &image_name) { if (mButton) diff --git a/linden/indra/llui/llscrolllistctrl.h b/linden/indra/llui/llscrolllistctrl.h index e875d7a..4be7ff7 100644 --- a/linden/indra/llui/llscrolllistctrl.h +++ b/linden/indra/llui/llscrolllistctrl.h @@ -241,6 +241,7 @@ public: /*virtual*/ void draw(); /*virtual*/ BOOL handleDoubleClick(S32 x, S32 y, MASK mask); + /*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); /*virtual*/ void showList(); /*virtual*/ LLView* findSnapEdge(S32& new_edge_val, const LLCoordGL& mouse_dir, ESnapEdge snap_edge, ESnapType snap_type, S32 threshold, S32 padding); @@ -431,6 +432,7 @@ public: void highlightNthItem( S32 index ); void setDoubleClickCallback( void (*cb)(void*) ) { mOnDoubleClickCallback = cb; } + void setRightMouseDownCallback( void (*cb)(S32 x, S32 y, void*) ) { mOnRightMouseDownCallback = cb; } void setMaximumSelectCallback( void (*cb)(void*) ) { mOnMaximumSelectCallback = cb; } void setSortChangedCallback( void (*cb)(void*) ) { mOnSortChangedCallback = cb; } @@ -517,6 +519,7 @@ public: /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask); /*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask); /*virtual*/ BOOL handleDoubleClick(S32 x, S32 y, MASK mask); + /*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); /*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask); /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask); /*virtual*/ BOOL handleUnicodeCharHere(llwchar uni_char); @@ -660,6 +663,7 @@ private: S32 mBorderThickness; void (*mOnDoubleClickCallback)(void* userdata); + void (*mOnRightMouseDownCallback)(S32 x, S32 y, void* userdata); void (*mOnMaximumSelectCallback)(void* userdata ); void (*mOnSortChangedCallback)(void* userdata); diff --git a/linden/indra/newview/jcfloaterareasearch.cpp b/linden/indra/newview/jcfloaterareasearch.cpp index ed00447..0918431 100644 --- a/linden/indra/newview/jcfloaterareasearch.cpp +++ b/linden/indra/newview/jcfloaterareasearch.cpp @@ -38,7 +38,14 @@ #include "llscrolllistctrl.h" #include "llagent.h" + +#include "llfloatertools.h" +#include "llmenugl.h" +#include "llselectmgr.h" +#include "lltoolcomp.h" +#include "lltoolmgr.h" #include "lltracker.h" +#include "llviewerjoystick.h" #include "llviewerobjectlist.h" #include "llviewercontrol.h" #include "jcfloaterareasearch.h" @@ -63,6 +70,19 @@ mResultList(0) llassert_always(sInstance == NULL); sInstance = this; mLastUpdateTimer.reset(); + + + // Register event listeners for popup menu + mPopupMenuHandler = new PopupMenuHandler(this); + mPopupMenuHandler->registerListener(this, "Popup.HandleMenu"); + + LLMenuGL* menu = LLUICtrlFactory::getInstance()->buildMenu("menu_areasearch.xml", this); + if (!menu) + { + menu = new LLMenuGL(LLStringUtil::null); + } + menu->setVisible(FALSE); + mPopupMenuHandle = menu->getHandle(); } JCFloaterAreaSearch::~JCFloaterAreaSearch() @@ -90,6 +110,7 @@ BOOL JCFloaterAreaSearch::postBuild() mResultList = getChild("result_list"); mResultList->setCallbackUserData(this); mResultList->setDoubleClickCallback(onDoubleClick); + mResultList->setRightMouseDownCallback(onRightMouseDown); mResultList->sortByColumn("Name", TRUE); mCounterText = getChild("counter"); @@ -159,6 +180,102 @@ void JCFloaterAreaSearch::onDoubleClick(void *userdata) } } +//static +void JCFloaterAreaSearch::onRightMouseDown(S32 x, S32 y, void *userdata) +{ + JCFloaterAreaSearch* self = (JCFloaterAreaSearch*)userdata; + + self->setFocus( TRUE ); + LLMenuGL* menu = (LLMenuGL*)self->mPopupMenuHandle.get(); + if(menu) + { + if(menu->getVisible()) + { + menu->setVisible(FALSE); + } + else + { + LLScrollListItem *item = self->mResultList->getFirstSelected(); + if (item) + { + self->mSelectedItem = item; + menu->setVisible(TRUE); + menu->setFocus(TRUE); + menu->arrange(); + menu->updateParent(LLMenuGL::sMenuContainer); + LLMenuGL::showPopup(self, menu, x, y+50); + } + else + { + self->mSelectedItem = NULL; + } + } + } + +} + +JCFloaterAreaSearch::PopupMenuHandler::PopupMenuHandler(const JCFloaterAreaSearch* instance) + : mInstance(instance) +{ + +} + +// static +bool JCFloaterAreaSearch::PopupMenuHandler::handleEvent(LLPointer event, const LLSD& userdata) +{ + std::string command = userdata.asString(); + JCFloaterAreaSearch* self = (JCFloaterAreaSearch*)mInstance; + + if (self && self->mSelectedItem && !command.empty()) + { + LLUUID object_id = self->mSelectedItem->getUUID(); + LLViewerObject* object = gObjectList.findObject(object_id); + + if (object && !object->isAvatar()) + { + + + if ("teleport" == command) + { + LLVector3d pos = object->getPositionGlobal(); + gAgent.teleportViaLocation(pos); + + } + else + { + if ("cam" || "edit" == command) + { + + gAgent.setFocusOnAvatar(FALSE, FALSE); + gAgent.changeCameraToThirdPerson(); + gAgent.setFocusGlobal(object->getPositionGlobal(), object_id); + gAgent.setCameraPosAndFocusGlobal(object->getPositionGlobal() + + LLVector3d(3.5,1.35,0.75) * object->getRotation(), + object->getPositionGlobal(), + object_id ); + if ("edit" == command) + { + if(!object->isSelected()) + { + LLSelectMgr::getInstance()->deselectAll(); + LLSelectMgr::getInstance()->selectObjectAndFamily(object); + } + + gFloaterTools->open(); + LLToolMgr::getInstance()->setCurrentToolset(gBasicToolset); + gFloaterTools->setEditTool( LLToolCompTranslate::getInstance() ); + + LLViewerJoystick::getInstance()->moveObjects(true); + LLViewerJoystick::getInstance()->setNeedsReset(true); + } + } + } + } + } + + return true; +} + // static void JCFloaterAreaSearch::cancel(void* data) { diff --git a/linden/indra/newview/jcfloaterareasearch.h b/linden/indra/newview/jcfloaterareasearch.h index 1512030..5bceb59 100644 --- a/linden/indra/newview/jcfloaterareasearch.h +++ b/linden/indra/newview/jcfloaterareasearch.h @@ -35,9 +35,11 @@ #include "lluuid.h" #include "llstring.h" #include "llframetimer.h" +#include "llmemberlistener.h" class LLTextBox; class LLScrollListCtrl; +class LLScrollListItem; class LLViewerRegion; struct AObjectDetails @@ -71,6 +73,7 @@ private: static void onCommitLine(LLLineEditor* line, void* user_data); static void requestIfNeeded(LLViewerObject *objectp); static void onDoubleClick(void *userdata); + static void onRightMouseDown(S32 x, S32 y, void *userdata); enum OBJECT_COLUMN_ORDER { @@ -86,6 +89,7 @@ private: LLTextBox* mCounterText; LLScrollListCtrl* mResultList; + LLScrollListItem* mSelectedItem; LLFrameTimer mLastUpdateTimer; static std::map sObjectDetails; @@ -96,4 +100,17 @@ private: static std::string sSearchedGroup; static LLViewerRegion* sLastRegion; + + LLHandle mPopupMenuHandle; + + class PopupMenuHandler : public LLMemberListener + { + public: PopupMenuHandler(const JCFloaterAreaSearch* instance); + + /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata); + + const JCFloaterAreaSearch* mInstance; + }; + + class PopupMenuHandler* mPopupMenuHandler; }; diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_areasearch.xml b/linden/indra/newview/skins/default/xui/en-us/menu_areasearch.xml new file mode 100644 index 0000000..c55d1b3 --- /dev/null +++ b/linden/indra/newview/skins/default/xui/en-us/menu_areasearch.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + -- cgit v1.1 From 88df6cce7308b86b1526bd253440a6538e337d44 Mon Sep 17 00:00:00 2001 From: Armin Weatherwax Date: Tue, 9 Nov 2010 23:34:29 +0100 Subject: fix: add missing settings for logging into Aurora Sim --- linden/indra/newview/app_settings/settings.xml | 38 +++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) (limited to 'linden/indra') diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index 22e4aa5..2f29b17 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml @@ -1,7 +1,43 @@ - + + + + TimeOffset + + Comment + difference in hours to UTC time + Persist + 0 + Type + S32 + Value + 0 + + UseTimeOffset + + Comment + Use debug setting TimeOffset + Persist + 0 + Type + Boolean + Value + 0 + + TimeOffsetDST + + Comment + TimeOffset has Day Light Savings + Persist + 0 + Type + Boolean + Value + 0 + + -- cgit v1.1 From 1e88050a4ab2d5e517fdb2cea4c0e2727791cffb Mon Sep 17 00:00:00 2001 From: Armin Weatherwax Date: Tue, 9 Nov 2010 23:54:35 +0100 Subject: fix: add missing AllowEditingOfTrees setting --- linden/indra/newview/app_settings/settings.xml | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'linden/indra') diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index 2f29b17..33299ba 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml @@ -40,6 +40,18 @@ + AllowEditingOfTrees + + Comment + Allow editing of trees and grass + Persist + 1 + Type + Boolean + Value + 1 + + HighlightNickname01 -- cgit v1.1 From c96a895861c6c81b486c3e2c2cc46adcdba11cea Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Tue, 9 Nov 2010 21:52:45 -0600 Subject: llstring.h directly depends on #include . --- linden/indra/llcommon/llstring.h | 1 + 1 file changed, 1 insertion(+) (limited to 'linden/indra') diff --git a/linden/indra/llcommon/llstring.h b/linden/indra/llcommon/llstring.h index ae5d84c..61767ac 100644 --- a/linden/indra/llcommon/llstring.h +++ b/linden/indra/llcommon/llstring.h @@ -36,6 +36,7 @@ #include #include #include +#include #if LL_LINUX || LL_SOLARIS #include -- cgit v1.1 From a99afc222d2e01d64663698740d1a9f937e8559b Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Wed, 10 Nov 2010 21:50:02 -0700 Subject: Added missing 'Plugin' entry in logcontrol.xml --- linden/indra/newview/app_settings/logcontrol.xml | 1 + 1 file changed, 1 insertion(+) (limited to 'linden/indra') diff --git a/linden/indra/newview/app_settings/logcontrol.xml b/linden/indra/newview/app_settings/logcontrol.xml index 682bf64..c94fc51 100644 --- a/linden/indra/newview/app_settings/logcontrol.xml +++ b/linden/indra/newview/app_settings/logcontrol.xml @@ -66,6 +66,7 @@ + -- cgit v1.1 From 86c2b6fd2a17f575998bd6efdcab5aa4bafc86b9 Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Fri, 12 Nov 2010 21:39:40 +0100 Subject: Add support for using ld.gold on linux. To use ld.gold configure with: -DCMAKE_EXE_LINKER_FLAGS:STRING="-Wl,-use-gold". ld.gold links the viewer on my machine in 8 seconds, as opposed to 19 seconds with ld.bfd. Moreover, it uses a LOT less memory during linking (about 750 MB instead of 2.5 GB!). Thanks to Siana Gearz for pointing out that ld.gold is so much faster. --- linden/indra/cmake/BerkeleyDB.cmake | 7 ++++++- linden/indra/cmake/LLCommon.cmake | 10 ++++++++-- linden/indra/llwindow/CMakeLists.txt | 1 + 3 files changed, 15 insertions(+), 3 deletions(-) (limited to 'linden/indra') diff --git a/linden/indra/cmake/BerkeleyDB.cmake b/linden/indra/cmake/BerkeleyDB.cmake index d98e791..de62763 100644 --- a/linden/indra/cmake/BerkeleyDB.cmake +++ b/linden/indra/cmake/BerkeleyDB.cmake @@ -6,6 +6,11 @@ set(DB_FIND_REQUIRED ON) if (STANDALONE) include(FindBerkeleyDB) else (STANDALONE) - set(DB_LIBRARIES db-4.2) + if (LINUX) + # Need to add dependency pthread explicitely to support ld.gold. + set(DB_LIBRARIES db-4.2 pthread) + else (LINUX) + set(DB_LIBRARIES db-4.2) + endif (LINUX) set(DB_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include) endif (STANDALONE) diff --git a/linden/indra/cmake/LLCommon.cmake b/linden/indra/cmake/LLCommon.cmake index 410766e..d87d3c0 100644 --- a/linden/indra/cmake/LLCommon.cmake +++ b/linden/indra/cmake/LLCommon.cmake @@ -7,9 +7,15 @@ include(ZLIB) set(LLCOMMON_INCLUDE_DIRS ${LIBS_OPEN_DIR}/llcommon - ${APRUTIL_INCLUDE_DIR} ${APR_INCLUDE_DIR} ${Boost_INCLUDE_DIRS} ) -set(LLCOMMON_LIBRARIES llcommon) +if (LINUX) + # In order to support using ld.gold on linux, we need to explicitely + # specify all libraries that llcommon uses. + # llcommon uses `clock_gettime' which is provided by librt on linux. + set(LLCOMMON_LIBRARIES llcommon rt) +else (LINUX) + set(LLCOMMON_LIBRARIES llcommon) +endif (LINUX) diff --git a/linden/indra/llwindow/CMakeLists.txt b/linden/indra/llwindow/CMakeLists.txt index 5224163..ea81abf 100644 --- a/linden/indra/llwindow/CMakeLists.txt +++ b/linden/indra/llwindow/CMakeLists.txt @@ -59,6 +59,7 @@ set(viewer_HEADER_FILES set(llwindow_LINK_LIBRARIES ${UI_LIBRARIES} # for GTK ${SDL_LIBRARY} + fontconfig # For FCInit and other FC* functions. ) if (DARWIN) -- cgit v1.1 From 7ada43ada084f347648afa7bd5bec362ee04db54 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Fri, 12 Nov 2010 20:29:33 -0700 Subject: Fixed fontconfig library not being set for Linux-only --- linden/indra/cmake/ViewerMiscLibs.cmake | 8 +++++--- linden/indra/llwindow/CMakeLists.txt | 17 ++++++++++++----- 2 files changed, 17 insertions(+), 8 deletions(-) (limited to 'linden/indra') diff --git a/linden/indra/cmake/ViewerMiscLibs.cmake b/linden/indra/cmake/ViewerMiscLibs.cmake index 35f4e3a..38d0444 100644 --- a/linden/indra/cmake/ViewerMiscLibs.cmake +++ b/linden/indra/cmake/ViewerMiscLibs.cmake @@ -4,10 +4,12 @@ include(Prebuilt) if (NOT STANDALONE) use_prebuilt_binary(libuuid) use_prebuilt_binary(vivox) - if(LINUX AND ${ARCH} STREQUAL "x86_64") + if(LINUX) + if (${ARCH} STREQUAL "x86_64") use_prebuilt_binary(32bitcompatibilitylibs) - endif(LINUX AND ${ARCH} STREQUAL "x86_64") - use_prebuilt_binary(fontconfig) + endif (${ARCH} STREQUAL "x86_64") + use_prebuilt_binary(fontconfig) + endif(LINUX) else (NOT STANDALONE) # Download there even when using standalone. set(STANDALONE OFF) diff --git a/linden/indra/llwindow/CMakeLists.txt b/linden/indra/llwindow/CMakeLists.txt index ea81abf..98da751 100644 --- a/linden/indra/llwindow/CMakeLists.txt +++ b/linden/indra/llwindow/CMakeLists.txt @@ -56,11 +56,18 @@ set(viewer_HEADER_FILES # Libraries on which this library depends, needed for Linux builds # Sort by high-level to low-level -set(llwindow_LINK_LIBRARIES - ${UI_LIBRARIES} # for GTK - ${SDL_LIBRARY} - fontconfig # For FCInit and other FC* functions. - ) +if (LINUX) + set(llwindow_LINK_LIBRARIES + ${UI_LIBRARIES} # for GTK + ${SDL_LIBRARY} + fontconfig # For FCInit and other FC* functions. + ) +else (LINUX) + set(llwindow_LINK_LIBRARIES + ${UI_LIBRARIES} # for GTK + ${SDL_LIBRARY} + ) +endif (LINUX) if (DARWIN) list(APPEND llwindow_SOURCE_FILES -- cgit v1.1 From c5ae48b07410a977eb8799201225c5e58c4d8864 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Fri, 12 Nov 2010 20:43:06 -0700 Subject: Applied 8th batch of German translations from Eryn --- .../skins/default/xui/de/floater_command_line.xml | 42 +++ .../skins/default/xui/de/floater_telehub.xml | 6 +- .../default/xui/de/floater_teleport_history.xml | 35 +++ .../skins/default/xui/de/floater_texture_ctrl.xml | 28 +- .../newview/skins/default/xui/de/floater_tools.xml | 288 +++++++++++++-------- .../skins/default/xui/de/floater_top_objects.xml | 2 +- .../newview/skins/default/xui/de/floater_tos.xml | 19 +- .../skins/default/xui/de/floater_voice_license.xml | 18 ++ .../newview/skins/default/xui/de/floater_water.xml | 12 +- .../default/xui/de/floater_wearable_save_as.xml | 2 +- .../default/xui/de/floater_windlight_options.xml | 13 +- .../skins/default/xui/de/floater_world_map.xml | 26 +- 12 files changed, 348 insertions(+), 143 deletions(-) create mode 100644 linden/indra/newview/skins/default/xui/de/floater_command_line.xml create mode 100644 linden/indra/newview/skins/default/xui/de/floater_teleport_history.xml create mode 100644 linden/indra/newview/skins/default/xui/de/floater_voice_license.xml (limited to 'linden/indra') diff --git a/linden/indra/newview/skins/default/xui/de/floater_command_line.xml b/linden/indra/newview/skins/default/xui/de/floater_command_line.xml new file mode 100644 index 0000000..e3b2ec3 --- /dev/null +++ b/linden/indra/newview/skins/default/xui/de/floater_command_line.xml @@ -0,0 +1,42 @@ + + + Innerhalb des Sims teleportieren (Nutzung: cmd x y z) + + Zum Boden teleportieren (Nutzung: cmd) + + In Höhe teleportieren (Nutzung: cmd z) + + Nach Hause teleportieren (Nutzung: cmd) + + Eine Plattform schaffen (Nutzung: cmd 0 - 30) + + + Zu Sim x teleportieren (Nutzung: cmd simname) + + + math. Ausdruck rechnen (Nutzung: cmd SIN(2+2)) + + Wort zu Autokorrekt zufügen(Nutzung: cmd list|bad|good) + + Sichtweite ändern (Nutzung: cmd meters) + + Zur Kameraposition teleportieren (Nutzung: cmd) + + Avatarname von Schlüssel beziehen (Nutzung: cmd key) + + Avatar Teleport anbieten (Nutzung: cmd key) + + Zu Avatar teleportieren (Nutzung: cmd name) + + AO an/aus (Nutzung: cmd on/off) + + Chat-Historie löschen (Nutzung: cmd) + + Medien-URL bestimmen (Nutzung: cmd url type) + + Musik-URL bestimmen (Nutzung: cmd url) + +