aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llcommon
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/llcommon/CMakeLists.txt23
-rw-r--r--linden/indra/llcommon/imageids.h48
-rw-r--r--linden/indra/llcommon/indra_constants.h10
-rw-r--r--linden/indra/llcommon/linden_common.h19
-rw-r--r--linden/indra/llcommon/llapp.cpp2
-rw-r--r--linden/indra/llcommon/llapp.h13
-rw-r--r--linden/indra/llcommon/llapr.h21
-rw-r--r--linden/indra/llcommon/llassettype.h2
-rw-r--r--linden/indra/llcommon/llbase32.h2
-rw-r--r--linden/indra/llcommon/llbase64.h2
-rw-r--r--linden/indra/llcommon/llcommon.h2
-rw-r--r--linden/indra/llcommon/llcrc.h2
-rw-r--r--linden/indra/llcommon/llcriticaldamp.h2
-rw-r--r--linden/indra/llcommon/llcursortypes.h2
-rw-r--r--linden/indra/llcommon/lldate.h6
-rw-r--r--linden/indra/llcommon/llerror.cpp2
-rw-r--r--linden/indra/llcommon/llerror.h6
-rw-r--r--linden/indra/llcommon/llerrorcontrol.h46
-rw-r--r--linden/indra/llcommon/llerrorthread.cpp1
-rw-r--r--linden/indra/llcommon/llerrorthread.h2
-rw-r--r--linden/indra/llcommon/llevent.h10
-rw-r--r--linden/indra/llcommon/llfasttimer.cpp1
-rw-r--r--linden/indra/llcommon/llfasttimer.h4
-rw-r--r--linden/indra/llcommon/llfile.h10
-rw-r--r--linden/indra/llcommon/llfindlocale.h4
-rw-r--r--linden/indra/llcommon/llfixedbuffer.h2
-rw-r--r--linden/indra/llcommon/llformat.h2
-rw-r--r--linden/indra/llcommon/llframetimer.h2
-rw-r--r--linden/indra/llcommon/llheartbeat.h2
-rw-r--r--linden/indra/llcommon/llliveappconfig.h2
-rw-r--r--linden/indra/llcommon/lllivefile.h2
-rw-r--r--linden/indra/llcommon/lllog.h2
-rw-r--r--linden/indra/llcommon/llmd5.cpp1
-rw-r--r--linden/indra/llcommon/llmd5.h2
-rw-r--r--linden/indra/llcommon/llmemory.cpp13
-rw-r--r--linden/indra/llcommon/llmemory.h10
-rw-r--r--linden/indra/llcommon/llmemorystream.h4
-rw-r--r--linden/indra/llcommon/llmemtype.h2
-rw-r--r--linden/indra/llcommon/llmetrics.h2
-rw-r--r--linden/indra/llcommon/llmortician.h2
-rw-r--r--linden/indra/llcommon/llpreprocessor.h62
-rw-r--r--linden/indra/llcommon/llprocesslauncher.h2
-rw-r--r--linden/indra/llcommon/llqueuedthread.cpp1
-rw-r--r--linden/indra/llcommon/llqueuedthread.h4
-rw-r--r--linden/indra/llcommon/llrand.h12
-rw-r--r--linden/indra/llcommon/llrun.h6
-rw-r--r--linden/indra/llcommon/llsd.cpp12
-rw-r--r--linden/indra/llcommon/llsd.h4
-rw-r--r--linden/indra/llcommon/llsdserialize.h18
-rw-r--r--linden/indra/llcommon/llsdserialize_xml.cpp2
-rw-r--r--linden/indra/llcommon/llsdutil.h22
-rw-r--r--linden/indra/llcommon/llsecondlifeurls.h8
-rw-r--r--linden/indra/llcommon/llsimplehash.h2
-rw-r--r--linden/indra/llcommon/llstat.h14
-rw-r--r--linden/indra/llcommon/llstreamtools.h36
-rw-r--r--linden/indra/llcommon/llstring.h106
-rw-r--r--linden/indra/llcommon/llstringtable.h8
-rw-r--r--linden/indra/llcommon/llsys.h18
-rw-r--r--linden/indra/llcommon/llthread.h12
-rw-r--r--linden/indra/llcommon/lltimer.cpp4
-rw-r--r--linden/indra/llcommon/lltimer.h29
-rw-r--r--linden/indra/llcommon/lluri.h4
-rw-r--r--linden/indra/llcommon/lluuid.h9
-rw-r--r--linden/indra/llcommon/llworkerthread.h4
-rw-r--r--linden/indra/llcommon/metaclass.h2
-rw-r--r--linden/indra/llcommon/metaproperty.h2
-rw-r--r--linden/indra/llcommon/reflective.h2
-rw-r--r--linden/indra/llcommon/timing.h2
-rw-r--r--linden/indra/llcommon/u64.h10
69 files changed, 380 insertions, 329 deletions
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)
4 4
5include(00-Common) 5include(00-Common)
6include(LLCommon) 6include(LLCommon)
7include(Linking)
7 8
8include_directories( 9include_directories(
9 ${EXPAT_INCLUDE_DIRS} 10 ${EXPAT_INCLUDE_DIRS}
@@ -192,31 +193,13 @@ set_source_files_properties(${llcommon_HEADER_FILES}
192 193
193list(APPEND llcommon_SOURCE_FILES ${llcommon_HEADER_FILES}) 194list(APPEND llcommon_SOURCE_FILES ${llcommon_HEADER_FILES})
194 195
195add_library (llcommon ${llcommon_SOURCE_FILES}) 196add_library (llcommon SHARED ${llcommon_SOURCE_FILES})
196target_link_libraries( 197target_link_libraries(
197 llcommon 198 llcommon
198 ${APRUTIL_LIBRARIES} 199 ${APRUTIL_LIBRARIES}
199 ${APR_LIBRARIES} 200 ${APR_LIBRARIES}
200 ${EXPAT_LIBRARIES} 201 ${EXPAT_LIBRARIES}
201 ${ZLIB_LIBRARIES} 202 ${ZLIB_LIBRARIES}
203 ${WINDOWS_LIBRARIES}
202 ) 204 )
203 205
204if(HAVE_64_BIT)
205 add_library (llcommonPIC ${llcommon_SOURCE_FILES})
206 add_dependencies(llcommonPIC prepare)
207
208 if(WINDOWS)
209 add_definitions(/FIXED:NO)
210 else(WINDOWS) # not windows therefore gcc LINUX and DARWIN
211 add_definitions(-fPIC)
212 endif(WINDOWS)
213
214 target_link_libraries(
215 llcommonPIC
216 ${APRUTIL_LIBRARIES}
217 ${APR_LIBRARIES}
218 ${EXPAT_LIBRARIES}
219 ${ZLIB_LIBRARIES}
220 )
221endif(HAVE_64_BIT)
222
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 @@
41 41
42class LLUUID; 42class LLUUID;
43 43
44extern const LLUUID IMG_SMOKE; 44LL_COMMON_API extern const LLUUID IMG_SMOKE;
45 45
46extern const LLUUID IMG_DEFAULT; 46LL_COMMON_API extern const LLUUID IMG_DEFAULT;
47 47
48extern const LLUUID IMG_SUN; 48LL_COMMON_API extern const LLUUID IMG_SUN;
49extern const LLUUID IMG_MOON; 49LL_COMMON_API extern const LLUUID IMG_MOON;
50extern const LLUUID IMG_CLOUD_POOF; 50LL_COMMON_API extern const LLUUID IMG_CLOUD_POOF;
51extern const LLUUID IMG_SHOT; 51LL_COMMON_API extern const LLUUID IMG_SHOT;
52extern const LLUUID IMG_SPARK; 52LL_COMMON_API extern const LLUUID IMG_SPARK;
53extern const LLUUID IMG_FIRE; 53LL_COMMON_API extern const LLUUID IMG_FIRE;
54extern const LLUUID IMG_FACE_SELECT; 54LL_COMMON_API extern const LLUUID IMG_FACE_SELECT;
55extern const LLUUID IMG_DEFAULT_AVATAR; 55LL_COMMON_API extern const LLUUID IMG_DEFAULT_AVATAR;
56extern const LLUUID IMG_INVISIBLE; 56LL_COMMON_API extern const LLUUID IMG_INVISIBLE;
57 57
58extern const LLUUID IMG_EXPLOSION; 58LL_COMMON_API extern const LLUUID IMG_EXPLOSION;
59extern const LLUUID IMG_EXPLOSION_2; 59LL_COMMON_API extern const LLUUID IMG_EXPLOSION_2;
60extern const LLUUID IMG_EXPLOSION_3; 60LL_COMMON_API extern const LLUUID IMG_EXPLOSION_3;
61extern const LLUUID IMG_EXPLOSION_4; 61LL_COMMON_API extern const LLUUID IMG_EXPLOSION_4;
62extern const LLUUID IMG_SMOKE_POOF; 62LL_COMMON_API extern const LLUUID IMG_SMOKE_POOF;
63 63
64extern const LLUUID IMG_BIG_EXPLOSION_1; 64LL_COMMON_API extern const LLUUID IMG_BIG_EXPLOSION_1;
65extern const LLUUID IMG_BIG_EXPLOSION_2; 65LL_COMMON_API extern const LLUUID IMG_BIG_EXPLOSION_2;
66 66
67extern const LLUUID IMG_BLOOM1; 67LL_COMMON_API extern const LLUUID IMG_BLOOM1;
68extern const LLUUID TERRAIN_DIRT_DETAIL; 68LL_COMMON_API extern const LLUUID TERRAIN_DIRT_DETAIL;
69extern const LLUUID TERRAIN_GRASS_DETAIL; 69LL_COMMON_API extern const LLUUID TERRAIN_GRASS_DETAIL;
70extern const LLUUID TERRAIN_MOUNTAIN_DETAIL; 70LL_COMMON_API extern const LLUUID TERRAIN_MOUNTAIN_DETAIL;
71extern const LLUUID TERRAIN_ROCK_DETAIL; 71LL_COMMON_API extern const LLUUID TERRAIN_ROCK_DETAIL;
72 72
73extern const LLUUID DEFAULT_WATER_NORMAL; 73LL_COMMON_API extern const LLUUID DEFAULT_WATER_NORMAL;
74 74
75#endif 75#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;
263const U8 GOD_NOT = 0; 263const U8 GOD_NOT = 0;
264 264
265// "agent id" for things that should be done to ALL agents 265// "agent id" for things that should be done to ALL agents
266extern const LLUUID LL_UUID_ALL_AGENTS; 266LL_COMMON_API extern const LLUUID LL_UUID_ALL_AGENTS;
267 267
268// inventory library owner 268// inventory library owner
269extern const LLUUID ALEXANDRIA_LINDEN_ID; 269LL_COMMON_API extern const LLUUID ALEXANDRIA_LINDEN_ID;
270 270
271extern const LLUUID GOVERNOR_LINDEN_ID; 271LL_COMMON_API extern const LLUUID GOVERNOR_LINDEN_ID;
272extern const LLUUID REALESTATE_LINDEN_ID; 272LL_COMMON_API extern const LLUUID REALESTATE_LINDEN_ID;
273// Maintenance's group id. 273// Maintenance's group id.
274extern const LLUUID MAINTENANCE_GROUP_ID; 274LL_COMMON_API extern const LLUUID MAINTENANCE_GROUP_ID;
275 275
276// Flags for kick message 276// Flags for kick message
277const U32 KICK_FLAGS_DEFAULT = 0x0; 277const 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 @@
51#include <cstdio> 51#include <cstdio>
52#include <cstdlib> 52#include <cstdlib>
53#include <ctime> 53#include <ctime>
54#include <iostream> 54#include <iosfwd>
55#include <fstream>
56 55
57// Work Microsoft compiler warnings 56// Work around Microsoft compiler warnings in STL headers
58#ifdef LL_WINDOWS 57#ifdef LL_WINDOWS
59#pragma warning (disable : 4702) // unreachable code 58#pragma warning (disable : 4702) // unreachable code
60#pragma warning (disable : 4244) // conversion from time_t to S32 59#pragma warning (disable : 4244) // conversion from time_t to S32
61#endif // LL_WINDOWS 60#endif // LL_WINDOWS
62 61
63#include <algorithm> 62// *TODO: Eliminate these, most library .cpp files don't need them.
63// Add them to llviewerprecompiledheaders.h if necessary.
64#include <list> 64#include <list>
65#include <map> 65#include <map>
66#include <vector> 66#include <vector>
@@ -76,18 +76,21 @@
76#pragma warning (disable : 4512) // assignment operator could not be generated 76#pragma warning (disable : 4512) // assignment operator could not be generated
77#pragma warning (disable : 4706) // assignment within conditional (even if((x = y)) ) 77#pragma warning (disable : 4706) // assignment within conditional (even if((x = y)) )
78#pragma warning (disable : 4265) // boost 1.36.0, non-virtual destructor in boost::exception_detail::* 78#pragma warning (disable : 4265) // boost 1.36.0, non-virtual destructor in boost::exception_detail::*
79
80// Reenable warnings we disabled above
81#pragma warning (3 : 4702) // unreachable code, we like level 3, not 4
82// moved msvc warnings to llpreprocessor.h *TODO - delete this comment after merge conflicts are unlikely -brad
79#endif // LL_WINDOWS 83#endif // LL_WINDOWS
80 84
81// Linden only libs in alpha-order other than stdtypes.h 85// Linden only libs in alpha-order other than stdtypes.h
86// *NOTE: Please keep includes here to a minimum, see above.
82#include "stdtypes.h" 87#include "stdtypes.h"
83#include "lldefs.h" 88#include "lldefs.h"
84#include "llerror.h" 89#include "llerror.h"
85#include "llextendedstatus.h" 90#include "llextendedstatus.h"
86#include "llfasttimer.h" 91// Don't do this, adds 15K lines of header code to every library file.
92//#include "llfasttimer.h"
87#include "llfile.h" 93#include "llfile.h"
88#include "llformat.h" 94#include "llformat.h"
89#include "llstring.h"
90#include "llsys.h"
91#include "lltimer.h"
92 95
93#endif 96#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()
420int LLApp::getPid() 420int LLApp::getPid()
421{ 421{
422#if LL_WINDOWS 422#if LL_WINDOWS
423 return 0; 423 return GetCurrentProcessId();
424#else 424#else
425 return getpid(); 425 return getpid();
426#endif 426#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 @@
34#define LL_LLAPP_H 34#define LL_LLAPP_H
35 35
36#include <map> 36#include <map>
37#include "llapr.h"
38#include "llrun.h" 37#include "llrun.h"
39#include "llsd.h" 38#include "llsd.h"
40 39
41// Forward declarations 40// Forward declarations
41template <typename Type> class LLAtomic32;
42typedef LLAtomic32<U32> LLAtomicU32;
42class LLErrorThread; 43class LLErrorThread;
43class LLApp; 44class LLLiveFile;
44 45#if LL_LINUX
46typedef struct siginfo siginfo_t;
47#endif
45 48
46typedef void (*LLAppErrorHandler)(); 49typedef void (*LLAppErrorHandler)();
47typedef void (*LLAppChildCallback)(int pid, bool exited, int status); 50typedef void (*LLAppChildCallback)(int pid, bool exited, int status);
@@ -62,7 +65,7 @@ public:
62}; 65};
63#endif 66#endif
64 67
65class LLApp 68class LL_COMMON_API LLApp
66{ 69{
67 friend class LLErrorThread; 70 friend class LLErrorThread;
68public: 71public:
@@ -189,8 +192,6 @@ public:
189#if !LL_WINDOWS 192#if !LL_WINDOWS
190 static U32 getSigChildCount(); 193 static U32 getSigChildCount();
191 static void incSigChildCount(); 194 static void incSigChildCount();
192#else
193#define getpid GetCurrentProcessId
194#endif 195#endif
195 static int getPid(); 196 static int getPid();
196 197
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 @@
48#include "apr_atomic.h" 48#include "apr_atomic.h"
49#include "llstring.h" 49#include "llstring.h"
50 50
51extern apr_thread_mutex_t* gLogMutexp; 51extern LL_COMMON_API apr_thread_mutex_t* gLogMutexp;
52extern apr_thread_mutex_t* gCallStacksLogMutexp;
53 52
54/** 53/**
55 * @brief initialize the common apr constructs -- apr itself, the 54 * @brief initialize the common apr constructs -- apr itself, the
56 * global pool, and a mutex. 55 * global pool, and a mutex.
57 */ 56 */
58void ll_init_apr(); 57void LL_COMMON_API ll_init_apr();
59 58
60/** 59/**
61 * @brief Cleanup those common apr constructs. 60 * @brief Cleanup those common apr constructs.
62 */ 61 */
63void ll_cleanup_apr(); 62void LL_COMMON_API ll_cleanup_apr();
64 63
65// 64//
66//LL apr_pool 65//LL apr_pool
67//manage apr_pool_t, destroy allocated apr_pool in the destruction function. 66//manage apr_pool_t, destroy allocated apr_pool in the destruction function.
68// 67//
69class LLAPRPool 68class LL_COMMON_API LLAPRPool
70{ 69{
71public: 70public:
72 LLAPRPool(apr_pool_t *parent = NULL, apr_size_t size = 0, BOOL releasePoolFlag = TRUE) ; 71 LLAPRPool(apr_pool_t *parent = NULL, apr_size_t size = 0, BOOL releasePoolFlag = TRUE) ;
@@ -92,7 +91,7 @@ protected:
92//which clears memory automatically. 91//which clears memory automatically.
93//so it can not hold static data or data after memory is cleared 92//so it can not hold static data or data after memory is cleared
94// 93//
95class LLVolatileAPRPool : protected LLAPRPool 94class LL_COMMON_API LLVolatileAPRPool : protected LLAPRPool
96{ 95{
97public: 96public:
98 LLVolatileAPRPool(apr_pool_t *parent = NULL, apr_size_t size = 0, BOOL releasePoolFlag = TRUE); 97 LLVolatileAPRPool(apr_pool_t *parent = NULL, apr_size_t size = 0, BOOL releasePoolFlag = TRUE);
@@ -126,7 +125,7 @@ private:
126 * destructor handles the unlock. Instances of this class are 125 * destructor handles the unlock. Instances of this class are
127 * <b>not</b> thread safe. 126 * <b>not</b> thread safe.
128 */ 127 */
129class LLScopedLock : private boost::noncopyable 128class LL_COMMON_API LLScopedLock : private boost::noncopyable
130{ 129{
131public: 130public:
132 /** 131 /**
@@ -201,7 +200,7 @@ typedef LLAtomic32<S32> LLAtomicS32;
201// 2, a global pool. 200// 2, a global pool.
202// 201//
203 202
204class LLAPRFile : boost::noncopyable 203class LL_COMMON_API LLAPRFile : boost::noncopyable
205{ 204{
206 // make this non copyable since a copy closes the file 205 // make this non copyable since a copy closes the file
207private: 206private:
@@ -257,10 +256,10 @@ public:
257 * APR_SUCCESS. 256 * APR_SUCCESS.
258 * @return Returns <code>true</code> if status is an error condition. 257 * @return Returns <code>true</code> if status is an error condition.
259 */ 258 */
260bool ll_apr_warn_status(apr_status_t status); 259bool LL_COMMON_API ll_apr_warn_status(apr_status_t status);
261 260
262void ll_apr_assert_status(apr_status_t status); 261void LL_COMMON_API ll_apr_assert_status(apr_status_t status);
263 262
264extern "C" apr_pool_t* gAPRPoolp; // Global APR memory pool 263extern "C" LL_COMMON_API apr_pool_t* gAPRPoolp; // Global APR memory pool
265 264
266#endif // LL_LLAPR_H 265#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 @@
37 37
38#include "stdenums.h" // for EDragAndDropType 38#include "stdenums.h" // for EDragAndDropType
39 39
40class LLAssetType 40class LL_COMMON_API LLAssetType
41{ 41{
42public: 42public:
43 enum EType 43 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 @@
34#ifndef LLBASE32_H 34#ifndef LLBASE32_H
35#define LLBASE32_h 35#define LLBASE32_h
36 36
37class LLBase32 37class LL_COMMON_API LLBase32
38{ 38{
39public: 39public:
40 static std::string encode(const U8* input, size_t input_size); 40 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 @@
34#ifndef LLBASE64_H 34#ifndef LLBASE64_H
35#define LLBASE64_h 35#define LLBASE64_h
36 36
37class LLBase64 37class LL_COMMON_API LLBase64
38{ 38{
39public: 39public:
40 static std::string encode(const U8* input, size_t input_size); 40 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 @@
38#include "lltimer.h" 38#include "lltimer.h"
39#include "llfile.h" 39#include "llfile.h"
40 40
41class LLCommon 41class LL_COMMON_API LLCommon
42{ 42{
43public: 43public:
44 static void initClass(); 44 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 @@
50// llinfos << "File crc: " << crc.getCRC() << llendl; 50// llinfos << "File crc: " << crc.getCRC() << llendl;
51//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 51//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
52 52
53class LLCRC 53class LL_COMMON_API LLCRC
54{ 54{
55protected: 55protected:
56 U32 mCurrent; 56 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 @@
38 38
39#include "llframetimer.h" 39#include "llframetimer.h"
40 40
41class LLCriticalDamp 41class LL_COMMON_API LLCriticalDamp
42{ 42{
43public: 43public:
44 LLCriticalDamp(); 44 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 {
77 UI_CURSOR_COUNT // Number of elements in this enum (NOT a cursor) 77 UI_CURSOR_COUNT // Number of elements in this enum (NOT a cursor)
78}; 78};
79 79
80ECursorType getCursorFromString(const std::string& cursor_string); 80LL_COMMON_API ECursorType getCursorFromString(const std::string& cursor_string);
81 81
82#endif // LL_LLCURSORTYPES_H 82#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 @@
46 * 46 *
47 * The date class represents a point in time after epoch - 1970-01-01. 47 * The date class represents a point in time after epoch - 1970-01-01.
48 */ 48 */
49class LLDate 49class LL_COMMON_API LLDate
50{ 50{
51public: 51public:
52 /** 52 /**
@@ -153,9 +153,9 @@ private:
153}; 153};
154 154
155// Helper function to stream out a date 155// Helper function to stream out a date
156std::ostream& operator<<(std::ostream& s, const LLDate& date); 156LL_COMMON_API std::ostream& operator<<(std::ostream& s, const LLDate& date);
157 157
158// Helper function to stream in a date 158// Helper function to stream in a date
159std::istream& operator>>(std::istream& s, LLDate& date); 159LL_COMMON_API std::istream& operator>>(std::istream& s, LLDate& date);
160 160
161#endif // LL_LLDATE_H 161#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 @@
58#include "llsd.h" 58#include "llsd.h"
59#include "llsdserialize.h" 59#include "llsdserialize.h"
60#include "llstl.h" 60#include "llstl.h"
61#include "lltimer.h"
61 62
63extern apr_thread_mutex_t* gCallStacksLogMutexp;
62 64
63namespace { 65namespace {
64#if !LL_WINDOWS 66#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
131 131
132 class CallSite; 132 class CallSite;
133 133
134 class Log 134 class LL_COMMON_API Log
135 { 135 {
136 public: 136 public:
137 static bool shouldLog(CallSite&); 137 static bool shouldLog(CallSite&);
@@ -140,7 +140,7 @@ namespace LLError
140 static void flush(std::ostringstream*, const CallSite&); 140 static void flush(std::ostringstream*, const CallSite&);
141 }; 141 };
142 142
143 class CallSite 143 class LL_COMMON_API CallSite
144 { 144 {
145 // Represents a specific place in the code where a message is logged 145 // Represents a specific place in the code where a message is logged
146 // This is public because it is used by the macros below. It is not 146 // This is public because it is used by the macros below. It is not
@@ -189,7 +189,7 @@ namespace LLError
189 //LLCallStacks is designed not to be thread-safe. 189 //LLCallStacks is designed not to be thread-safe.
190 //so try not to use it in multiple parallel threads at same time. 190 //so try not to use it in multiple parallel threads at same time.
191 //Used in a single thread at a time is fine. 191 //Used in a single thread at a time is fine.
192 class LLCallStacks 192 class LL_COMMON_API LLCallStacks
193 { 193 {
194 private: 194 private:
195 static char** sBuffer ; 195 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;
52 52
53namespace LLError 53namespace LLError
54{ 54{
55 void initForServer(const std::string& identity); 55 LL_COMMON_API void initForServer(const std::string& identity);
56 // resets all logging settings to defaults needed by server processes 56 // resets all logging settings to defaults needed by server processes
57 // logs to stderr, syslog, and windows debug log 57 // logs to stderr, syslog, and windows debug log
58 // the identity string is used for in the syslog 58 // the identity string is used for in the syslog
59 59
60 void initForApplication(const std::string& dir); 60 LL_COMMON_API void initForApplication(const std::string& dir);
61 // resets all logging settings to defaults needed by applicaitons 61 // resets all logging settings to defaults needed by applicaitons
62 // logs to stderr and windows debug log 62 // logs to stderr and windows debug log
63 // sets up log configuration from the file logcontrol.xml in dir 63 // sets up log configuration from the file logcontrol.xml in dir
@@ -68,14 +68,14 @@ namespace LLError
68 Setting a level means log messages at that level or above. 68 Setting a level means log messages at that level or above.
69 */ 69 */
70 70
71 void setPrintLocation(bool); 71 LL_COMMON_API void setPrintLocation(bool);
72 void setDefaultLevel(LLError::ELevel); 72 LL_COMMON_API void setDefaultLevel(LLError::ELevel);
73 void setFunctionLevel(const std::string& function_name, LLError::ELevel); 73 LL_COMMON_API void setFunctionLevel(const std::string& function_name, LLError::ELevel);
74 void setClassLevel(const std::string& class_name, LLError::ELevel); 74 LL_COMMON_API void setClassLevel(const std::string& class_name, LLError::ELevel);
75 void setFileLevel(const std::string& file_name, LLError::ELevel); 75 LL_COMMON_API void setFileLevel(const std::string& file_name, LLError::ELevel);
76 void setTagLevel(const std::string& file_name, LLError::ELevel); 76 LL_COMMON_API void setTagLevel(const std::string& file_name, LLError::ELevel);
77 77
78 void configure(const LLSD&); 78 LL_COMMON_API void configure(const LLSD&);
79 // the LLSD can configure all of the settings 79 // the LLSD can configure all of the settings
80 // usually read automatically from the live errorlog.xml file 80 // usually read automatically from the live errorlog.xml file
81 81
@@ -85,25 +85,25 @@ namespace LLError
85 */ 85 */
86 86
87 typedef void(*FatalFunction)(const std::string& message); 87 typedef void(*FatalFunction)(const std::string& message);
88 void crashAndLoop(const std::string& message); 88 LL_COMMON_API void crashAndLoop(const std::string& message);
89 // Default fatal funtion: access null pointer and loops forever 89 // Default fatal funtion: access null pointer and loops forever
90 90
91 void setFatalFunction(FatalFunction); 91 LL_COMMON_API void setFatalFunction(FatalFunction);
92 // The fatal function will be called when an message of LEVEL_ERROR 92 // The fatal function will be called when an message of LEVEL_ERROR
93 // is logged. Note: supressing a LEVEL_ERROR message from being logged 93 // is logged. Note: supressing a LEVEL_ERROR message from being logged
94 // (by, for example, setting a class level to LEVEL_NONE), will keep 94 // (by, for example, setting a class level to LEVEL_NONE), will keep
95 // the that message from causing the fatal funciton to be invoked. 95 // the that message from causing the fatal funciton to be invoked.
96 96
97 typedef std::string (*TimeFunction)(); 97 typedef std::string (*TimeFunction)();
98 std::string utcTime(); 98 LL_COMMON_API std::string utcTime();
99 99
100 void setTimeFunction(TimeFunction); 100 LL_COMMON_API void setTimeFunction(TimeFunction);
101 // The function is use to return the current time, formatted for 101 // The function is use to return the current time, formatted for
102 // display by those error recorders that want the time included. 102 // display by those error recorders that want the time included.
103 103
104 104
105 105
106 class Recorder 106 class LL_COMMON_API Recorder
107 { 107 {
108 // An object that handles the actual output or error messages. 108 // An object that handles the actual output or error messages.
109 public: 109 public:
@@ -117,17 +117,17 @@ namespace LLError
117 // included in the text of the message 117 // included in the text of the message
118 }; 118 };
119 119
120 void addRecorder(Recorder*); 120 LL_COMMON_API void addRecorder(Recorder*);
121 void removeRecorder(Recorder*); 121 LL_COMMON_API void removeRecorder(Recorder*);
122 // each error message is passed to each recorder via recordMessage() 122 // each error message is passed to each recorder via recordMessage()
123 123
124 void logToFile(const std::string& filename); 124 LL_COMMON_API void logToFile(const std::string& filename);
125 void logToFixedBuffer(LLFixedBuffer*); 125 LL_COMMON_API void logToFixedBuffer(LLFixedBuffer*);
126 // Utilities to add recorders for logging to a file or a fixed buffer 126 // Utilities to add recorders for logging to a file or a fixed buffer
127 // A second call to the same function will remove the logger added 127 // A second call to the same function will remove the logger added
128 // with the first. 128 // with the first.
129 // Passing the empty string or NULL to just removes any prior. 129 // Passing the empty string or NULL to just removes any prior.
130 std::string logFileName(); 130 LL_COMMON_API std::string logFileName();
131 // returns name of current logging file, empty string if none 131 // returns name of current logging file, empty string if none
132 132
133 133
@@ -136,11 +136,11 @@ namespace LLError
136 */ 136 */
137 137
138 class Settings; 138 class Settings;
139 Settings* saveAndResetSettings(); 139 LL_COMMON_API Settings* saveAndResetSettings();
140 void restoreSettings(Settings *); 140 LL_COMMON_API void restoreSettings(Settings *);
141 141
142 std::string abbreviateFile(const std::string& filePath); 142 LL_COMMON_API std::string abbreviateFile(const std::string& filePath);
143 int shouldLogCallCount(); 143 LL_COMMON_API int shouldLogCallCount();
144 144
145}; 145};
146 146
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 @@
32#include "linden_common.h" 32#include "linden_common.h"
33#include "llerrorthread.h" 33#include "llerrorthread.h"
34#include "llapp.h" 34#include "llapp.h"
35#include "lltimer.h"
35 36
36LLErrorThread::LLErrorThread() 37LLErrorThread::LLErrorThread()
37 : LLThread("Error"), 38 : 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 @@
35 35
36#include "llthread.h" 36#include "llthread.h"
37 37
38class LLErrorThread : public LLThread 38class LL_COMMON_API LLErrorThread : public LLThread
39{ 39{
40public: 40public:
41 LLErrorThread(); 41 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;
44class LLObservable; 44class LLObservable;
45 45
46// Abstract event. All events derive from LLEvent 46// Abstract event. All events derive from LLEvent
47class LLEvent : public LLThreadSafeRefCount 47class LL_COMMON_API LLEvent : public LLThreadSafeRefCount
48{ 48{
49protected: 49protected:
50 virtual ~LLEvent(); 50 virtual ~LLEvent();
@@ -72,7 +72,7 @@ private:
72}; 72};
73 73
74// Abstract listener. All listeners derive from LLEventListener 74// Abstract listener. All listeners derive from LLEventListener
75class LLEventListener : public LLThreadSafeRefCount 75class LL_COMMON_API LLEventListener : public LLThreadSafeRefCount
76{ 76{
77protected: 77protected:
78 virtual ~LLEventListener(); 78 virtual ~LLEventListener();
@@ -89,7 +89,7 @@ public:
89}; 89};
90 90
91// A listener which tracks references to it and cleans up when it's deallocated 91// A listener which tracks references to it and cleans up when it's deallocated
92class LLSimpleListener : public LLEventListener 92class LL_COMMON_API LLSimpleListener : public LLEventListener
93{ 93{
94public: 94public:
95 void clearDispatchers(); 95 void clearDispatchers();
@@ -114,7 +114,7 @@ struct LLListenerEntry
114// Base class for a dispatcher - an object which listens 114// Base class for a dispatcher - an object which listens
115// to events being fired and relays them to their 115// to events being fired and relays them to their
116// appropriate destinations. 116// appropriate destinations.
117class LLEventDispatcher : public LLThreadSafeRefCount 117class LL_COMMON_API LLEventDispatcher : public LLThreadSafeRefCount
118{ 118{
119protected: 119protected:
120 virtual ~LLEventDispatcher(); 120 virtual ~LLEventDispatcher();
@@ -157,7 +157,7 @@ private:
157// In order for this class to work properly, it needs 157// In order for this class to work properly, it needs
158// an instance of an LLEventDispatcher to route events to their 158// an instance of an LLEventDispatcher to route events to their
159// listeners. 159// listeners.
160class LLObservable 160class LL_COMMON_API LLObservable
161{ 161{
162public: 162public:
163 // Initialize with the default Dispatcher 163 // 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 @@
42#include <sched.h> 42#include <sched.h>
43#elif LL_DARWIN 43#elif LL_DARWIN
44#include <sys/time.h> 44#include <sys/time.h>
45#include "lltimer.h" // get_clock_count()
45#else 46#else
46#error "architecture not supported" 47#error "architecture not supported"
47#endif 48#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 @@
35 35
36#define FAST_TIMER_ON 1 36#define FAST_TIMER_ON 1
37 37
38U64 get_cpu_clock_count(); 38LL_COMMON_API U64 get_cpu_clock_count();
39 39
40class LLFastTimer 40class LL_COMMON_API LLFastTimer
41{ 41{
42public: 42public:
43 enum EFastTimerType 43 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;
70 70
71#include "llstring.h" // safe char* -> std::string conversion 71#include "llstring.h" // safe char* -> std::string conversion
72 72
73class LLFile 73class LL_COMMON_API LLFile
74{ 74{
75public: 75public:
76 // All these functions take UTF8 path/filenames. 76 // All these functions take UTF8 path/filenames.
@@ -95,7 +95,7 @@ public:
95 95
96#if USE_LLFILESTREAMS 96#if USE_LLFILESTREAMS
97 97
98class llifstream : public std::basic_istream < char , std::char_traits < char > > 98class LL_COMMON_API llifstream : public std::basic_istream < char , std::char_traits < char > >
99{ 99{
100 // input stream associated with a C stream 100 // input stream associated with a C stream
101public: 101public:
@@ -136,7 +136,7 @@ private:
136}; 136};
137 137
138 138
139class llofstream : public std::basic_ostream< char , std::char_traits < char > > 139class LL_COMMON_API llofstream : public std::basic_ostream< char , std::char_traits < char > >
140{ 140{
141public: 141public:
142 typedef std::basic_ostream< char , std::char_traits < char > > _Myt; 142 typedef std::basic_ostream< char , std::char_traits < char > > _Myt;
@@ -185,7 +185,7 @@ private:
185//#define llifstream std::ifstream 185//#define llifstream std::ifstream
186//#define llofstream std::ofstream 186//#define llofstream std::ofstream
187 187
188class llifstream : public std::ifstream 188class LL_COMMON_API llifstream : public std::ifstream
189{ 189{
190public: 190public:
191 llifstream() : std::ifstream() 191 llifstream() : std::ifstream()
@@ -203,7 +203,7 @@ public:
203}; 203};
204 204
205 205
206class llofstream : public std::ofstream 206class LL_COMMON_API llofstream : public std::ofstream
207{ 207{
208public: 208public:
209 llofstream() : std::ofstream() 209 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 {
59/* This allocates/fills in a FL_Locale structure with pointers to 59/* This allocates/fills in a FL_Locale structure with pointers to
60 strings (which should be treated as static), or NULL for inappropriate / 60 strings (which should be treated as static), or NULL for inappropriate /
61 undetected fields. */ 61 undetected fields. */
62FL_Success FL_FindLocale(FL_Locale **locale, FL_Domain domain); 62LL_COMMON_API FL_Success FL_FindLocale(FL_Locale **locale, FL_Domain domain);
63/* This should be used to free the struct written by FL_FindLocale */ 63/* This should be used to free the struct written by FL_FindLocale */
64void FL_FreeLocale(FL_Locale **locale); 64LL_COMMON_API void FL_FreeLocale(FL_Locale **locale);
65 65
66#endif /*__findlocale_h_*/ 66#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 @@
41 41
42// Fixed size buffer for console output and other things. 42// Fixed size buffer for console output and other things.
43 43
44class LLFixedBuffer 44class LL_COMMON_API LLFixedBuffer
45{ 45{
46public: 46public:
47 LLFixedBuffer(const U32 max_lines = 20); 47 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 @@
40// *NOTE: buffer limited to 1024, (but vsnprintf prevents overrun) 40// *NOTE: buffer limited to 1024, (but vsnprintf prevents overrun)
41// should perhaps be replaced with boost::format. 41// should perhaps be replaced with boost::format.
42 42
43std::string llformat(const char *fmt, ...); 43LL_COMMON_API std::string llformat(const char *fmt, ...);
44 44
45#endif // LL_LLFORMAT_H 45#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 @@
43#include "lltimer.h" 43#include "lltimer.h"
44#include "timing.h" 44#include "timing.h"
45 45
46class LLFrameTimer 46class LL_COMMON_API LLFrameTimer
47{ 47{
48public: 48public:
49 LLFrameTimer() : mStartTime( sFrameTime ), mExpiry(0), mStarted(TRUE) {} 49 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 @@
40// Note: Win32 does not support the heartbeat/smackdown system; 40// Note: Win32 does not support the heartbeat/smackdown system;
41// heartbeat-delivery turns into a no-op there. 41// heartbeat-delivery turns into a no-op there.
42 42
43class LLHeartbeat 43class LL_COMMON_API LLHeartbeat
44{ 44{
45public: 45public:
46 // secs_between_heartbeat: after a heartbeat is successfully delivered, 46 // 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 @@
37 37
38class LLApp; 38class LLApp;
39 39
40class LLLiveAppConfig : public LLLiveFile 40class LL_COMMON_API LLLiveAppConfig : public LLLiveFile
41{ 41{
42public: 42public:
43 // To use this, instantiate a LLLiveAppConfig object inside your main loop. 43 // 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 @@
36const F32 configFileRefreshRate = 5.0; // seconds 36const F32 configFileRefreshRate = 5.0; // seconds
37 37
38 38
39class LLLiveFile 39class LL_COMMON_API LLLiveFile
40{ 40{
41public: 41public:
42 LLLiveFile(const std::string &filename, const F32 refresh_period = 5.f); 42 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;
41class LLApp; 41class LLApp;
42class LLSD; 42class LLSD;
43 43
44class LLLog 44class LL_COMMON_API LLLog
45{ 45{
46public: 46public:
47 LLLog(LLApp* app); 47 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.
83#include "llmd5.h" 83#include "llmd5.h"
84 84
85#include <cassert> 85#include <cassert>
86#include <iostream>
86 87
87// how many bytes to grab at a time when checking files 88// how many bytes to grab at a time when checking files
88const int LLMD5::BLOCK_LEN = 4096; 89const 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;
80const int MD5HEX_STR_SIZE = 33; // char hex[MD5HEX_STR_SIZE]; with null 80const int MD5HEX_STR_SIZE = 33; // char hex[MD5HEX_STR_SIZE]; with null
81const int MD5HEX_STR_BYTES = 32; // message system fixed size 81const int MD5HEX_STR_BYTES = 32; // message system fixed size
82 82
83class LLMD5 { 83class LL_COMMON_API LLMD5 {
84// first, some types: 84// first, some types:
85 typedef unsigned int uint4; // assumes integer is 4 words long 85 typedef unsigned int uint4; // assumes integer is 4 words long
86 typedef unsigned short int uint2; // assumes short integer is 2 words long 86 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() :
283{ 283{
284} 284}
285 285
286LLRefCount::LLRefCount(const LLRefCount& other)
287: mRef(0)
288{
289}
290
286LLRefCount::~LLRefCount() 291LLRefCount::~LLRefCount()
287{ 292{
288 if (mRef != 0) 293 if (mRef != 0)
@@ -290,7 +295,13 @@ LLRefCount::~LLRefCount()
290 llerrs << "deleting non-zero reference" << llendl; 295 llerrs << "deleting non-zero reference" << llendl;
291 } 296 }
292} 297}
293 298
299LLRefCount& LLRefCount::operator=(const LLRefCount&)
300{
301 // do nothing, since ref count is specific to *this* reference
302 return *this;
303}
304
294//---------------------------------------------------------------------------- 305//----------------------------------------------------------------------------
295 306
296#if defined(LL_WINDOWS) 307#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;
45 45
46//---------------------------------------------------------------------------- 46//----------------------------------------------------------------------------
47 47
48class LLMemory 48class LL_COMMON_API LLMemory
49{ 49{
50public: 50public:
51 static void initClass(); 51 static void initClass();
@@ -68,12 +68,12 @@ private:
68 68
69//---------------------------------------------------------------------------- 69//----------------------------------------------------------------------------
70 70
71class LLRefCount 71class LL_COMMON_API LLRefCount
72{ 72{
73protected: 73protected:
74 LLRefCount(const LLRefCount&); // not implemented 74 LLRefCount(const LLRefCount&);
75private: 75private:
76 LLRefCount&operator=(const LLRefCount&); // not implemented 76 LLRefCount&operator=(const LLRefCount&);
77 77
78protected: 78protected:
79 virtual ~LLRefCount(); // use unref() 79 virtual ~LLRefCount(); // use unref()
@@ -467,6 +467,6 @@ private:
467 467
468// Return the resident set size of the current process, in bytes. 468// Return the resident set size of the current process, in bytes.
469// Return value is zero if not known. 469// Return value is zero if not known.
470U64 getCurrentRSS(); 470LL_COMMON_API U64 getCurrentRSS();
471 471
472#endif 472#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 @@
52 * be careful to always pass in a valid memory location that exists 52 * be careful to always pass in a valid memory location that exists
53 * for at least as long as this streambuf. 53 * for at least as long as this streambuf.
54 */ 54 */
55class LLMemoryStreamBuf : public std::streambuf 55class LL_COMMON_API LLMemoryStreamBuf : public std::streambuf
56{ 56{
57public: 57public:
58 LLMemoryStreamBuf(const U8* start, S32 length); 58 LLMemoryStreamBuf(const U8* start, S32 length);
@@ -74,7 +74,7 @@ protected:
74 * be careful to always pass in a valid memory location that exists 74 * be careful to always pass in a valid memory location that exists
75 * for at least as long as this streambuf. 75 * for at least as long as this streambuf.
76 */ 76 */
77class LLMemoryStream : public std::istream 77class LL_COMMON_API LLMemoryStream : public std::istream
78{ 78{
79public: 79public:
80 LLMemoryStream(const U8* start, S32 length); 80 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); }
57 57
58//---------------------------------------------------------------------------- 58//----------------------------------------------------------------------------
59 59
60class LLMemType 60class LL_COMMON_API LLMemType
61{ 61{
62public: 62public:
63 // Also update sTypeDesc in llmemory.cpp 63 // 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 @@
38class LLMetricsImpl; 38class LLMetricsImpl;
39class LLSD; 39class LLSD;
40 40
41class LLMetrics 41class LL_COMMON_API LLMetrics
42{ 42{
43public: 43public:
44 LLMetrics(); 44 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 @@
35 35
36#include "stdtypes.h" 36#include "stdtypes.h"
37 37
38class LLMortician 38class LL_COMMON_API LLMortician
39{ 39{
40public: 40public:
41 LLMortician() { mIsDead = FALSE; } 41 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 @@
92 92
93#endif 93#endif
94 94
95
96// Deal with the differeneces on Windows 95// Deal with the differeneces on Windows
97#if LL_MSVC
98namespace snprintf_hack
99{
100 int snprintf(char *str, size_t size, const char *format, ...);
101}
102
103// #define snprintf safe_snprintf /* Flawfinder: ignore */
104using snprintf_hack::snprintf;
105#endif // LL_MSVC
106
107// Static linking with apr on windows needs to be declared.
108#ifdef LL_WINDOWS
109#ifndef APR_DECLARE_STATIC
110#define APR_DECLARE_STATIC // For APR on Windows
111#endif
112#ifndef APU_DECLARE_STATIC
113#define APU_DECLARE_STATIC // For APR util on Windows
114#endif
115#endif
116
117#if defined(LL_WINDOWS) 96#if defined(LL_WINDOWS)
118#define BOOST_REGEX_NO_LIB 1 97#define BOOST_REGEX_NO_LIB 1
119#define CURL_STATICLIB 1 98#define CURL_STATICLIB 1
120#define XML_STATIC 99#define XML_STATIC
121#endif // LL_WINDOWS 100#endif // LL_WINDOWS
122 101
123
124// Deal with VC6 problems 102// Deal with VC6 problems
125#if LL_MSVC 103#if LL_MSVC
126#pragma warning( 3 : 4701 ) // "local variable used without being initialized" Treat this as level 3, not level 4. 104#pragma warning( 3 : 4701 ) // "local variable used without being initialized" Treat this as level 3, not level 4.
127#pragma warning( 3 : 4702 ) // "unreachable code" Treat this as level 3, not level 4. 105#pragma warning( 3 : 4702 ) // "unreachable code" Treat this as level 3, not level 4.
128#pragma warning( 3 : 4189 ) // "local variable initialized but not referenced" Treat this as level 3, not level 4. 106#pragma warning( 3 : 4189 ) // "local variable initialized but not referenced" Treat this as level 3, not level 4.
129//#pragma warning( 3 : 4018 ) // "signed/unsigned mismatch" Treat this as level 3, not level 4. 107//#pragma warning( 3 : 4018 ) // "signed/unsigned mismatch" Treat this as level 3, not level 4.
108#pragma warning( 3 : 4263 ) // 'function' : member function does not override any base class virtual member function
109#pragma warning( 3 : 4264 ) // "'virtual_function' : no override available for virtual member function from base 'class'; function is hidden"
130#pragma warning( 3 : 4265 ) // "class has virtual functions, but destructor is not virtual" 110#pragma warning( 3 : 4265 ) // "class has virtual functions, but destructor is not virtual"
131#pragma warning( disable : 4786 ) // silly MS warning deep inside their <map> include file 111//#pragma warning( disable : 4265 ) // boost 1.36.0, non-virtual destructor in boost::exception_detail::*
112#pragma warning( 3 : 4266 ) // 'function' : no override available for virtual member function from base 'type'; function is hidden
113#pragma warning (disable : 4180) // qualifier applied to function type has no meaning; ignored
132#pragma warning( disable : 4284 ) // silly MS warning deep inside their <map> include file 114#pragma warning( disable : 4284 ) // silly MS warning deep inside their <map> include file
133#pragma warning( disable : 4503 ) // 'decorated name length exceeded, name was truncated'. Does not seem to affect compilation. 115#pragma warning( disable : 4503 ) // 'decorated name length exceeded, name was truncated'. Does not seem to affect compilation.
134#pragma warning( disable : 4800 ) // 'BOOL' : forcing value to bool 'true' or 'false' (performance warning) 116#pragma warning( disable : 4800 ) // 'BOOL' : forcing value to bool 'true' or 'false' (performance warning)
135#pragma warning( disable : 4996 ) // warning: deprecated 117#pragma warning( disable : 4996 ) // warning: deprecated
118
119// Linker optimization with "extern template" generates these warnings
120#pragma warning( disable : 4231 ) // nonstandard extension used : 'extern' before template explicit instantiation
121#pragma warning( disable : 4506 ) // no definition for inline function
122
123// level 4 warnings that we need to disable:
124#pragma warning (disable : 4100) // unreferenced formal parameter
125#pragma warning (disable : 4127) // conditional expression is constant (e.g. while(1) )
126#pragma warning (disable : 4244) // possible loss of data on conversions
127#pragma warning (disable : 4396) // the inline specifier cannot be used when a friend declaration refers to a specialization of a function template
128#pragma warning (disable : 4512) // assignment operator could not be generated
129#pragma warning (disable : 4706) // assignment within conditional (even if((x = y)) )
130
131#pragma warning (disable : 4251) // member needs to have dll-interface to be used by clients of class
132#pragma warning (disable : 4275) // non dll-interface class used as base for dll-interface class
136#endif // LL_MSVC 133#endif // LL_MSVC
137 134
135#if LL_WINDOWS
136#define LL_DLLEXPORT __declspec(dllexport)
137#define LL_DLLIMPORT __declspec(dllimport)
138#elif LL_LINUX
139#define LL_DLLEXPORT __attribute__ ((visibility("default")))
140#define LL_DLLIMPORT
141#else
142#define LL_DLLEXPORT
143#define LL_DLLIMPORT
144#endif // LL_WINDOWS
145
146#ifdef llcommon_EXPORTS
147// Compiling llcommon (shared)
148#define LL_COMMON_API LL_DLLEXPORT
149#else // llcommon_EXPORTS
150// Using llcommon (shared)
151#define LL_COMMON_API LL_DLLIMPORT
152#endif // llcommon_EXPORTS
153
138#endif // not LL_LINDEN_PREPROCESSOR_H 154#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 @@
43 It also keeps track of whether the process is still running, and can kill it if required. 43 It also keeps track of whether the process is still running, and can kill it if required.
44*/ 44*/
45 45
46class LLProcessLauncher 46class LL_COMMON_API LLProcessLauncher
47{ 47{
48 LOG_CLASS(LLProcessLauncher); 48 LOG_CLASS(LLProcessLauncher);
49public: 49public:
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 @@
32#include "linden_common.h" 32#include "linden_common.h"
33#include "llqueuedthread.h" 33#include "llqueuedthread.h"
34#include "llstl.h" 34#include "llstl.h"
35#include "lltimer.h"
35 36
36//============================================================================ 37//============================================================================
37 38
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 @@
47// Note: ~LLQueuedThread is O(N) N=# of queued threads, assumed to be small 47// Note: ~LLQueuedThread is O(N) N=# of queued threads, assumed to be small
48// It is assumed that LLQueuedThreads are rarely created/destroyed. 48// It is assumed that LLQueuedThreads are rarely created/destroyed.
49 49
50class LLQueuedThread : public LLThread 50class LL_COMMON_API LLQueuedThread : public LLThread
51{ 51{
52 //------------------------------------------------------------------------ 52 //------------------------------------------------------------------------
53public: 53public:
@@ -80,7 +80,7 @@ public:
80 //------------------------------------------------------------------------ 80 //------------------------------------------------------------------------
81public: 81public:
82 82
83 class QueuedRequest : public LLSimpleHashEntry<handle_t> 83 class LL_COMMON_API QueuedRequest : public LLSimpleHashEntry<handle_t>
84 { 84 {
85 friend class LLQueuedThread; 85 friend class LLQueuedThread;
86 86
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 @@
65/** 65/**
66 *@brief Generate a float from [0, RAND_MAX). 66 *@brief Generate a float from [0, RAND_MAX).
67 */ 67 */
68S32 ll_rand(); 68LL_COMMON_API S32 ll_rand();
69 69
70/** 70/**
71 *@brief Generate a float from [0, val) or (val, 0]. 71 *@brief Generate a float from [0, val) or (val, 0].
72 */ 72 */
73S32 ll_rand(S32 val); 73LL_COMMON_API S32 ll_rand(S32 val);
74 74
75/** 75/**
76 *@brief Generate a float from [0, 1.0). 76 *@brief Generate a float from [0, 1.0).
77 */ 77 */
78F32 ll_frand(); 78LL_COMMON_API F32 ll_frand();
79 79
80/** 80/**
81 *@brief Generate a float from [0, val) or (val, 0]. 81 *@brief Generate a float from [0, val) or (val, 0].
82 */ 82 */
83F32 ll_frand(F32 val); 83LL_COMMON_API F32 ll_frand(F32 val);
84 84
85/** 85/**
86 *@brief Generate a double from [0, 1.0). 86 *@brief Generate a double from [0, 1.0).
87 */ 87 */
88F64 ll_drand(); 88LL_COMMON_API F64 ll_drand();
89 89
90/** 90/**
91 *@brief Generate a double from [0, val) or (val, 0]. 91 *@brief Generate a double from [0, val) or (val, 0].
92 */ 92 */
93F64 ll_drand(F64 val); 93LL_COMMON_API F64 ll_drand(F64 val);
94 94
95/** 95/**
96 * @brief typedefs for good boost lagged fibonacci. 96 * @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 @@
38#include <vector> 38#include <vector>
39#include <boost/shared_ptr.hpp> 39#include <boost/shared_ptr.hpp>
40 40
41#include "llpreprocessor.h"
42
41class LLRunnable; 43class LLRunnable;
42 44
43/** 45/**
@@ -48,7 +50,7 @@ class LLRunnable;
48 * which are scheduled to run on a repeating or one time basis. 50 * which are scheduled to run on a repeating or one time basis.
49 * @see LLRunnable 51 * @see LLRunnable
50 */ 52 */
51class LLRunner 53class LL_COMMON_API LLRunner
52{ 54{
53public: 55public:
54 /** 56 /**
@@ -149,7 +151,7 @@ protected:
149 * something useful. 151 * something useful.
150 * @see LLRunner 152 * @see LLRunner
151 */ 153 */
152class LLRunnable 154class LL_COMMON_API LLRunnable
153{ 155{
154public: 156public:
155 LLRunnable(); 157 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:
75 ///< This constructor is used for static objects and causes the 75 ///< This constructor is used for static objects and causes the
76 // suppresses adjusting the debugging counters when they are 76 // suppresses adjusting the debugging counters when they are
77 // finally initialized. 77 // finally initialized.
78 78
79 virtual ~Impl(); 79 virtual ~Impl();
80 80
81 bool shared() const { return mUseCount > 1; } 81 bool shared() const { return mUseCount > 1; }
@@ -162,6 +162,7 @@ namespace
162 162
163 virtual LLSD::Type type() const { return T; } 163 virtual LLSD::Type type() const { return T; }
164 164
165 using LLSD::Impl::assign;
165 virtual void assign(LLSD::Impl*& var, DataRef value) { 166 virtual void assign(LLSD::Impl*& var, DataRef value) {
166 if (shared()) 167 if (shared())
167 { 168 {
@@ -348,6 +349,10 @@ namespace
348 349
349 virtual LLSD::Boolean asBoolean() const { return !mData.empty(); } 350 virtual LLSD::Boolean asBoolean() const { return !mData.empty(); }
350 351
352 using LLSD::Impl::get; // Unhiding get(LLSD::Integer)
353 using LLSD::Impl::erase; // Unhiding erase(LLSD::Integer)
354 using LLSD::Impl::ref; // Unhiding ref(LLSD::Integer)
355
351 virtual bool has(const LLSD::String&) const; 356 virtual bool has(const LLSD::String&) const;
352 virtual LLSD get(const LLSD::String&) const; 357 virtual LLSD get(const LLSD::String&) const;
353 LLSD& insert(const LLSD::String& k, const LLSD& v); 358 LLSD& insert(const LLSD::String& k, const LLSD& v);
@@ -440,6 +445,11 @@ namespace
440 virtual LLSD::Boolean asBoolean() const { return !mData.empty(); } 445 virtual LLSD::Boolean asBoolean() const { return !mData.empty(); }
441 446
442 virtual int size() const; 447 virtual int size() const;
448
449 using LLSD::Impl::get; // Unhiding get(LLSD::Integer)
450 using LLSD::Impl::erase; // Unhiding erase(LLSD::Integer)
451 using LLSD::Impl::ref; // Unhiding ref(LLSD::Integer)
452
443 virtual LLSD get(LLSD::Integer) const; 453 virtual LLSD get(LLSD::Integer) const;
444 void set(LLSD::Integer, const LLSD&); 454 void set(LLSD::Integer, const LLSD&);
445 LLSD& insert(LLSD::Integer, const LLSD&); 455 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 @@
89 @nosubgrouping 89 @nosubgrouping
90*/ 90*/
91 91
92class LLSD 92class LL_COMMON_API LLSD
93{ 93{
94public: 94public:
95 LLSD(); ///< initially Undefined 95 LLSD(); ///< initially Undefined
@@ -387,7 +387,7 @@ struct llsd_select_string : public std::unary_function<LLSD, LLSD::String>
387 } 387 }
388}; 388};
389 389
390std::ostream& operator<<(std::ostream& s, const LLSD& llsd); 390LL_COMMON_API std::ostream& operator<<(std::ostream& s, const LLSD& llsd);
391 391
392/** QUESTIONS & TO DOS 392/** QUESTIONS & TO DOS
393 - Would Binary be more convenient as usigned char* buffer semantics? 393 - 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 @@
43 * @class LLSDParser 43 * @class LLSDParser
44 * @brief Abstract base class for LLSD parsers. 44 * @brief Abstract base class for LLSD parsers.
45 */ 45 */
46class LLSDParser : public LLRefCount 46class LL_COMMON_API LLSDParser : public LLRefCount
47{ 47{
48protected: 48protected:
49 /** 49 /**
@@ -220,7 +220,7 @@ protected:
220 * @class LLSDNotationParser 220 * @class LLSDNotationParser
221 * @brief Parser which handles the original notation format for LLSD. 221 * @brief Parser which handles the original notation format for LLSD.
222 */ 222 */
223class LLSDNotationParser : public LLSDParser 223class LL_COMMON_API LLSDNotationParser : public LLSDParser
224{ 224{
225protected: 225protected:
226 /** 226 /**
@@ -293,7 +293,7 @@ private:
293 * @class LLSDXMLParser 293 * @class LLSDXMLParser
294 * @brief Parser which handles XML format LLSD. 294 * @brief Parser which handles XML format LLSD.
295 */ 295 */
296class LLSDXMLParser : public LLSDParser 296class LL_COMMON_API LLSDXMLParser : public LLSDParser
297{ 297{
298protected: 298protected:
299 /** 299 /**
@@ -341,7 +341,7 @@ private:
341 * @class LLSDBinaryParser 341 * @class LLSDBinaryParser
342 * @brief Parser which handles binary formatted LLSD. 342 * @brief Parser which handles binary formatted LLSD.
343 */ 343 */
344class LLSDBinaryParser : public LLSDParser 344class LL_COMMON_API LLSDBinaryParser : public LLSDParser
345{ 345{
346protected: 346protected:
347 /** 347 /**
@@ -406,7 +406,7 @@ private:
406 * @class LLSDFormatter 406 * @class LLSDFormatter
407 * @brief Abstract base class for formatting LLSD. 407 * @brief Abstract base class for formatting LLSD.
408 */ 408 */
409class LLSDFormatter : public LLRefCount 409class LL_COMMON_API LLSDFormatter : public LLRefCount
410{ 410{
411protected: 411protected:
412 /** 412 /**
@@ -478,7 +478,7 @@ protected:
478 * @class LLSDNotationFormatter 478 * @class LLSDNotationFormatter
479 * @brief Formatter which outputs the original notation format for LLSD. 479 * @brief Formatter which outputs the original notation format for LLSD.
480 */ 480 */
481class LLSDNotationFormatter : public LLSDFormatter 481class LL_COMMON_API LLSDNotationFormatter : public LLSDFormatter
482{ 482{
483protected: 483protected:
484 /** 484 /**
@@ -519,7 +519,7 @@ public:
519 * @class LLSDXMLFormatter 519 * @class LLSDXMLFormatter
520 * @brief Formatter which outputs the LLSD as XML. 520 * @brief Formatter which outputs the LLSD as XML.
521 */ 521 */
522class LLSDXMLFormatter : public LLSDFormatter 522class LL_COMMON_API LLSDXMLFormatter : public LLSDFormatter
523{ 523{
524protected: 524protected:
525 /** 525 /**
@@ -587,7 +587,7 @@ protected:
587 * Map: '{' + 4 byte integer size every(key + value) + '}'<br> 587 * Map: '{' + 4 byte integer size every(key + value) + '}'<br>
588 * map keys are serialized as 'k' + 4 byte integer size + string 588 * map keys are serialized as 'k' + 4 byte integer size + string
589 */ 589 */
590class LLSDBinaryFormatter : public LLSDFormatter 590class LL_COMMON_API LLSDBinaryFormatter : public LLSDFormatter
591{ 591{
592protected: 592protected:
593 /** 593 /**
@@ -676,7 +676,7 @@ typedef LLSDOStreamer<LLSDXMLFormatter> LLSDXMLStreamer;
676 * @class LLSDSerialize 676 * @class LLSDSerialize
677 * @brief Serializer / deserializer for the various LLSD formats 677 * @brief Serializer / deserializer for the various LLSD formats
678 */ 678 */
679class LLSDSerialize 679class LL_COMMON_API LLSDSerialize
680{ 680{
681public: 681public:
682 enum ELLSD_Serialize 682 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)
562 562
563#ifdef XML_PARSER_PERFORMANCE_TESTS 563#ifdef XML_PARSER_PERFORMANCE_TESTS
564 564
565extern U64 totalTime(); 565extern LL_COMMON_API U64 totalTime();
566U64 readElementTime = 0; 566U64 readElementTime = 0;
567U64 startElementTime = 0; 567U64 startElementTime = 0;
568U64 endElementTime = 0; 568U64 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);
68LLColor4 ll_color4_from_sd(const LLSD& sd); 68LLColor4 ll_color4_from_sd(const LLSD& sd);
69 69
70// U32 70// U32
71LLSD ll_sd_from_U32(const U32); 71LL_COMMON_API LLSD ll_sd_from_U32(const U32);
72U32 ll_U32_from_sd(const LLSD& sd); 72LL_COMMON_API U32 ll_U32_from_sd(const LLSD& sd);
73 73
74// U64 74// U64
75LLSD ll_sd_from_U64(const U64); 75LL_COMMON_API LLSD ll_sd_from_U64(const U64);
76U64 ll_U64_from_sd(const LLSD& sd); 76LL_COMMON_API U64 ll_U64_from_sd(const LLSD& sd);
77 77
78// IP Address 78// IP Address
79LLSD ll_sd_from_ipaddr(const U32); 79LL_COMMON_API LLSD ll_sd_from_ipaddr(const U32);
80U32 ll_ipaddr_from_sd(const LLSD& sd); 80LL_COMMON_API U32 ll_ipaddr_from_sd(const LLSD& sd);
81 81
82// Binary to string 82// Binary to string
83LLSD ll_string_from_binary(const LLSD& sd); 83LL_COMMON_API LLSD ll_string_from_binary(const LLSD& sd);
84 84
85//String to binary 85//String to binary
86LLSD ll_binary_from_string(const LLSD& sd); 86LL_COMMON_API LLSD ll_binary_from_string(const LLSD& sd);
87 87
88// Serializes sd to static buffer and returns pointer, useful for gdb debugging. 88// Serializes sd to static buffer and returns pointer, useful for gdb debugging.
89char* ll_print_sd(const LLSD& sd); 89LL_COMMON_API char* ll_print_sd(const LLSD& sd);
90 90
91// Serializes sd to static buffer and returns pointer, using "pretty printing" mode. 91// Serializes sd to static buffer and returns pointer, using "pretty printing" mode.
92char* ll_pretty_print_sd(const LLSD& sd); 92LL_COMMON_API char* ll_pretty_print_sd(const LLSD& sd);
93 93
94//compares the structure of an LLSD to a template LLSD and stores the 94//compares the structure of an LLSD to a template LLSD and stores the
95//"valid" values in a 3rd LLSD. Default values 95//"valid" values in a 3rd LLSD. Default values
@@ -98,7 +98,7 @@ char* ll_pretty_print_sd(const LLSD& sd);
98//Returns false if the test is of same type but values differ in type 98//Returns false if the test is of same type but values differ in type
99//Otherwise, returns true 99//Otherwise, returns true
100 100
101BOOL compare_llsd_with_template( 101LL_COMMON_API BOOL compare_llsd_with_template(
102 const LLSD& llsd_to_test, 102 const LLSD& llsd_to_test,
103 const LLSD& template_llsd, 103 const LLSD& template_llsd,
104 LLSD& resultant_llsd); 104 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 @@
34#define LL_LLSECONDLIFEURLS_H 34#define LL_LLSECONDLIFEURLS_H
35 35
36 36
37extern const std::string AUCTION_URL; 37LL_COMMON_API extern const std::string AUCTION_URL;
38 38
39extern const std::string EVENTS_URL; 39LL_COMMON_API extern const std::string EVENTS_URL;
40 40
41// Currency page 41// Currency page
42extern const std::string BUY_CURRENCY_URL; 42LL_COMMON_API extern const std::string BUY_CURRENCY_URL;
43 43
44// Release Notes Redirect URL for Server and Viewer 44// Release Notes Redirect URL for Server and Viewer
45extern const std::string RELEASE_NOTES_BASE_URL; 45LL_COMMON_API extern const std::string RELEASE_NOTES_BASE_URL;
46 46
47#endif 47#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:
64}; 64};
65 65
66template <typename HASH_KEY_TYPE, int TABLE_SIZE> 66template <typename HASH_KEY_TYPE, int TABLE_SIZE>
67class LLSimpleHash 67class LL_COMMON_API LLSimpleHash
68{ 68{
69public: 69public:
70 LLSimpleHash() 70 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;
52// amounts of time with very low memory cost. 52// amounts of time with very low memory cost.
53// 53//
54 54
55class LLStatAccum 55class LL_COMMON_API LLStatAccum
56{ 56{
57protected: 57protected:
58 LLStatAccum(bool use_frame_timer); 58 LLStatAccum(bool use_frame_timer);
@@ -109,7 +109,7 @@ public:
109 F64 mLastSampleValue; 109 F64 mLastSampleValue;
110}; 110};
111 111
112class LLStatMeasure : public LLStatAccum 112class LL_COMMON_API LLStatMeasure : public LLStatAccum
113 // gathers statistics about things that are measured 113 // gathers statistics about things that are measured
114 // ex.: tempature, time dilation 114 // ex.: tempature, time dilation
115{ 115{
@@ -124,7 +124,7 @@ public:
124}; 124};
125 125
126 126
127class LLStatRate : public LLStatAccum 127class LL_COMMON_API LLStatRate : public LLStatAccum
128 // gathers statistics about things that can be counted over time 128 // gathers statistics about things that can be counted over time
129 // ex.: LSL instructions executed, messages sent, simulator frames completed 129 // ex.: LSL instructions executed, messages sent, simulator frames completed
130 // renders it in terms of rate of thing per second 130 // renders it in terms of rate of thing per second
@@ -140,7 +140,7 @@ public:
140}; 140};
141 141
142 142
143class LLStatTime : public LLStatAccum 143class LL_COMMON_API LLStatTime : public LLStatAccum
144 // gathers statistics about time spent in a block of code 144 // gathers statistics about time spent in a block of code
145 // measure average duration per second in the block 145 // measure average duration per second in the block
146{ 146{
@@ -171,7 +171,7 @@ private:
171 171
172 172
173// Use this class on the stack to record statistics about an area of code 173// Use this class on the stack to record statistics about an area of code
174class LLPerfBlock 174class LL_COMMON_API LLPerfBlock
175{ 175{
176public: 176public:
177 struct StatEntry 177 struct StatEntry
@@ -213,7 +213,7 @@ private:
213 213
214// ---------------------------------------------------------------------------- 214// ----------------------------------------------------------------------------
215 215
216class LLPerfStats 216class LL_COMMON_API LLPerfStats
217{ 217{
218public: 218public:
219 LLPerfStats(const std::string& process_name = "unknown", S32 process_pid = 0); 219 LLPerfStats(const std::string& process_name = "unknown", S32 process_pid = 0);
@@ -249,7 +249,7 @@ private:
249}; 249};
250 250
251// ---------------------------------------------------------------------------- 251// ----------------------------------------------------------------------------
252class LLStat 252class LL_COMMON_API LLStat
253{ 253{
254public: 254public:
255 LLStat(const U32 num_bins = 32, BOOL use_frame_timer = FALSE); 255 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 @@
39// unless specifed otherwise these all return input_stream.good() 39// unless specifed otherwise these all return input_stream.good()
40 40
41// skips spaces and tabs 41// skips spaces and tabs
42bool skip_whitespace(std::istream& input_stream); 42LL_COMMON_API bool skip_whitespace(std::istream& input_stream);
43 43
44// skips whitespace and newlines 44// skips whitespace and newlines
45bool skip_emptyspace(std::istream& input_stream); 45LL_COMMON_API bool skip_emptyspace(std::istream& input_stream);
46 46
47// skips emptyspace and lines that start with a # 47// skips emptyspace and lines that start with a #
48bool skip_comments_and_emptyspace(std::istream& input_stream); 48LL_COMMON_API bool skip_comments_and_emptyspace(std::istream& input_stream);
49 49
50// skips to character after next newline 50// skips to character after next newline
51bool skip_line(std::istream& input_stream); 51LL_COMMON_API bool skip_line(std::istream& input_stream);
52 52
53// skips to beginning of next non-emptyspace 53// skips to beginning of next non-emptyspace
54bool skip_to_next_word(std::istream& input_stream); 54LL_COMMON_API bool skip_to_next_word(std::istream& input_stream);
55 55
56// skips to character after the end of next keyword 56// skips to character after the end of next keyword
57// a 'keyword' is defined as the first word on a line 57// a 'keyword' is defined as the first word on a line
58bool skip_to_end_of_next_keyword(const char* keyword, std::istream& input_stream); 58LL_COMMON_API bool skip_to_end_of_next_keyword(const char* keyword, std::istream& input_stream);
59 59
60// skip_to_start_of_next_keyword() is disabled -- might tickle corruption bug 60// skip_to_start_of_next_keyword() is disabled -- might tickle corruption bug
61// in windows iostream 61// in windows iostream
@@ -65,14 +65,14 @@ bool skip_to_end_of_next_keyword(const char* keyword, std::istream& input_stream
65 65
66// characters are pulled out of input_stream and appended to output_string 66// characters are pulled out of input_stream and appended to output_string
67// returns result of input_stream.good() after characters are pulled 67// returns result of input_stream.good() after characters are pulled
68bool get_word(std::string& output_string, std::istream& input_stream); 68LL_COMMON_API bool get_word(std::string& output_string, std::istream& input_stream);
69bool get_line(std::string& output_string, std::istream& input_stream); 69LL_COMMON_API bool get_line(std::string& output_string, std::istream& input_stream);
70 70
71// characters are pulled out of input_stream (up to a max of 'n') 71// characters are pulled out of input_stream (up to a max of 'n')
72// and appended to output_string 72// and appended to output_string
73// returns result of input_stream.good() after characters are pulled 73// returns result of input_stream.good() after characters are pulled
74bool get_word(std::string& output_string, std::istream& input_stream, int n); 74LL_COMMON_API bool get_word(std::string& output_string, std::istream& input_stream, int n);
75bool get_line(std::string& output_string, std::istream& input_stream, int n); 75LL_COMMON_API bool get_line(std::string& output_string, std::istream& input_stream, int n);
76 76
77// unget_line() is disabled -- might tickle corruption bug in windows iostream 77// unget_line() is disabled -- might tickle corruption bug in windows iostream
78//// backs up the input_stream by line_size + 1 characters 78//// 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);
82 82
83// removes the last char in 'line' if it matches 'c' 83// removes the last char in 'line' if it matches 'c'
84// returns true if removed last char 84// returns true if removed last char
85bool remove_last_char(char c, std::string& line); 85LL_COMMON_API bool remove_last_char(char c, std::string& line);
86 86
87// replaces escaped characters with the correct characters from left to right 87// replaces escaped characters with the correct characters from left to right
88// "\\" ---> '\\' 88// "\\" ---> '\\'
89// "\n" ---> '\n' 89// "\n" ---> '\n'
90void unescape_string(std::string& line); 90LL_COMMON_API void unescape_string(std::string& line);
91 91
92// replaces unescaped characters with expanded equivalents from left to right 92// replaces unescaped characters with expanded equivalents from left to right
93// '\\' ---> "\\" 93// '\\' ---> "\\"
94// '\n' ---> "\n" 94// '\n' ---> "\n"
95void escape_string(std::string& line); 95LL_COMMON_API void escape_string(std::string& line);
96 96
97// replaces each '\n' character with ' ' 97// replaces each '\n' character with ' '
98void replace_newlines_with_whitespace(std::string& line); 98LL_COMMON_API void replace_newlines_with_whitespace(std::string& line);
99 99
100// erases any double-quote characters in line 100// erases any double-quote characters in line
101void remove_double_quotes(std::string& line); 101LL_COMMON_API void remove_double_quotes(std::string& line);
102 102
103// the 'keyword' is defined as the first word on a line 103// the 'keyword' is defined as the first word on a line
104// the 'value' is everything after the keyword on the same line 104// the 'value' is everything after the keyword on the same line
105// starting at the first non-whitespace and ending right before the newline 105// starting at the first non-whitespace and ending right before the newline
106void get_keyword_and_value(std::string& keyword, 106LL_COMMON_API void get_keyword_and_value(std::string& keyword,
107 std::string& value, 107 std::string& value,
108 const std::string& line); 108 const std::string& line);
109 109
@@ -111,13 +111,13 @@ void get_keyword_and_value(std::string& keyword,
111// read anymore or until we hit the count. Some istream 111// read anymore or until we hit the count. Some istream
112// implimentations have a max that they will read. 112// implimentations have a max that they will read.
113// Returns the number of bytes read. 113// Returns the number of bytes read.
114std::streamsize fullread( 114LL_COMMON_API std::streamsize fullread(
115 std::istream& istr, 115 std::istream& istr,
116 char* buf, 116 char* buf,
117 std::streamsize requested); 117 std::streamsize requested);
118 118
119 119
120std::istream& operator>>(std::istream& str, const char *tocheck); 120LL_COMMON_API std::istream& operator>>(std::istream& str, const char *tocheck);
121 121
122#endif 122#endif
123 123
diff --git a/linden/indra/llcommon/llstring.h b/linden/indra/llcommon/llstring.h
index bab89b1..ae5d84c 100644
--- a/linden/indra/llcommon/llstring.h
+++ b/linden/indra/llcommon/llstring.h
@@ -34,12 +34,13 @@
34#define LL_LLSTRING_H 34#define LL_LLSTRING_H
35 35
36#include <string> 36#include <string>
37#include <cstdio>
38#include <algorithm>
37 39
38#if LL_LINUX || LL_SOLARIS 40#if LL_LINUX || LL_SOLARIS
39#include <wctype.h> 41#include <wctype.h>
40#include <wchar.h> 42#include <wchar.h>
41#endif 43#endif
42#include "linden_common.h"
43 44
44#include <string.h> 45#include <string.h>
45 46
@@ -144,7 +145,7 @@ struct char_traits<U16>
144}; 145};
145#endif 146#endif
146 147
147class LLStringOps 148class LL_COMMON_API LLStringOps
148{ 149{
149public: 150public:
150 static char toUpper(char elem) { return toupper((unsigned char)elem); } 151 static char toUpper(char elem) { return toupper((unsigned char)elem); }
@@ -179,8 +180,8 @@ public:
179 * @brief Return a string constructed from in without crashing if the 180 * @brief Return a string constructed from in without crashing if the
180 * pointer is NULL. 181 * pointer is NULL.
181 */ 182 */
182std::string ll_safe_string(const char* in); 183std::string LL_COMMON_API ll_safe_string(const char* in);
183std::string ll_safe_string(const char* in, S32 maxlen); 184std::string LL_COMMON_API ll_safe_string(const char* in, S32 maxlen);
184 185
185 186
186// Allowing assignments from non-strings into format_map_t is apparently 187// Allowing assignments from non-strings into format_map_t is apparently
@@ -236,7 +237,8 @@ public:
236 static void replaceTabsWithSpaces( std::basic_string<T>& string, size_type spaces_per_tab ); 237 static void replaceTabsWithSpaces( std::basic_string<T>& string, size_type spaces_per_tab );
237 static void replaceNonstandardASCII( std::basic_string<T>& string, T replacement ); 238 static void replaceNonstandardASCII( std::basic_string<T>& string, T replacement );
238 static void replaceChar( std::basic_string<T>& string, T target, T replacement ); 239 static void replaceChar( std::basic_string<T>& string, T target, T replacement );
239 240 static void replaceString( std::basic_string<T>& string, std::basic_string<T> target, std::basic_string<T> replacement );
241
240 static BOOL containsNonprintable(const std::basic_string<T>& string); 242 static BOOL containsNonprintable(const std::basic_string<T>& string);
241 static void stripNonprintable(std::basic_string<T>& string); 243 static void stripNonprintable(std::basic_string<T>& string);
242 244
@@ -349,7 +351,7 @@ inline std::string chop_tail_copy(
349 * @brief This translates a nybble stored as a hex value from 0-f back 351 * @brief This translates a nybble stored as a hex value from 0-f back
350 * to a nybble in the low order bits of the return byte. 352 * to a nybble in the low order bits of the return byte.
351 */ 353 */
352U8 hex_as_nybble(char hex); 354LL_COMMON_API U8 hex_as_nybble(char hex);
353 355
354/** 356/**
355 * @brief read the contents of a file into a string. 357 * @brief read the contents of a file into a string.
@@ -360,7 +362,7 @@ U8 hex_as_nybble(char hex);
360 * @param filename The full name of the file to read. 362 * @param filename The full name of the file to read.
361 * @return Returns true on success. If false, str is unmodified. 363 * @return Returns true on success. If false, str is unmodified.
362 */ 364 */
363bool _read_file_into_string(std::string& str, const std::string& filename); 365LL_COMMON_API bool _read_file_into_string(std::string& str, const std::string& filename);
364 366
365/** 367/**
366 * Unicode support 368 * Unicode support
@@ -369,52 +371,52 @@ bool _read_file_into_string(std::string& str, const std::string& filename);
369// Make the incoming string a utf8 string. Replaces any unknown glyph 371// Make the incoming string a utf8 string. Replaces any unknown glyph
370// with the UNKOWN_CHARACTER. Once any unknown glph is found, the rest 372// with the UNKOWN_CHARACTER. Once any unknown glph is found, the rest
371// of the data may not be recovered. 373// of the data may not be recovered.
372std::string rawstr_to_utf8(const std::string& raw); 374LL_COMMON_API std::string rawstr_to_utf8(const std::string& raw);
373 375
374// 376//
375// We should never use UTF16 except when communicating with Win32! 377// We should never use UTF16 except when communicating with Win32!
376// 378//
377typedef std::basic_string<U16> llutf16string; 379typedef std::basic_string<U16> llutf16string;
378 380
379LLWString utf16str_to_wstring(const llutf16string &utf16str, S32 len); 381LL_COMMON_API LLWString utf16str_to_wstring(const llutf16string &utf16str, S32 len);
380LLWString utf16str_to_wstring(const llutf16string &utf16str); 382LL_COMMON_API LLWString utf16str_to_wstring(const llutf16string &utf16str);
381 383
382llutf16string wstring_to_utf16str(const LLWString &utf32str, S32 len); 384LL_COMMON_API llutf16string wstring_to_utf16str(const LLWString &utf32str, S32 len);
383llutf16string wstring_to_utf16str(const LLWString &utf32str); 385LL_COMMON_API llutf16string wstring_to_utf16str(const LLWString &utf32str);
384 386
385llutf16string utf8str_to_utf16str ( const std::string& utf8str, S32 len); 387LL_COMMON_API llutf16string utf8str_to_utf16str ( const std::string& utf8str, S32 len);
386llutf16string utf8str_to_utf16str ( const std::string& utf8str ); 388LL_COMMON_API llutf16string utf8str_to_utf16str ( const std::string& utf8str );
387 389
388LLWString utf8str_to_wstring(const std::string &utf8str, S32 len); 390LL_COMMON_API LLWString utf8str_to_wstring(const std::string &utf8str, S32 len);
389LLWString utf8str_to_wstring(const std::string &utf8str); 391LL_COMMON_API LLWString utf8str_to_wstring(const std::string &utf8str);
390// Same function, better name. JC 392// Same function, better name. JC
391inline LLWString utf8string_to_wstring(const std::string& utf8_string) { return utf8str_to_wstring(utf8_string); } 393inline LLWString utf8string_to_wstring(const std::string& utf8_string) { return utf8str_to_wstring(utf8_string); }
392 394
393// 395//
394S32 wchar_to_utf8chars(llwchar inchar, char* outchars); 396LL_COMMON_API S32 wchar_to_utf8chars(llwchar inchar, char* outchars);
395 397
396std::string wstring_to_utf8str(const LLWString &utf32str, S32 len); 398LL_COMMON_API std::string wstring_to_utf8str(const LLWString &utf32str, S32 len);
397std::string wstring_to_utf8str(const LLWString &utf32str); 399LL_COMMON_API std::string wstring_to_utf8str(const LLWString &utf32str);
398 400
399std::string utf16str_to_utf8str(const llutf16string &utf16str, S32 len); 401LL_COMMON_API std::string utf16str_to_utf8str(const llutf16string &utf16str, S32 len);
400std::string utf16str_to_utf8str(const llutf16string &utf16str); 402LL_COMMON_API std::string utf16str_to_utf8str(const llutf16string &utf16str);
401 403
402// Length of this UTF32 string in bytes when transformed to UTF8 404// Length of this UTF32 string in bytes when transformed to UTF8
403S32 wstring_utf8_length(const LLWString& wstr); 405LL_COMMON_API S32 wstring_utf8_length(const LLWString& wstr);
404 406
405// Length in bytes of this wide char in a UTF8 string 407// Length in bytes of this wide char in a UTF8 string
406S32 wchar_utf8_length(const llwchar wc); 408LL_COMMON_API S32 wchar_utf8_length(const llwchar wc);
407 409
408std::string utf8str_tolower(const std::string& utf8str); 410LL_COMMON_API std::string utf8str_tolower(const std::string& utf8str);
409 411
410// Length in llwchar (UTF-32) of the first len units (16 bits) of the given UTF-16 string. 412// Length in llwchar (UTF-32) of the first len units (16 bits) of the given UTF-16 string.
411S32 utf16str_wstring_length(const llutf16string &utf16str, S32 len); 413LL_COMMON_API S32 utf16str_wstring_length(const llutf16string &utf16str, S32 len);
412 414
413// Length in utf16string (UTF-16) of wlen wchars beginning at woffset. 415// Length in utf16string (UTF-16) of wlen wchars beginning at woffset.
414S32 wstring_utf16_length(const LLWString & wstr, S32 woffset, S32 wlen); 416LL_COMMON_API S32 wstring_utf16_length(const LLWString & wstr, S32 woffset, S32 wlen);
415 417
416// Length in wstring (i.e., llwchar count) of a part of a wstring specified by utf16 length (i.e., utf16 units.) 418// Length in wstring (i.e., llwchar count) of a part of a wstring specified by utf16 length (i.e., utf16 units.)
417S32 wstring_wstring_length_from_utf16_length(const LLWString & wstr, S32 woffset, S32 utf16_length, BOOL *unaligned = NULL); 419LL_COMMON_API S32 wstring_wstring_length_from_utf16_length(const LLWString & wstr, S32 woffset, S32 utf16_length, BOOL *unaligned = NULL);
418 420
419/** 421/**
420 * @brief Properly truncate a utf8 string to a maximum byte count. 422 * @brief Properly truncate a utf8 string to a maximum byte count.
@@ -426,11 +428,11 @@ S32 wstring_wstring_length_from_utf16_length(const LLWString & wstr, S32 woffset
426 * @param max_len The maximum number of bytes in the return value. 428 * @param max_len The maximum number of bytes in the return value.
427 * @return Returns a valid utf8 string with byte count <= max_len. 429 * @return Returns a valid utf8 string with byte count <= max_len.
428 */ 430 */
429std::string utf8str_truncate(const std::string& utf8str, const S32 max_len); 431LL_COMMON_API std::string utf8str_truncate(const std::string& utf8str, const S32 max_len);
430 432
431std::string utf8str_trim(const std::string& utf8str); 433LL_COMMON_API std::string utf8str_trim(const std::string& utf8str);
432 434
433S32 utf8str_compare_insensitive( 435LL_COMMON_API S32 utf8str_compare_insensitive(
434 const std::string& lhs, 436 const std::string& lhs,
435 const std::string& rhs); 437 const std::string& rhs);
436 438
@@ -441,17 +443,17 @@ S32 utf8str_compare_insensitive(
441 * @param target_char The wchar to be replaced 443 * @param target_char The wchar to be replaced
442 * @param replace_char The wchar which is written on replace 444 * @param replace_char The wchar which is written on replace
443 */ 445 */
444std::string utf8str_substChar( 446LL_COMMON_API std::string utf8str_substChar(
445 const std::string& utf8str, 447 const std::string& utf8str,
446 const llwchar target_char, 448 const llwchar target_char,
447 const llwchar replace_char); 449 const llwchar replace_char);
448 450
449std::string utf8str_makeASCII(const std::string& utf8str); 451LL_COMMON_API std::string utf8str_makeASCII(const std::string& utf8str);
450 452
451// Hack - used for evil notecards. 453// Hack - used for evil notecards.
452std::string mbcsstring_makeASCII(const std::string& str); 454LL_COMMON_API std::string mbcsstring_makeASCII(const std::string& str);
453 455
454std::string utf8str_removeCRLF(const std::string& utf8str); 456LL_COMMON_API std::string utf8str_removeCRLF(const std::string& utf8str);
455 457
456 458
457#if LL_WINDOWS 459#if LL_WINDOWS
@@ -476,14 +478,21 @@ std::string utf8str_removeCRLF(const std::string& utf8str);
476 * formatted string. 478 * formatted string.
477 * 479 *
478 */ 480 */
479int safe_snprintf(char* str, size_t size, const char* format, ...); 481
482// Deal with the differeneces on Windows
483namespace snprintf_hack
484{
485 LL_COMMON_API int snprintf(char *str, size_t size, const char *format, ...);
486}
487
488using snprintf_hack::snprintf;
480 489
481/** 490/**
482 * @brief Convert a wide string to std::string 491 * @brief Convert a wide string to std::string
483 * 492 *
484 * This replaces the unsafe W2A macro from ATL. 493 * This replaces the unsafe W2A macro from ATL.
485 */ 494 */
486std::string ll_convert_wide_to_string(const wchar_t* in); 495LL_COMMON_API std::string ll_convert_wide_to_string(const wchar_t* in);
487 496
488//@} 497//@}
489#endif // LL_WINDOWS 498#endif // LL_WINDOWS
@@ -506,7 +515,7 @@ namespace LLStringFn
506 * with zero non-printable characters. 515 * with zero non-printable characters.
507 * @param The replacement character. use LL_UNKNOWN_CHAR if unsure. 516 * @param The replacement character. use LL_UNKNOWN_CHAR if unsure.
508 */ 517 */
509 void replace_nonprintable_in_ascii( 518 LL_COMMON_API void replace_nonprintable_in_ascii(
510 std::basic_string<char>& string, 519 std::basic_string<char>& string,
511 char replacement); 520 char replacement);
512 521
@@ -520,7 +529,7 @@ namespace LLStringFn
520 * with zero non-printable characters and zero pipe characters. 529 * with zero non-printable characters and zero pipe characters.
521 * @param The replacement character. use LL_UNKNOWN_CHAR if unsure. 530 * @param The replacement character. use LL_UNKNOWN_CHAR if unsure.
522 */ 531 */
523 void replace_nonprintable_and_pipe_in_ascii(std::basic_string<char>& str, 532 LL_COMMON_API void replace_nonprintable_and_pipe_in_ascii(std::basic_string<char>& str,
524 char replacement); 533 char replacement);
525 534
526 535
@@ -529,7 +538,7 @@ namespace LLStringFn
529 * Returns a copy of the string with those characters removed. 538 * Returns a copy of the string with those characters removed.
530 * Works with US ASCII and UTF-8 encoded strings. JC 539 * Works with US ASCII and UTF-8 encoded strings. JC
531 */ 540 */
532 std::string strip_invalid_xml(const std::string& input); 541 LL_COMMON_API std::string strip_invalid_xml(const std::string& input);
533 542
534 543
535 /** 544 /**
@@ -540,7 +549,7 @@ namespace LLStringFn
540 * with zero non-printable characters. 549 * with zero non-printable characters.
541 * @param The replacement character. use LL_UNKNOWN_CHAR if unsure. 550 * @param The replacement character. use LL_UNKNOWN_CHAR if unsure.
542 */ 551 */
543 void replace_ascii_controlchars( 552 LL_COMMON_API void replace_ascii_controlchars(
544 std::basic_string<char>& string, 553 std::basic_string<char>& string,
545 char replacement); 554 char replacement);
546} 555}
@@ -901,11 +910,22 @@ template<class T>
901void LLStringUtilBase<T>::replaceChar( std::basic_string<T>& string, T target, T replacement ) 910void LLStringUtilBase<T>::replaceChar( std::basic_string<T>& string, T target, T replacement )
902{ 911{
903 size_type found_pos = 0; 912 size_type found_pos = 0;
904 for (found_pos = string.find(target, found_pos); 913 while( (found_pos = string.find(target, found_pos)) != std::basic_string<T>::npos )
905 found_pos != std::basic_string<T>::npos;
906 found_pos = string.find(target, found_pos))
907 { 914 {
908 string[found_pos] = replacement; 915 string[found_pos] = replacement;
916 found_pos++; // avoid infinite defeat if target == replacement
917 }
918}
919
920//static
921template<class T>
922void LLStringUtilBase<T>::replaceString( std::basic_string<T>& string, std::basic_string<T> target, std::basic_string<T> replacement )
923{
924 size_type found_pos = 0;
925 while( (found_pos = string.find(target, found_pos)) != std::basic_string<T>::npos )
926 {
927 string.replace( found_pos, target.length(), replacement );
928 found_pos += replacement.length(); // avoid infinite defeat if replacement contains target
909 } 929 }
910} 930}
911 931
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 @@
56 56
57const U32 MAX_STRINGS_LENGTH = 256; 57const U32 MAX_STRINGS_LENGTH = 256;
58 58
59class LLStringTableEntry 59class LL_COMMON_API LLStringTableEntry
60{ 60{
61public: 61public:
62 LLStringTableEntry(const char *str) 62 LLStringTableEntry(const char *str)
@@ -81,7 +81,7 @@ public:
81 S32 mCount; 81 S32 mCount;
82}; 82};
83 83
84class LLStringTable 84class LL_COMMON_API LLStringTable
85{ 85{
86public: 86public:
87 LLStringTable(int tablesize); 87 LLStringTable(int tablesize);
@@ -115,7 +115,7 @@ public:
115#endif 115#endif
116}; 116};
117 117
118extern LLStringTable gStringTable; 118extern LL_COMMON_API LLStringTable gStringTable;
119 119
120//============================================================================ 120//============================================================================
121 121
@@ -125,7 +125,7 @@ extern LLStringTable gStringTable;
125 125
126typedef const std::string* LLStdStringHandle; 126typedef const std::string* LLStdStringHandle;
127 127
128class LLStdStringTable 128class LL_COMMON_API LLStdStringTable
129{ 129{
130public: 130public:
131 LLStdStringTable(S32 tablesize = 0) 131 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 @@
45#include <iosfwd> 45#include <iosfwd>
46#include <string> 46#include <string>
47 47
48class LLOSInfo 48class LL_COMMON_API LLOSInfo
49{ 49{
50public: 50public:
51 LLOSInfo(); 51 LLOSInfo();
@@ -70,7 +70,7 @@ private:
70}; 70};
71 71
72 72
73class LLCPUInfo 73class LL_COMMON_API LLCPUInfo
74{ 74{
75public: 75public:
76 LLCPUInfo(); 76 LLCPUInfo();
@@ -99,7 +99,7 @@ private:
99// 99//
100// CLASS LLMemoryInfo 100// CLASS LLMemoryInfo
101 101
102class LLMemoryInfo 102class LL_COMMON_API LLMemoryInfo
103 103
104/*! @brief Class to query the memory subsystem 104/*! @brief Class to query the memory subsystem
105 105
@@ -123,15 +123,15 @@ public:
123}; 123};
124 124
125 125
126std::ostream& operator<<(std::ostream& s, const LLOSInfo& info); 126LL_COMMON_API std::ostream& operator<<(std::ostream& s, const LLOSInfo& info);
127std::ostream& operator<<(std::ostream& s, const LLCPUInfo& info); 127LL_COMMON_API std::ostream& operator<<(std::ostream& s, const LLCPUInfo& info);
128std::ostream& operator<<(std::ostream& s, const LLMemoryInfo& info); 128LL_COMMON_API std::ostream& operator<<(std::ostream& s, const LLMemoryInfo& info);
129 129
130// gunzip srcfile into dstfile. Returns FALSE on error. 130// gunzip srcfile into dstfile. Returns FALSE on error.
131BOOL gunzip_file(const std::string& srcfile, const std::string& dstfile); 131LL_COMMON_API BOOL gunzip_file(const std::string& srcfile, const std::string& dstfile);
132// gzip srcfile into dstfile. Returns FALSE on error. 132// gzip srcfile into dstfile. Returns FALSE on error.
133BOOL gzip_file(const std::string& srcfile, const std::string& dstfile); 133LL_COMMON_API BOOL gzip_file(const std::string& srcfile, const std::string& dstfile);
134 134
135extern LLCPUInfo gSysCPU; 135LL_COMMON_API extern LLCPUInfo gSysCPU;
136 136
137#endif // LL_LLSYS_H 137#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;
43class LLMutex; 43class LLMutex;
44class LLCondition; 44class LLCondition;
45 45
46class LLThread 46class LL_COMMON_API LLThread
47{ 47{
48public: 48public:
49 typedef enum e_thread_status 49 typedef enum e_thread_status
@@ -125,7 +125,7 @@ protected:
125 125
126//============================================================================ 126//============================================================================
127 127
128class LLMutex 128class LL_COMMON_API LLMutex
129{ 129{
130public: 130public:
131 LLMutex(apr_pool_t *apr_poolp); // NULL pool constructs a new pool for the mutex 131 LLMutex(apr_pool_t *apr_poolp); // NULL pool constructs a new pool for the mutex
@@ -145,7 +145,7 @@ protected:
145}; 145};
146 146
147// Actually a condition/mutex pair (since each condition needs to be associated with a mutex). 147// Actually a condition/mutex pair (since each condition needs to be associated with a mutex).
148class LLCondition : public LLMutex 148class LL_COMMON_API LLCondition : public LLMutex
149{ 149{
150public: 150public:
151 LLCondition(apr_pool_t *apr_poolp); // Defaults to global pool, could use the thread pool as well. 151 LLCondition(apr_pool_t *apr_poolp); // Defaults to global pool, could use the thread pool as well.
@@ -159,7 +159,7 @@ protected:
159 apr_thread_cond_t *mAPRCondp; 159 apr_thread_cond_t *mAPRCondp;
160}; 160};
161 161
162class LLMutexLock 162class LL_COMMON_API LLMutexLock
163{ 163{
164public: 164public:
165 LLMutexLock(LLMutex* mutex) 165 LLMutexLock(LLMutex* mutex)
@@ -192,7 +192,7 @@ void LLThread::unlockData()
192 192
193// see llmemory.h for LLPointer<> definition 193// see llmemory.h for LLPointer<> definition
194 194
195class LLThreadSafeRefCount 195class LL_COMMON_API LLThreadSafeRefCount
196{ 196{
197public: 197public:
198 static void initThreadSafeRefCount(); // creates sMutex 198 static void initThreadSafeRefCount(); // creates sMutex
@@ -244,7 +244,7 @@ private:
244 244
245// Simple responder for self destructing callbacks 245// Simple responder for self destructing callbacks
246// Pure virtual class 246// Pure virtual class
247class LLResponder : public LLThreadSafeRefCount 247class LL_COMMON_API LLResponder : public LLThreadSafeRefCount
248{ 248{
249protected: 249protected:
250 virtual ~LLResponder(); 250 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 @@
33#include "linden_common.h" 33#include "linden_common.h"
34 34
35#include "lltimer.h" 35#include "lltimer.h"
36#include "timing.h" // totalTime prototype.
36 37
37#include "u64.h" 38#include "u64.h"
38 39
@@ -51,9 +52,6 @@
51// 52//
52// Locally used constants 53// Locally used constants
53// 54//
54const U32 SEC_PER_DAY = 86400;
55const F64 SEC_TO_MICROSEC = 1000000.f;
56const U64 SEC_TO_MICROSEC_U64 = 1000000;
57const F64 USEC_TO_SEC_F64 = 0.000001; 55const F64 USEC_TO_SEC_F64 = 0.000001;
58 56
59 57
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 @@
39#include <limits.h> 39#include <limits.h>
40 40
41#include "stdtypes.h" 41#include "stdtypes.h"
42#include "llpreprocessor.h"
42#include "lldate.h" 43#include "lldate.h"
43 44
44#include <string> 45#include <string>
@@ -54,7 +55,7 @@ const U32 USEC_PER_HOUR = USEC_PER_MIN * MIN_PER_HOUR;
54const U32 SEC_PER_HOUR = SEC_PER_MIN * MIN_PER_HOUR; 55const U32 SEC_PER_HOUR = SEC_PER_MIN * MIN_PER_HOUR;
55const F64 SEC_PER_USEC = 1.0 / (F64) USEC_PER_SEC; 56const F64 SEC_PER_USEC = 1.0 / (F64) USEC_PER_SEC;
56 57
57class LLTimer 58class LL_COMMON_API LLTimer
58{ 59{
59public: 60public:
60 static LLTimer *sTimer; // global timer 61 static LLTimer *sTimer; // global timer
@@ -113,17 +114,17 @@ public:
113// 114//
114// Various functions for initializing/accessing clock and timing stuff. Don't use these without REALLY knowing how they work. 115// Various functions for initializing/accessing clock and timing stuff. Don't use these without REALLY knowing how they work.
115// 116//
116U64 get_clock_count(); 117LL_COMMON_API U64 get_clock_count();
117F64 calc_clock_frequency(U32 msecs); 118LL_COMMON_API F64 calc_clock_frequency(U32 msecs);
118void update_clock_frequencies(); 119LL_COMMON_API void update_clock_frequencies();
119 120
120// Sleep for milliseconds 121// Sleep for milliseconds
121void ms_sleep(U32 ms); 122LL_COMMON_API void ms_sleep(U32 ms);
122U32 micro_sleep(U64 us, U32 max_yields = 0xFFFFFFFF); 123LL_COMMON_API U32 micro_sleep(U64 us, U32 max_yields = 0xFFFFFFFF);
123 124
124// Returns the correct UTC time in seconds, like time(NULL). 125// Returns the correct UTC time in seconds, like time(NULL).
125// Useful on the viewer, which may have its local clock set wrong. 126// Useful on the viewer, which may have its local clock set wrong.
126time_t time_corrected(); 127LL_COMMON_API time_t time_corrected();
127 128
128static inline time_t time_min() 129static inline time_t time_min()
129{ 130{
@@ -154,25 +155,25 @@ static inline time_t time_max()
154} 155}
155 156
156// Correction factor used by time_corrected() above. 157// Correction factor used by time_corrected() above.
157extern S32 gUTCOffset; 158LL_COMMON_API extern S32 gUTCOffset;
158 159
159// Is the current computer (in its current time zone) 160// Is the current computer (in its current time zone)
160// observing daylight savings time? 161// observing daylight savings time?
161BOOL is_daylight_savings(); 162LL_COMMON_API BOOL is_daylight_savings();
162 163
163// Converts internal "struct tm" time buffer to Pacific Standard/Daylight Time 164// Converts internal "struct tm" time buffer to Pacific Standard/Daylight Time
164// Usage: 165// Usage:
165// S32 utc_time; 166// S32 utc_time;
166// utc_time = time_corrected(); 167// utc_time = time_corrected();
167// struct tm* internal_time = utc_to_pacific_time(utc_time, gDaylight); 168// struct tm* internal_time = utc_to_pacific_time(utc_time, gDaylight);
168struct tm* utc_to_pacific_time(time_t utc_time, BOOL pacific_daylight_time); 169LL_COMMON_API struct tm* utc_to_pacific_time(time_t utc_time, BOOL pacific_daylight_time);
169struct tm* utc_to_offset_time(time_t utc_time, S32 offset, BOOL DST); 170LL_COMMON_API struct tm* utc_to_offset_time(time_t utc_time, S32 offset, BOOL DST);
170 171
171void microsecondsToTimecodeString(U64 current_time, std::string& tcstring); 172LL_COMMON_API void microsecondsToTimecodeString(U64 current_time, std::string& tcstring);
172void secondsToTimecodeString(F32 current_time, std::string& tcstring); 173LL_COMMON_API void secondsToTimecodeString(F32 current_time, std::string& tcstring);
173 174
174// class for scheduling a function to be called at a given frequency (approximate, inprecise) 175// class for scheduling a function to be called at a given frequency (approximate, inprecise)
175class LLEventTimer 176class LL_COMMON_API LLEventTimer
176{ 177{
177public: 178public:
178 LLEventTimer(F32 period); // period is the amount of time between each call to tick() in seconds 179 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;
47 * See: http://www.ietf.org/rfc/rfc3986.txt 47 * See: http://www.ietf.org/rfc/rfc3986.txt
48 * 48 *
49 */ 49 */
50class LLURI 50class LL_COMMON_API LLURI
51{ 51{
52public: 52public:
53 LLURI(); 53 LLURI();
@@ -189,6 +189,6 @@ private:
189}; 189};
190 190
191// this operator required for tut 191// this operator required for tut
192bool operator!=(const LLURI& first, const LLURI& second); 192LL_COMMON_API bool operator!=(const LLURI& first, const LLURI& second);
193 193
194#endif // LL_LLURI_H 194#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 @@
35#include <iostream> 35#include <iostream>
36#include <set> 36#include <set>
37#include "stdtypes.h" 37#include "stdtypes.h"
38#include "llpreprocessor.h"
38 39
39const S32 UUID_BYTES = 16; 40const S32 UUID_BYTES = 16;
40const S32 UUID_WORDS = 4; 41const S32 UUID_WORDS = 4;
@@ -47,7 +48,7 @@ struct uuid_time_t {
47 U32 low; 48 U32 low;
48 }; 49 };
49 50
50class LLUUID 51class LL_COMMON_API LLUUID
51{ 52{
52public: 53public:
53 // 54 //
@@ -106,8 +107,8 @@ public:
106 LLUUID combine(const LLUUID& other) const; 107 LLUUID combine(const LLUUID& other) const;
107 void combine(const LLUUID& other, LLUUID& result) const; 108 void combine(const LLUUID& other, LLUUID& result) const;
108 109
109 friend std::ostream& operator<<(std::ostream& s, const LLUUID &uuid); 110 friend LL_COMMON_API std::ostream& operator<<(std::ostream& s, const LLUUID &uuid);
110 friend std::istream& operator>>(std::istream& s, LLUUID &uuid); 111 friend LL_COMMON_API std::istream& operator>>(std::istream& s, LLUUID &uuid);
111 112
112 void toString(char *out) const; // Does not allocate memory, needs 36 characters (including \0) 113 void toString(char *out) const; // Does not allocate memory, needs 36 characters (including \0)
113 void toString(std::string& out) const; 114 void toString(std::string& out) const;
@@ -323,7 +324,7 @@ typedef std::set<LLUUID, lluuid_less> uuid_list_t;
323 */ 324 */
324typedef LLUUID LLAssetID; 325typedef LLUUID LLAssetID;
325 326
326class LLTransactionID : public LLUUID 327class LL_COMMON_API LLTransactionID : public LLUUID
327{ 328{
328public: 329public:
329 LLTransactionID() : LLUUID() { } 330 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;
50// Note: ~LLWorkerThread is O(N) N=# of worker threads, assumed to be small 50// Note: ~LLWorkerThread is O(N) N=# of worker threads, assumed to be small
51// It is assumed that LLWorkerThreads are rarely created/destroyed. 51// It is assumed that LLWorkerThreads are rarely created/destroyed.
52 52
53class LLWorkerThread : public LLQueuedThread 53class LL_COMMON_API LLWorkerThread : public LLQueuedThread
54{ 54{
55 friend class LLWorkerClass; 55 friend class LLWorkerClass;
56public: 56public:
@@ -114,7 +114,7 @@ public:
114// Only one background task can be active at a time (per instance). 114// Only one background task can be active at a time (per instance).
115// i.e. don't call addWork() if haveWork() returns true 115// i.e. don't call addWork() if haveWork() returns true
116 116
117class LLWorkerClass 117class LL_COMMON_API LLWorkerClass
118{ 118{
119 friend class LLWorkerThread; 119 friend class LLWorkerThread;
120 friend class LLWorkerThread::WorkRequest; 120 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 @@
43class LLReflective; 43class LLReflective;
44class LLMetaProperty; 44class LLMetaProperty;
45class LLMetaMethod; 45class LLMetaMethod;
46class LLMetaClass 46class LL_COMMON_API LLMetaClass
47{ 47{
48public: 48public:
49 49
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 @@
41 41
42class LLMetaClass; 42class LLMetaClass;
43class LLReflective; 43class LLReflective;
44class LLMetaProperty 44class LL_COMMON_API LLMetaProperty
45{ 45{
46public: 46public:
47 LLMetaProperty(const std::string& name, const LLMetaClass& object_class); 47 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 @@
36#define LL_REFLECTIVE_H 36#define LL_REFLECTIVE_H
37 37
38class LLMetaClass; 38class LLMetaClass;
39class LLReflective 39class LL_COMMON_API LLReflective
40{ 40{
41public: 41public:
42 LLReflective(); 42 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;
44const U32 SEC_PER_DAY = 86400; 44const U32 SEC_PER_DAY = 86400;
45 45
46// This is just a stub, implementation in lltimer.cpp. This file will be deprecated in the future. 46// This is just a stub, implementation in lltimer.cpp. This file will be deprecated in the future.
47U64 totalTime(); // Returns current system time in microseconds 47LL_COMMON_API U64 totalTime(); // Returns current system time in microseconds
48 48
49#endif 49#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 @@
39 * @param str The string to parse. 39 * @param str The string to parse.
40 * @return Returns the first U64 value found in the string or 0 on failure. 40 * @return Returns the first U64 value found in the string or 0 on failure.
41 */ 41 */
42U64 str_to_U64(const std::string& str); 42LL_COMMON_API U64 str_to_U64(const std::string& str);
43 43
44/** 44/**
45 * @brief Given a U64 value, return a printable representation. 45 * @brief Given a U64 value, return a printable representation.
46 * @param value The U64 to turn into a printable character array. 46 * @param value The U64 to turn into a printable character array.
47 * @return Returns the result string. 47 * @return Returns the result string.
48 */ 48 */
49std::string U64_to_str(U64 value); 49LL_COMMON_API std::string U64_to_str(U64 value);
50 50
51/** 51/**
52 * @brief Given a U64 value, return a printable representation. 52 * @brief Given a U64 value, return a printable representation.
@@ -65,16 +65,16 @@ std::string U64_to_str(U64 value);
65 * @param result_size The size of the buffer allocated. Use U64_BUF. 65 * @param result_size The size of the buffer allocated. Use U64_BUF.
66 * @return Returns the result pointer. 66 * @return Returns the result pointer.
67 */ 67 */
68char* U64_to_str(U64 value, char* result, S32 result_size); 68LL_COMMON_API char* U64_to_str(U64 value, char* result, S32 result_size);
69 69
70/** 70/**
71 * @brief Convert a U64 to the closest F64 value. 71 * @brief Convert a U64 to the closest F64 value.
72 */ 72 */
73F64 U64_to_F64(const U64 value); 73LL_COMMON_API F64 U64_to_F64(const U64 value);
74 74
75/** 75/**
76 * @brief Helper function to wrap strtoull() which is not available on windows. 76 * @brief Helper function to wrap strtoull() which is not available on windows.
77 */ 77 */
78U64 llstrtou64(const char* str, char** end, S32 base); 78LL_COMMON_API U64 llstrtou64(const char* str, char** end, S32 base);
79 79
80#endif 80#endif