Commit Graph

311 Commits (bd008a170898e69beeb8bc0481b4bfd94de86c55)

Author SHA1 Message Date
Nat Goodspeed 271e0c6e80 Automated merge with ssh://bitbucket.org/nat_linden/viewer-llsingleton 2019-12-09 14:46:16 -05:00
Nat Goodspeed 55d7ac5e81 DRTVWR-494: Use std:🧵:id for LLThread::currentID().
LLThread::currentID() used to return a U32, a distinct unsigned value
incremented by explicitly constructing LLThread or by calling LLThread::
registerThreadID() early in a thread launched by other means. The latter
imposed an unobvious requirement on new code based on std::thread. Using
std:🧵:id instead delegates to the compiler/library the problem of
distinguishing threads launched by any means.

Change lots of explicit U32 declarations. Introduce LLThread::id_t typedef to
avoid having to run around fixing uses again if we later revisit this decision.

LLMutex, which stores an LLThread::id_t, wants a distinguished value meaning
NO_THREAD, and had an enum with that name. But as std:🧵:id promises
that the default-constructed value is distinct from every valid value,
NO_THREAD becomes unnecessary and goes away.

Because LLMutex now stores LLThread::id_t instead of U32, make llmutex.h
#include "llthread.h" instead of the other way around. This makes LLMutex an
incomplete type within llthread.h, so move LLThread::lockData() and
unlockData() to the .cpp file. Similarly, remove llrefcount.h's #include
"llmutex.h" to break circularity; instead forward-declare LLMutex.

It turns out that a number of source files assumed that #include "llthread.h"
would get the definition for LLMutex. Sprinkle #include "llmutex.h" as needed.

In the SAFE_SSL code in llcorehttp/httpcommon.cpp, there's an ssl_thread_id()
callback that returns an unsigned long to the SSL library. When LLThread::
currentID() was U32, we could simply return that. But std:🧵:id is very
deliberately opaque, and can't be reinterpret_cast to unsigned long.
Fortunately it can be hashed because std::hash is specialized with that type.
2019-12-06 16:31:49 -05:00
Nat Goodspeed 279594dcc1 Automated merge with ssh://bitbucket.org/lindenlab/viewer-release 2019-10-15 13:56:39 -04:00
Anchor 2c2bdcf348 [DRTVWR-476] - fix compiler errors 32 bit windows build 2019-06-10 15:56:44 -07:00
andreykproductengine 930bf680c2 SL-10423 Dump path data when missing critical file 2019-06-03 21:37:43 +03:00
AndreyL ProductEngine 36cb6933e6 Merged in lindenlab/viewer-release 2019-03-01 02:24:00 +02:00
andreykproductengine fa15830e02 SL-10291 Replace apr_atomic with standard C++11 functionality 2019-01-15 18:31:17 +02:00
andreykproductengine 346fc435f1 SL-10291 cleanup-mutex 2019-01-17 01:53:27 +02:00
andreykproductengine 26fae750ba SL-10291 Replace apr_mutex with standard C++11 functionality 2019-01-14 22:04:44 +02:00
Nat Goodspeed 4a13657285 SL-10153: auto name{expression} declares an initializer_list
instead of a variable of type decltype(expression).

Using SHGetKnownFolderPath(FOLDERID_Fonts) in LLFontGL::getFontPathSystem()
requires new Windows #include files.

A variable with a constructor can't be declared within the braces of a switch
statement, even outside any of its case clauses.
2018-12-15 09:13:24 -05:00
Nat Goodspeed c4096f670c SL-10153: Review and rationalize fetching paths from environment.
Use LLStringUtil::getenv() or getoptenv() whenever we fetch a string that will
be used as a pathname.

Use LLFile::tmpdir() instead of getenv("TEMP").

