diff --git a/.hgtags b/.hgtags
index 6db0a64173..cc88ee1664 100755
--- a/.hgtags
+++ b/.hgtags
@@ -498,3 +498,6 @@ bc61801f614022c920cb5c3df1d7d67a9561ce1f 3.7.22-release
3be800e1afad9615442159e388d6d137be7b951e 3.7.23-release
d3d0101e980ec95043e0af9b7903045d3bc447e4 3.7.24-release
9978a8c3a2ffce4a5e1c186256581c2ac139c9dc 3.7.25-release
+000e9dda4162cbf0a83ba88558b19473654a09a9 3.7.26-release
+afd8d4756e8eda3c8f760625d1c17a2ad40ad6c8 3.7.27-release
+566874eb5ab26c003ef7fb0e22ce40c5fa0013f4 3.7.28-release
diff --git a/autobuild.xml b/autobuild.xml
index 69c836b0d0..c8a9e7aa3f 100755
--- a/autobuild.xml
+++ b/autobuild.xml
@@ -2643,11 +2643,11 @@
SecondLife.sln
command
- BuildConsole
+ devenv
options
/build
- "/cfg=RelWithDebInfo|Win32"
+ "RelWithDebInfo|Win32"
configure
@@ -2731,11 +2731,11 @@
SecondLife.sln
command
- BuildConsole
+ devenv
options
/build
- "/cfg=Release|Win32"
+ "Release|Win32"
configure
diff --git a/doc/contributions.txt b/doc/contributions.txt
index 2923139405..211d4fcf08 100755
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -313,6 +313,7 @@ Ciaran Laval
Cinder Roxley
BUG-2326
BUG-3863
+ BUG-8786
OPEN-185
OPEN-282
STORM-1703
@@ -326,6 +327,7 @@ Cinder Roxley
STORM-2036
STORM-2037
STORM-2053
+ STORM-2113
Clara Young
Coaldust Numbers
VWR-1095
@@ -1230,6 +1232,7 @@ Sovereign Engineer
MAINT-2334
OPEN-189
STORM-1972
+ STORM-2113
OPEN-195
OPEN-217
OPEN-295
diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake
index aa9127eea9..47f123f3ab 100755
--- a/indra/cmake/Variables.cmake
+++ b/indra/cmake/Variables.cmake
@@ -138,7 +138,7 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvm.clang.1_0")
set(CMAKE_XCODE_ATTRIBUTE_GCC_OPTIMIZATION_LEVEL 3)
set(CMAKE_XCODE_ATTRIBUTE_GCC_STRICT_ALIASING NO)
- set(CMAKE_XCODE_ATTRIBUTE_GCC_FAST_MATH YES)
+ set(CMAKE_XCODE_ATTRIBUTE_GCC_FAST_MATH NO)
set(CMAKE_XCODE_ATTRIBUTE_CLANG_X86_VECTOR_INSTRUCTIONS ssse3)
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libstdc++")
set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT dwarf-with-dsym)
diff --git a/indra/llappearance/llwearable.cpp b/indra/llappearance/llwearable.cpp
index 41c06f4368..5ca9f55ac8 100755
--- a/indra/llappearance/llwearable.cpp
+++ b/indra/llappearance/llwearable.cpp
@@ -88,7 +88,7 @@ LLAssetType::EType LLWearable::getAssetType() const
BOOL LLWearable::exportFile(const std::string& filename) const
{
- llofstream ofs(filename, std::ios_base::out | std::ios_base::trunc | std::ios_base::binary);
+ llofstream ofs(filename.c_str(), std::ios_base::out | std::ios_base::trunc | std::ios_base::binary);
return ofs.is_open() && exportStream(ofs);
}
@@ -204,7 +204,7 @@ void LLWearable::createLayers(S32 te, LLAvatarAppearance *avatarp)
LLWearable::EImportResult LLWearable::importFile(const std::string& filename,
LLAvatarAppearance* avatarp )
{
- llifstream ifs(filename, std::ios_base::in | std::ios_base::binary);
+ llifstream ifs(filename.c_str(), std::ios_base::in | std::ios_base::binary);
return (! ifs.is_open())? FAILURE : importStream(ifs, avatarp);
}
diff --git a/indra/llcharacter/llcharacter.h b/indra/llcharacter/llcharacter.h
index d4e3b76386..1a3e307663 100755
--- a/indra/llcharacter/llcharacter.h
+++ b/indra/llcharacter/llcharacter.h
@@ -261,6 +261,9 @@ public:
static std::vector< LLCharacter* > sInstances;
static BOOL sAllowInstancesChange ; //debug use
+ virtual void setHoverOffset(const LLVector3& hover_offset, bool send_update=true) { mHoverOffset = hover_offset; }
+ const LLVector3& getHoverOffset() const { return mHoverOffset; }
+
protected:
LLMotionController mMotionController;
@@ -273,7 +276,6 @@ protected:
U32 mSkeletonSerialNum;
LLAnimPauseRequest mPauseRequest;
-
private:
// visual parameter stuff
typedef std::map visual_param_index_map_t;
@@ -284,6 +286,8 @@ private:
visual_param_name_map_t mVisualParamNameMap;
static LLStringTable sVisualParamNames;
+
+ LLVector3 mHoverOffset;
};
#endif // LL_LLCHARACTER_H
diff --git a/indra/llcharacter/lljoint.cpp b/indra/llcharacter/lljoint.cpp
index 6f22a7c6b7..8fa08a2a6c 100755
--- a/indra/llcharacter/lljoint.cpp
+++ b/indra/llcharacter/lljoint.cpp
@@ -290,7 +290,7 @@ const LLVector3& LLJoint::getPosition()
bool do_debug_joint(const std::string& name)
{
- return true;
+ return false;
}
//--------------------------------------------------------------------
@@ -361,7 +361,6 @@ void LLJoint::removeAttachmentPosOverride( const LLUUID& mesh_id, const std::str
}
updatePos(av_info);
}
-
}
//--------------------------------------------------------------------
diff --git a/indra/llcharacter/lljointstate.h b/indra/llcharacter/lljointstate.h
index b9c91f80b5..1ccc6b5093 100755
--- a/indra/llcharacter/lljointstate.h
+++ b/indra/llcharacter/lljointstate.h
@@ -64,22 +64,18 @@ protected:
public:
// Constructor
LLJointState()
- {
- mUsage = 0;
- mJoint = NULL;
- mUsage = 0;
- mWeight = 0.f;
- mPriority = LLJoint::USE_MOTION_PRIORITY;
- }
+ : mUsage(0)
+ , mJoint(NULL)
+ , mWeight(0.f)
+ , mPriority(LLJoint::USE_MOTION_PRIORITY)
+ {}
LLJointState(LLJoint* joint)
- {
- mUsage = 0;
- mJoint = joint;
- mUsage = 0;
- mWeight = 0.f;
- mPriority = LLJoint::USE_MOTION_PRIORITY;
- }
+ : mUsage(0)
+ , mJoint(joint)
+ , mWeight(0.f)
+ , mPriority(LLJoint::USE_MOTION_PRIORITY)
+ {}
// joint that this state is applied to
LLJoint* getJoint() { return mJoint; }
diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp
index 8119b14887..2100989316 100755
--- a/indra/llcommon/llerror.cpp
+++ b/indra/llcommon/llerror.cpp
@@ -113,7 +113,7 @@ namespace {
public:
RecordToFile(const std::string& filename)
{
- mFile.open(filename, llofstream::out | llofstream::app);
+ mFile.open(filename.c_str(), std::ios_base::out | std::ios_base::app);
if (!mFile)
{
LL_INFOS() << "Error setting log file to " << filename << LL_ENDL;
@@ -335,7 +335,7 @@ namespace
LLSD configuration;
{
- llifstream file(filename());
+ llifstream file(filename().c_str());
if (file.is_open())
{
LLSDSerialize::fromXML(configuration, file);
diff --git a/indra/llcommon/llfile.cpp b/indra/llcommon/llfile.cpp
index 304d702979..295c97eac8 100755
--- a/indra/llcommon/llfile.cpp
+++ b/indra/llcommon/llfile.cpp
@@ -424,26 +424,6 @@ LLFILE * LLFile::_Fiopen(const std::string& filename,
/************** llstdio file buffer ********************************/
-//llstdio_filebuf* llstdio_filebuf::open(const char *_Filename,
-// ios_base::openmode _Mode)
-//{
-//#if LL_WINDOWS
-// _Filet *_File;
-// if (is_open() || (_File = LLFILE::_Fiopen(_Filename, _Mode)) == 0)
-// return (0); // open failed
-//
-// _Init(_File, _Openfl);
-// _Initcvt(&_USE(_Mysb::getloc(), _Cvt));
-// return (this); // open succeeded
-//#else
-// std::filebuf* _file = std::filebuf::open(_Filename, _Mode);
-// if (NULL == _file) return NULL;
-// return this;
-//#endif
-//}
-
-
-// *TODO: Seek the underlying c stream for better cross-platform compatibility?
#if !LL_WINDOWS
llstdio_filebuf::int_type llstdio_filebuf::overflow(llstdio_filebuf::int_type __c)
{
@@ -865,23 +845,19 @@ int llstdio_filebuf::sync()
}
#endif
+#if LL_WINDOWS
/************** input file stream ********************************/
-
-llifstream::llifstream() : _M_filebuf(),
-#if LL_WINDOWS
- std::istream(&_M_filebuf) {}
-#else
- std::istream()
+llifstream::llifstream() :
+ _M_filebuf(),
+ std::istream(&_M_filebuf)
{
- this->init(&_M_filebuf);
}
-#endif
// explicit
llifstream::llifstream(const std::string& _Filename,
- ios_base::openmode _Mode) : _M_filebuf(),
-#if LL_WINDOWS
+ ios_base::openmode _Mode) :
+ _M_filebuf(),
std::istream(&_M_filebuf)
{
llutf16string wideName = utf8str_to_utf16str( _Filename );
@@ -890,18 +866,11 @@ llifstream::llifstream(const std::string& _Filename,
_Myios::setstate(ios_base::failbit);
}
}
-#else
- std::istream()
-{
- this->init(&_M_filebuf);
- this->open(_Filename.c_str(), _Mode | ios_base::in);
-}
-#endif
// explicit
llifstream::llifstream(const char* _Filename,
- ios_base::openmode _Mode) : _M_filebuf(),
-#if LL_WINDOWS
+ ios_base::openmode _Mode) :
+ _M_filebuf(),
std::istream(&_M_filebuf)
{
llutf16string wideName = utf8str_to_utf16str( _Filename );
@@ -910,40 +879,6 @@ llifstream::llifstream(const char* _Filename,
_Myios::setstate(ios_base::failbit);
}
}
-#else
- std::istream()
-{
- this->init(&_M_filebuf);
- this->open(_Filename, _Mode | ios_base::in);
-}
-#endif
-
-
-#if llstream_LLFILE
-// explicit
-llifstream::llifstream(_Filet *_File,
- ios_base::openmode _Mode, size_t _Size) :
- _M_filebuf(_File, _Mode, _Size),
-#if LL_WINDOWS
- std::istream(&_M_filebuf) {}
-#else
- std::istream()
-{
- this->init(&_M_filebuf);
-}
-#endif
-
-#if !LL_WINDOWS
-// explicit
-llifstream::llifstream(int __fd,
- ios_base::openmode _Mode, size_t _Size) :
- _M_filebuf(__fd, _Mode, _Size),
- std::istream()
-{
- this->init(&_M_filebuf);
-}
-#endif
-#endif // llstream_LLFILE
bool llifstream::is_open() const
{ // test if C stream has been opened
@@ -952,8 +887,6 @@ bool llifstream::is_open() const
void llifstream::open(const char* _Filename, ios_base::openmode _Mode)
{ // open a C stream with specified mode
-
-#if LL_WINDOWS
llutf16string wideName = utf8str_to_utf16str( _Filename );
if (_M_filebuf.open( wideName.c_str(), _Mode | ios_base::in) == 0)
{
@@ -963,27 +896,13 @@ void llifstream::open(const char* _Filename, ios_base::openmode _Mode)
{
_Myios::clear();
}
-#else
- if (_M_filebuf.open(_Filename, _Mode | ios_base::in) == 0)
- {
- this->setstate(ios_base::failbit);
- }
- else
- {
- this->clear();
- }
-#endif
}
void llifstream::close()
{ // close the C stream
if (_M_filebuf.close() == 0)
{
-#if LL_WINDOWS
_Myios::setstate(ios_base::failbit);
-#else
- this->setstate(ios_base::failbit);
-#endif
}
}
@@ -991,20 +910,16 @@ void llifstream::close()
/************** output file stream ********************************/
-llofstream::llofstream() : _M_filebuf(),
-#if LL_WINDOWS
- std::ostream(&_M_filebuf) {}
-#else
- std::ostream()
+llofstream::llofstream() :
+ _M_filebuf(),
+ std::ostream(&_M_filebuf)
{
- this->init(&_M_filebuf);
}
-#endif
// explicit
llofstream::llofstream(const std::string& _Filename,
- ios_base::openmode _Mode) : _M_filebuf(),
-#if LL_WINDOWS
+ ios_base::openmode _Mode) :
+ _M_filebuf(),
std::ostream(&_M_filebuf)
{
llutf16string wideName = utf8str_to_utf16str( _Filename );
@@ -1013,18 +928,11 @@ llofstream::llofstream(const std::string& _Filename,
_Myios::setstate(ios_base::failbit);
}
}
-#else
- std::ostream()
-{
- this->init(&_M_filebuf);
- this->open(_Filename.c_str(), _Mode | ios_base::out);
-}
-#endif
// explicit
llofstream::llofstream(const char* _Filename,
- ios_base::openmode _Mode) : _M_filebuf(),
-#if LL_WINDOWS
+ ios_base::openmode _Mode) :
+ _M_filebuf(),
std::ostream(&_M_filebuf)
{
llutf16string wideName = utf8str_to_utf16str( _Filename );
@@ -1033,39 +941,6 @@ llofstream::llofstream(const char* _Filename,
_Myios::setstate(ios_base::failbit);
}
}
-#else
- std::ostream()
-{
- this->init(&_M_filebuf);
- this->open(_Filename, _Mode | ios_base::out);
-}
-#endif
-
-#if llstream_LLFILE
-// explicit
-llofstream::llofstream(_Filet *_File,
- ios_base::openmode _Mode, size_t _Size) :
- _M_filebuf(_File, _Mode, _Size),
-#if LL_WINDOWS
- std::ostream(&_M_filebuf) {}
-#else
- std::ostream()
-{
- this->init(&_M_filebuf);
-}
-#endif
-
-#if !LL_WINDOWS
-// explicit
-llofstream::llofstream(int __fd,
- ios_base::openmode _Mode, size_t _Size) :
- _M_filebuf(__fd, _Mode, _Size),
- std::ostream()
-{
- this->init(&_M_filebuf);
-}
-#endif
-#endif // llstream_LLFILE
bool llofstream::is_open() const
{ // test if C stream has been opened
@@ -1074,7 +949,6 @@ bool llofstream::is_open() const
void llofstream::open(const char* _Filename, ios_base::openmode _Mode)
{ // open a C stream with specified mode
-#if LL_WINDOWS
llutf16string wideName = utf8str_to_utf16str( _Filename );
if (_M_filebuf.open( wideName.c_str(), _Mode | ios_base::out) == 0)
{
@@ -1084,27 +958,13 @@ void llofstream::open(const char* _Filename, ios_base::openmode _Mode)
{
_Myios::clear();
}
-#else
- if (_M_filebuf.open(_Filename, _Mode | ios_base::out) == 0)
- {
- this->setstate(ios_base::failbit);
- }
- else
- {
- this->clear();
- }
-#endif
}
void llofstream::close()
{ // close the C stream
if (_M_filebuf.close() == 0)
{
-#if LL_WINDOWS
_Myios::setstate(ios_base::failbit);
-#else
- this->setstate(ios_base::failbit);
-#endif
}
}
@@ -1134,4 +994,4 @@ std::streamsize llofstream_size(llofstream& ofstr)
return pos_end - pos_beg;
}
-
+#endif // LL_WINDOWS
diff --git a/indra/llcommon/llfile.h b/indra/llcommon/llfile.h
index 44a1e42fa5..347c9867aa 100755
--- a/indra/llcommon/llfile.h
+++ b/indra/llcommon/llfile.h
@@ -86,12 +86,6 @@ public:
static const char * tmpdir();
};
-// Remove ll[io]fstream support for [LL]FILE*, preparing to remove dependency
-// on GNU's standard library.
-#if ! defined(llstream_LLFILE)
-#define llstream_LLFILE 0
-#endif
-
/**
* @brief Provides a layer of compatibility for C/POSIX.
*
@@ -198,7 +192,7 @@ protected:
#endif
};
-
+#if LL_WINDOWS
/**
* @brief Controlling input for files.
*
@@ -207,11 +201,11 @@ protected:
* sequence, an instance of std::basic_filebuf (or a platform-specific derivative)
* which allows construction using a pre-exisintg file stream buffer.
* We refer to this std::basic_filebuf (or derivative) as @c sb.
-*/
+ */
class LL_COMMON_API llifstream : public std::istream
{
// input stream associated with a C stream
-public:
+ public:
// Constructors:
/**
* @brief Default constructor.
@@ -219,7 +213,7 @@ public:
* Initializes @c sb using its default constructor, and passes
* @c &sb to the base class initializer. Does not open any files
* (you haven't given it a filename to open).
- */
+ */
llifstream();
/**
@@ -228,50 +222,21 @@ public:
* @param Mode Open file in specified mode (see std::ios_base).
*
* @c ios_base::in is automatically included in @a mode.
- */
+ */
explicit llifstream(const std::string& _Filename,
- ios_base::openmode _Mode = ios_base::in);
+ ios_base::openmode _Mode = ios_base::in);
explicit llifstream(const char* _Filename,
- ios_base::openmode _Mode = ios_base::in);
-
-#if llstream_LLFILE
- /**
- * @brief Create a stream using an open c file stream.
- * @param File An open @c FILE*.
- @param Mode Same meaning as in a standard filebuf.
- @param Size Optimal or preferred size of internal buffer, in chars.
- Defaults to system's @c BUFSIZ.
- */
- explicit llifstream(_Filet *_File,
- ios_base::openmode _Mode = ios_base::in,
- //size_t _Size = static_cast(BUFSIZ));
- size_t _Size = static_cast(1));
-
- /**
- * @brief Create a stream using an open file descriptor.
- * @param fd An open file descriptor.
- @param Mode Same meaning as in a standard filebuf.
- @param Size Optimal or preferred size of internal buffer, in chars.
- Defaults to system's @c BUFSIZ.
- */
-#if !LL_WINDOWS
- explicit llifstream(int __fd,
- ios_base::openmode _Mode = ios_base::in,
- //size_t _Size = static_cast(BUFSIZ));
- size_t _Size = static_cast(1));
-#endif
-#endif // llstream_LLFILE
+ ios_base::openmode _Mode = ios_base::in);
/**
* @brief The destructor does nothing.
*
* The file is closed by the filebuf object, not the formatting
* stream.
- */
+ */
virtual ~llifstream() {}
// Members:
-#if llstream_LLFILE
/**
* @brief Accessing the underlying buffer.
* @return The current basic_filebuf buffer.
@@ -280,12 +245,11 @@ public:
*/
llstdio_filebuf* rdbuf() const
{ return const_cast(&_M_filebuf); }
-#endif // llstream_LLFILE
/**
* @brief Wrapper to test for an open file.
* @return @c rdbuf()->is_open()
- */
+ */
bool is_open() const;
/**
@@ -295,22 +259,22 @@ public:
*
* Calls @c llstdio_filebuf::open(s,mode|in). If that function
* fails, @c failbit is set in the stream's error state.
- */
+ */
void open(const std::string& _Filename,
- ios_base::openmode _Mode = ios_base::in)
+ ios_base::openmode _Mode = ios_base::in)
{ open(_Filename.c_str(), _Mode); }
void open(const char* _Filename,
- ios_base::openmode _Mode = ios_base::in);
+ ios_base::openmode _Mode = ios_base::in);
/**
* @brief Close the file.
*
* Calls @c llstdio_filebuf::close(). If that function
* fails, @c failbit is set in the stream's error state.
- */
+ */
void close();
-private:
+ private:
llstdio_filebuf _M_filebuf;
};
@@ -326,7 +290,7 @@ private:
*/
class LL_COMMON_API llofstream : public std::ostream
{
-public:
+ public:
// Constructors:
/**
* @brief Default constructor.
@@ -334,7 +298,7 @@ public:
* Initializes @c sb using its default constructor, and passes
* @c &sb to the base class initializer. Does not open any files
* (you haven't given it a filename to open).
- */
+ */
llofstream();
/**
@@ -344,39 +308,11 @@ public:
*
* @c ios_base::out|ios_base::trunc is automatically included in
* @a mode.
- */
+ */
explicit llofstream(const std::string& _Filename,
- ios_base::openmode _Mode = ios_base::out|ios_base::trunc);
+ ios_base::openmode _Mode = ios_base::out|ios_base::trunc);
explicit llofstream(const char* _Filename,
- ios_base::openmode _Mode = ios_base::out|ios_base::trunc);
-
-#if llstream_LLFILE
- /**
- * @brief Create a stream using an open c file stream.
- * @param File An open @c FILE*.
- @param Mode Same meaning as in a standard filebuf.
- @param Size Optimal or preferred size of internal buffer, in chars.
- Defaults to system's @c BUFSIZ.
- */
- explicit llofstream(_Filet *_File,
- ios_base::openmode _Mode = ios_base::out,
- //size_t _Size = static_cast(BUFSIZ));
- size_t _Size = static_cast(1));
-
- /**
- * @brief Create a stream using an open file descriptor.
- * @param fd An open file descriptor.
- @param Mode Same meaning as in a standard filebuf.
- @param Size Optimal or preferred size of internal buffer, in chars.
- Defaults to system's @c BUFSIZ.
- */
-#if !LL_WINDOWS
- explicit llofstream(int __fd,
- ios_base::openmode _Mode = ios_base::out,
- //size_t _Size = static_cast(BUFSIZ));
- size_t _Size = static_cast(1));
-#endif
-#endif // llstream_LLFILE
+ ios_base::openmode _Mode = ios_base::out|ios_base::trunc);
/**
* @brief The destructor does nothing.
@@ -387,7 +323,6 @@ public:
virtual ~llofstream() {}
// Members:
-#if llstream_LLFILE
/**
* @brief Accessing the underlying buffer.
* @return The current basic_filebuf buffer.
@@ -396,7 +331,6 @@ public:
*/
llstdio_filebuf* rdbuf() const
{ return const_cast(&_M_filebuf); }
-#endif // llstream_LLFILE
/**
* @brief Wrapper to test for an open file.
@@ -411,22 +345,22 @@ public:
*
* Calls @c llstdio_filebuf::open(s,mode|out). If that function
* fails, @c failbit is set in the stream's error state.
- */
+ */
void open(const std::string& _Filename,
- ios_base::openmode _Mode = ios_base::out|ios_base::trunc)
+ ios_base::openmode _Mode = ios_base::out|ios_base::trunc)
{ open(_Filename.c_str(), _Mode); }
void open(const char* _Filename,
- ios_base::openmode _Mode = ios_base::out|ios_base::trunc);
+ ios_base::openmode _Mode = ios_base::out|ios_base::trunc);
/**
* @brief Close the file.
*
* Calls @c llstdio_filebuf::close(). If that function
* fails, @c failbit is set in the stream's error state.
- */
+ */
void close();
-private:
+ private:
llstdio_filebuf _M_filebuf;
};
@@ -441,4 +375,12 @@ private:
std::streamsize LL_COMMON_API llifstream_size(llifstream& fstr);
std::streamsize LL_COMMON_API llofstream_size(llofstream& fstr);
+#else // ! LL_WINDOWS
+
+// on non-windows, llifstream and llofstream are just mapped directly to the std:: equivalents
+typedef std::ifstream llifstream;
+typedef std::ofstream llofstream;
+
+#endif // LL_WINDOWS or ! LL_WINDOWS
+
#endif // not LL_LLFILE_H
diff --git a/indra/llcommon/llliveappconfig.cpp b/indra/llcommon/llliveappconfig.cpp
index 7c87c5a1a0..a9b1cdf4f6 100755
--- a/indra/llcommon/llliveappconfig.cpp
+++ b/indra/llcommon/llliveappconfig.cpp
@@ -49,7 +49,7 @@ bool LLLiveAppConfig::loadFile()
{
LL_INFOS() << "LLLiveAppConfig::loadFile(): reading from "
<< filename() << LL_ENDL;
- llifstream file(filename());
+ llifstream file(filename().c_str());
LLSD config;
if (file.is_open())
{
diff --git a/indra/llcommon/lllivefile.cpp b/indra/llcommon/lllivefile.cpp
index c1987baf55..ea485c2d86 100755
--- a/indra/llcommon/lllivefile.cpp
+++ b/indra/llcommon/lllivefile.cpp
@@ -51,6 +51,8 @@ public:
bool mLastExists;
LLEventTimer* mEventTimer;
+private:
+ LOG_CLASS(LLLiveFile);
};
LLLiveFile::Impl::Impl(const std::string& filename, const F32 refresh_period)
@@ -83,46 +85,51 @@ LLLiveFile::~LLLiveFile()
bool LLLiveFile::Impl::check()
{
- if (!mForceCheck && mRefreshTimer.getElapsedTimeF32() < mRefreshPeriod)
+ bool detected_change = false;
+ // Skip the check if not enough time has elapsed and we're not
+ // forcing a check of the file
+ if (mForceCheck || mRefreshTimer.getElapsedTimeF32() >= mRefreshPeriod)
{
- // Skip the check if not enough time has elapsed and we're not
- // forcing a check of the file
- return false;
- }
- mForceCheck = false;
- mRefreshTimer.reset();
+ mForceCheck = false; // force only forces one check
+ mRefreshTimer.reset(); // don't check again until mRefreshPeriod has passed
- // Stat the file to see if it exists and when it was last modified.
- llstat stat_data;
- int res = LLFile::stat(mFilename, &stat_data);
-
- if (res)
- {
- // Couldn't stat the file, that means it doesn't exist or is
- // broken somehow. Clear flags and return.
- if (mLastExists)
- {
- mLastExists = false;
- return true; // no longer existing is a change!
- }
- return false;
- }
-
- // The file exists, decide if we want to load it.
- if (mLastExists)
- {
- // The file existed last time, don't read it if it hasn't changed since
- // last time.
- if (stat_data.st_mtime <= mLastModTime)
- {
- return false;
- }
- }
-
- // We want to read the file. Update status info for the file.
- mLastExists = true;
- mLastStatTime = stat_data.st_mtime;
- return true;
+ // Stat the file to see if it exists and when it was last modified.
+ llstat stat_data;
+ if (LLFile::stat(mFilename, &stat_data))
+ {
+ // Couldn't stat the file, that means it doesn't exist or is
+ // broken somehow.
+ if (mLastExists)
+ {
+ mLastExists = false;
+ detected_change = true; // no longer existing is a change!
+ LL_DEBUGS() << "detected deleted file '" << mFilename << "'" << LL_ENDL;
+ }
+ }
+ else
+ {
+ // The file exists
+ if ( ! mLastExists )
+ {
+ // last check, it did not exist - that counts as a change
+ LL_DEBUGS() << "detected created file '" << mFilename << "'" << LL_ENDL;
+ detected_change = true;
+ }
+ else if ( stat_data.st_mtime > mLastModTime )
+ {
+ // file modification time is newer than last check
+ LL_DEBUGS() << "detected updated file '" << mFilename << "'" << LL_ENDL;
+ detected_change = true;
+ }
+ mLastExists = true;
+ mLastStatTime = stat_data.st_mtime;
+ }
+ }
+ if (detected_change)
+ {
+ LL_INFOS() << "detected file change '" << mFilename << "'" << LL_ENDL;
+ }
+ return detected_change;
}
void LLLiveFile::Impl::changed()
diff --git a/indra/llcommon/llmd5.cpp b/indra/llcommon/llmd5.cpp
index ed80af36d8..f942a976b7 100755
--- a/indra/llcommon/llmd5.cpp
+++ b/indra/llcommon/llmd5.cpp
@@ -118,6 +118,12 @@ void LLMD5::update (const uint1 *input, const uint4 input_length) {
buffer_space = 64 - buffer_index; // how much space is left in buffer
+ // now, transform each 64-byte piece of the input, bypassing the buffer
+ if (input == NULL || input_length == 0){
+ std::cerr << "LLMD5::update: Invalid input!" << std::endl;
+ return;
+ }
+
// Transform as many times as possible.
if (input_length >= buffer_space) { // ie. we have enough to fill the buffer
// fill the rest of the buffer and transform
@@ -127,12 +133,6 @@ void LLMD5::update (const uint1 *input, const uint4 input_length) {
buffer_space);
transform (buffer);
- // now, transform each 64-byte piece of the input, bypassing the buffer
- if (input == NULL || input_length == 0){
- std::cerr << "LLMD5::update: Invalid input!" << std::endl;
- return;
- }
-
for (input_index = buffer_space; input_index + 63 < input_length;
input_index += 64)
transform (input+input_index);
diff --git a/indra/llcommon/llmemory.cpp b/indra/llcommon/llmemory.cpp
index e0b2aa87c2..ae11988df8 100755
--- a/indra/llcommon/llmemory.cpp
+++ b/indra/llcommon/llmemory.cpp
@@ -63,13 +63,18 @@ LLPrivateMemoryPoolManager::mem_allocation_info_t LLPrivateMemoryPoolManager::sM
void ll_assert_aligned_func(uintptr_t ptr,U32 alignment)
{
-#ifdef SHOW_ASSERT
- // Redundant, place to set breakpoints.
- if (ptr%alignment!=0)
- {
- LL_WARNS() << "alignment check failed" << LL_ENDL;
- }
- llassert(ptr%alignment==0);
+#if defined(LL_WINDOWS) && defined(LL_DEBUG_BUFFER_OVERRUN)
+ //do not check
+ return;
+#else
+ #ifdef SHOW_ASSERT
+ // Redundant, place to set breakpoints.
+ if (ptr%alignment!=0)
+ {
+ LL_WARNS() << "alignment check failed" << LL_ENDL;
+ }
+ llassert(ptr%alignment==0);
+ #endif
#endif
}
@@ -2148,3 +2153,60 @@ void LLPrivateMemoryPoolTester::fragmentationtest()
}
#endif
//--------------------------------------------------------------------
+
+#if defined(LL_WINDOWS) && defined(LL_DEBUG_BUFFER_OVERRUN)
+
+#include