As an added extra-special bonus, finally clean up $TMP/llcontrol-test-zzzzzz
directories that have been accumulating every time we run a local build!
2018-12-14 15:38:13 -05:00
Nat Goodspeed bb4a649b9c SL-10153: Validate APPDATA, LOCALAPPDATA by checking existence. 2018-12-11 15:47:29 -05:00
Nat Goodspeed 9479d422d4 SL-10153: Use a degenerate singleton for PRELOG log file.
The previous build declared a static std::ofstream; but the code that
determines the pathname for the log file is called so early that static
objects have not yet been constructed. Declare a pointer instead, and
instantiate it on demand.
2018-12-10 17:14:31 -05:00
Nat Goodspeed 601cbe1f60 SL-10153: Add ole32 to WINDOWS_LIBRARIES so it's everywhere we need. 2018-12-08 12:18:46 -05:00
Nat Goodspeed a4eb5056a7 SL-10153: Need ole32 for new Windows call to CoTaskMemFree(). 2018-12-08 11:26:37 -05:00
Nat Goodspeed a36cd3a292 SL-10153: Try to handle non-English non-ASCII Windows APPDATA. 2018-12-08 10:30:18 -05:00
Nat Goodspeed 758e7e8df7 SL-10174: LOCALAPPDATA bad? Try SHGetFolderPath(CSIDL_LOCAL_APPDATA).
This logic is essentially copy-and-edited from the same suspenders-and-belt
concerning APPDATA and CSIDL_APPDATA for SL-10153.
2018-12-06 14:33:51 -05:00
Nat Goodspeed 7a336f63cc SL-10153: If $APPDATA isn't already good, try SHGetFolderPath().
In that case, also update $APPDATA for child processes.
2018-12-05 16:57:00 -05:00
Nat Goodspeed 036c52fcdf Automated merge with ssh://bitbucket.org/nat_linden/viewer-poseidon 2018-10-17 10:31:59 -04:00
Nat Goodspeed 289813994e DRTVWR-474: Clean up use of LLDir::getAppRODataDir(), esp. on Mac.
Clearly it's not obvious to maintainers that on the Mac, getAppRODataDir()
returns the app's Resources directory: in a number of places the code starts
with the executable directory and appends "../Resources" to find that.
2018-09-13 16:20:05 -04:00
Oz Linden 9fd463bd94 remove only-partially-successful attempt to put teamcity blocks around targets 2018-09-07 09:13:57 -04:00
Oz Linden 49c483eeb3 add more block structure to TeamCity log output for components 2018-09-05 18:07:35 -04:00
Nat Goodspeed db970c1a5f Don't compare rbegin() iterators, use LLStringUtil::endsWith().
I think the intention of (sDumpDir.rbegin() == mDirDelimiter.rbegin()) was to
test whether sDumpDir endsWith(mDirDelimiter). But those iterators will never
be equal. Instead, use LLStringUtil::endsWith().
2018-08-21 19:23:33 -04:00
andreykproductengine 5a273d430a MAINT-8297 path fix #2 2018-03-02 19:46:06 +02:00
andreykproductengine 806262c388 MAINT-8297 path fix 2018-03-02 18:47:35 +02:00
andreykproductengine 5100abb778 MAINT-8297 Cleanup 2018-03-01 02:44:08 +02:00
andreykproductengine 481713000b MAINT-8183 Fixed some exit issues and crashes 2018-02-22 15:23:14 +02:00
Andrey Kleshchev e55fcbeeee MAINT-8297 Removing old ca bundle 2018-02-21 17:32:06 +00:00
andreykproductengine b2f61c0e0b MAINT-8297 Fixed "Missing CA File" message when running under debugger on windows 2018-02-15 21:48:18 +02:00
AndreyL ProductEngine e6765df1ba Merged in lindenlab/viewer-bear 2018-02-12 21:15:00 +02:00
maxim_productengine 7379605d65 MAINT-8047 [Mac] Incorrect VFS (cache) creation time is shown in "help>about SL" 2018-01-23 18:14:04 +02:00
Oz Linden d7c8678c3a merge 5.1.0-release 2018-01-17 12:43:28 -05:00
Nat Goodspeed 5002bf5660 MAINT-8087: Use env vars from VMP for AppData\Roaming and Local.
On Windows, when logged in with a non-ASCII username, every one of the three
documented APIs -- SHGetSpecialFolderPath(), SHGetFolderPath() and
SHGetKnownFolderPath() -- fails to retrieve any pathname at all. We cannot
account for the fact that the oldest of these continues to work with the
release viewer and within a Python script (though not, curiously, from a
Python interactive session). With a non-ASCII username, they consistently fail
when called from an Alex Ivy viewer build: "The filename, directory name, or
volume label syntax is incorrect."

Empirically, with a non-ASCII username, the preset APPDATA and LOCALAPPDATA
environment variables are also useless, e.g. c:\Users\??????\AppData\Roaming
where those are, yup, actual question marks.

Empirically, the VMP is able to successfully call SHGetFolderPath() to
retrieve both AppData\Roaming and AppData\Local. Therefore, we make the VMP
set the APPDATA and LOCALAPPDATA environment variables to the UTF-8 encoded
correct pathnames. Instead of calling SHGetSomethingFolderPath() at all, make
LLDir_Win32 retrieve those environment variables.

Make LLFile::mkdir() treat "directory already exists" as a success case. Every
single call fell into one of two categories: either it didn't check success at
all, or it tested specially to exempt errno == EEXIST. Migrate that test into
mkdir(); eliminate it from call sites.

Make LLDir::append() and add() convenience functions accept variadic
arguments. Replace add(add()...) constructs, as well as clumsy concatenations
of directory names and getDirDelimiter(), with simple variadic add() calls.
2017-12-20 22:51:26 -05:00
Nat Goodspeed 867b5f5a90 MAINT-8087: #include header for CoTaskMemFree() function
which is required to free the pointer returned by SHGetKnownFolderPath().
2017-12-14 18:47:15 -05:00
Nat Goodspeed bdea97399b MAINT-8087: Use SHGetKnownFolderPath(), not SHGetSpecialFolderPath().
SHGetSpecialFolderPath() is deprecated, and empirically it appears to be
failing when the user name contains non-ASCII characters. The relevant
Microsoft documentation pages recommend calling SHGetKnownFolderPath()
instead.

Also, the SHGetSpecialFolderPath() calls had no error checking or reporting,
which is why we can only say it "appears to be" failing. Make sure that if
SHGetKnownFolderPath() fails, at least we try to tell somebody about it.
2017-12-14 17:54:06 -05:00
Nat Goodspeed 0c7bc67814 Automated merge with ssh://bitbucket.org/lindenlab/viewer-release 2017-10-11 14:35:49 -04:00
Oz Linden d62ad1ef8a merge changes for 5.0.8-release 2017-10-11 09:13:55 -04:00
Oz Linden bcf5dc079a merge changes for 5.0.7-release 2017-08-23 09:19:59 -04:00
Oz Linden 01e0b78c59 merge changes for DRTVWR-439 2017-08-16 15:43:58 -04:00
andreykproductengine 83e7b7a939 MAINT-7691 Fixed cache not clearing correctly and incapability to find dump files in case of unicode path 2017-08-18 20:23:06 +03:00
Oz Linden 069dd355f9 merge changes for 5.0.5-release 2017-05-23 04:56:13 -04:00
Nat Goodspeed fe64db61d6 Automated merge with ssh://bitbucket.org/lindenlab/viewer-release 2017-05-22 21:30:26 -04:00
AndreyL ProductEngine d4d56f004a MAINT-7074 Fixed ability to escape from skin directory with <icon> 2017-04-19 21:19:04 +03:00
Nat Goodspeed 434f0e161a Automated merge with ssh://bitbucket.org/lindenlab/viewer-release 2017-02-03 09:54:52 -05:00
Oz Linden 1925fd2b8b merge changes for 5.0.1-release 2017-02-02 15:49:16 -05:00
Nat Goodspeed c992a6df9f DRTVWR-418: std::string::find() returns std::string::size_type.
Storing it in a U32 and then comparing it to std::string::npos isn't going to
work in 64 bit land.
2016-12-20 09:20:38 -05:00
andreykproductengine bb8609fa94 MAINT-5100 Fixed viewer not finding sky files at login 2017-05-25 18:09:52 +03:00
Nat Goodspeed 3cf542d81d DRTVWR-418: Store std::string::find() result in size_t, not U32.
In a 64-bit build, std::string::npos is way bigger than a U32.
2016-12-15 09:35:12 -05:00
Oz Linden fd2ccb1606 merge changes for 4.1.2-release 2016-11-16 09:52:59 -05:00
andreykproductengine cfbc2028ef MAINT-6920 More information in About Second Life floater 2016-11-14 20:13:18 +02:00