Commit Graph

50 Commits (7c42711ca3a4e67b95473aa5129dce5ff19bea15)

Author SHA1 Message Date
Ansariel 9f6b8484df Re-enable compiler warnings C4127, C4512 & C4706
Disable particular CRT and WinSock API warnings for functions Microsoft considers unsafe/deprecated
2024-06-11 01:56:08 +03:00
Ansariel b42f9d836b Re-enable a lot of compiler warnings for MSVC and address the C4267 "possible loss of precision" warnings 2024-06-01 15:49:26 +02:00
Andrey Lihatskiy 1b68f71348 #824 Process source files in bulk: replace tabs with spaces, convert CRLF to LF, and trim trailing whitespaces as needed 2024-04-29 07:56:09 +03: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
andreykproductengine 66502df050 MAINT-8540 Eliminated a lot of xui related log warnings on startup and opening preferences 2018-04-20 20:21:20 +03: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
andreykproductengine 759b4f14d8 MAINT-6828 Removed unnessesary spam in logs 2016-10-13 22:49:06 +03:00
Oz Linden c8726aba30 remove execute permission from many files that should not have it 2015-11-10 09:48:56 -05:00
Nat Goodspeed e9be710daf Strip down the Windows ll[io]fstream implementations to constructors
and open() methods. The only remaining value added by ll[io]fstream over
std::[io]stream is proper handling of non-ASCII pathnames, which can be done
by deriving from std::[io]stream, converting pathname strings and passing them
to the corresponding base-class methods.
This is only necessary on Windows. On Posix, ll[io]fstream are already
typedefs for std::[io]fstream.
This change removes a significant volume of cruft from llfile.{h,cpp}.
2015-04-15 13:26:32 -04:00
Oz Linden 5c6cf3e7fb restore the ll[io]fstream because we need them as wrappers on Windows for wide char paths; on other platforms they are now just typedefs to the std classes 2015-04-10 11:02:37 -04:00
Oz Linden 8b42c7898e replace llifstream and llofstream with std::ifstream and std::ofstream respectively 2015-04-07 17:59:28 -04:00
Oz Linden 3a57b18896 convert llifstream and llofstream to std::ifstream and std::ofstream respectively 2015-04-07 17:28:05 -04:00
Nat Goodspeed ae6440eecc MAINT-4744: Eliminate viewer dependency on (old) GNU libstdc++.
To be more accurate, this changeset doesn't actually eliminate the dependency:
it eliminates the use cases for the llifstream / llofstream feature that
requires it.
Currently you can construct an llifstream or llofstream from an open LLFILE*
file handle (or, except on Windows, an int file descriptor). But rather than
containing a streambuf implementation based on FILE*, llfile.h relies on the
fact that the Windows std::filebuf happens to support that as a nonstandard
extension; also on a nonstandard GNU extension __gnu_cxx::stdio_filebuf<char>.
To move from GNU libstdc++ to clang's libc++ (the direction on Mac), we could
code a streambuf that supports FILE*. But before doing that, it's worth asking
whether anyone actually uses this questionable feature.
In fact there were only two methods: LLWearable::exportFile() and importFile()
-- and only one call to either, in LLViewerWearable::saveNewAsset(). The code
in saveNewAsset() opened the LLFILE* immediately before calling exportFile(),
meaning we could reasonably push the open operation down into exportFile().
That logic was complex anyway due to the need for the caller to close the
LLFILE* regardless of the success of the exportFile().
Change LLWearable::exportFile() and importFile() to accept a std::string
filename rather than an open LLFILE*. Change LLViewerWearable::saveNewAsset()
to simply call exportFile(filename) rather than horsing around with an LLFILE*
handle. (This improves the code in another way too: it encapsulates the need
to open the relevant file in binary mode. Previously, each caller had to
remember to do that.)
To prevent inadvertent reintroduction of ll[io]fstream(LLFILE*) code, add
llstream_LLFILE preprocessor macro (default 0) to control access to the
relevant constructors. Also suppress rdbuf() override, the only method whose
signature references llstdio_filebuf.
2015-01-28 15:55:18 -05:00
callum_linden aca7976b87 Update to build on Xcode 6.0: turn BACK ON warnings as errors for overloaded virtuals [-Woverloaded-virtual] and fix up first (of many) files 2014-10-17 13:05:04 -07:00
Richard Linden 98aabdc176 merge with release 2014-04-07 19:09:40 -07:00
Aura Linden d2bb4dae98 Fixes for crash reporter startup race condition, crash reporter CPU use, Secondlife.log filehandle, XP Crash. 2014-03-07 14:58:22 -08:00
Richard Linden a2a6bf20d7 merge with release 2013-06-20 16:46:23 -07:00
Richard Linden 0a96b47663 merge with viewer-release 2013-06-05 19:05:43 -07:00
Graham Madarasz 6074f65991 Merge with vwr-dev-mat 2013-05-10 10:34:26 -07:00
Graham Madarasz 025c890958 Merge vwr-dev-mat 2013-05-01 08:11:15 -07:00
Graham Madarasz 806d09b114 Merge 3.5.1 into Materials 2013-04-30 19:50:05 -07:00
Oz Linden bfb1ab134f merge changes for 3.5.1-beta3 2013-04-23 14:29:24 -04:00
Nyx Linden 06d7845a5a SUN-72 SH-4132 FIX viewer builds cannot write to paths containing special characters.
Integrated Nicky Dasmijn's patch to handle the unicode file paths properly.
Code reviewed, patch was clean.
Tested locally, correctly allows wearables to load where they would fail before.
Should be ready for automated build & QA.
2013-04-22 19:14:24 -04:00
Oz Linden ddd5659f81 merge changes for DRTVWR-294 2013-04-19 10:11:29 -04:00
Graham Madarasz bf6182daa8 Update Mac and Windows breakpad builds to latest 2013-03-29 07:50:08 -07:00
Richard Linden 9d77e030d9 SH-3406 WIP convert fast timers to lltrace system
cleaning up build
moved most includes of windows.h to llwin32headers.h to disable min/max macros, etc
streamlined Time class and consolidated functionality in BlockTimer class
llfasttimer is no longer included via llstring.h, so had to add it manually in several places
2012-11-14 23:52:27 -08:00
developer@Developer-PC ecf72da021 More windows build fixes 2012-09-21 22:21:42 -07:00
Don Kjer 7d62343f44 Skipping experimental filebuffering code on windows for now 2012-09-20 04:56:09 +00:00
Don Kjer 7153d1db11 Partial rewrite of llifstream and llofstream (Windows implementation pending). Moved more functionality from llviewerwearable to llwearable 2012-09-20 04:29:17 +00:00
Nat Goodspeed 54228ddf50 IQA-463: Add error logging for certain LLFile operations.
Attempting to debug an observed LLFile::remove() failure, I was floored to
find that remove() made no attempt whatsoever to report its lack of success!
Add warnif() function to log errno text in platform-dependent way. Support the
notion that for some functions, certain errno values are acceptable -- e.g. we
expect stat() to frequently hit ENOENT -- and need not be logged.
Add commented-out Windows-specific logic to try to provide further information
in the case of EACCES ("Permission denied," e.g. another process has the file
open). To use, enable the code block, download handle.exe and turn on DEBUG
logging for LLFile. handle.exe can be obtained from:
http://technet.microsoft.com/en-us/sysinternals/bb896655
2012-04-18 15:34:15 -04:00
Don Kjer e3e6d429d4 Merge from http://bitbucket.org/simon_linden/viewer-dev 2010-12-08 17:23:38 -08:00
Dave SIMmONs 0dce88bc92 ER-330 : Improve ObjectUpdateCached message packing. Added some viewer metrics, will disable later. 2010-11-19 16:49:24 -08:00
Mark Palange (Mani) 8c2026d6b7 CHOP-135 Bug fixes. 2010-11-18 21:57:27 -08:00
Oz Linden 06b0d72efa Change license from GPL to LGPL (version 2.1) 2010-08-13 07:24:57 -04:00
Aaron Brashears e3cf284388 Result of svn merge -r107256:107258 svn+ssh://svn/svn/user/phoenix/license_2009_merge into trunk. QAR-1165 2009-01-08 00:05:06 +00:00
Steven Bennetts 25c10ed028 QAR-628 merge string-cleanup-5 -r 90476:90508 -> release
dataserver-is-deprecated
2008-06-26 00:39:00 +00:00
Bryan O'Sullivan 9db949eec3 svn merge -r88066:88786 svn+ssh://svn.lindenlab.com/svn/linden/branches/cmake-9-merge
dataserver-is-deprecated
for-fucks-sake-whats-with-these-commit-markers
2008-06-02 21:14:31 +00:00
Steven Bennetts 63e7894148 QAR-570 maint-render-4 merge
merge -r 87067:87077 svn+ssh://svn.lindenlab.com/svn/linden/branches/maint-render/maint-render-4-merge -> release. dataserver-is-deprecated.
2008-05-08 18:41:20 +00:00
Steven Bennetts 6fcf38217e merge release@82858 maint-render-2-merge@83010 -> release
QAR-389
2008-03-25 22:50:26 +00:00
Steven Bennetts e3b97ac65b merge release@82383 viewer-cleanup2-7-merge@82828
QAR-369
2008-03-20 21:41:26 +00:00
Steven Bennetts 672a76d0ea reverting premature commit at 82410. 2008-03-15 01:18:27 +00:00
Mark Palange 04611efae8 [NOTE: This was an erroneous commit, and was reverted in the next revision]
QAR-369 - viewer-cleanup2-7 81916 merged into release.
2008-03-14 23:21:38 +00:00
Brad Kittenbrink 6d52efe452 Merge of windlight into release (QAR-286). This includes all changes in
windlight14 which have passed QA (up through r79932).

svn merge -r 80831:80833 svn+ssh://svn.lindenlab.com/svn/linden/branches/merge_windlight14_r80620
2008-02-27 18:58:14 +00:00
Josh Bell 8bd6a0b321 svn merge -r 79445:79449 svn+ssh://svn.lindenlab.com/svn/linden/qa/maintenance-5-merge-79386
QAR-242 merge of maintenance-5 (QAR-203)
* DEV-6548 Copy To Inventory fail to execute without any output feedback when Notecard has changes but not saved
* DEV-7600 Deleting someone else's object in god mode crashes sim
* DEV-5329 LLSD parsers should determine and set maximum parse sizes
* DEV-7473 Resolve instant message crash report
* DEV-2904 Presence Issues not (apparently) caused by scripted attachments
* DEV-7083 Investigate Null Folder IDs Bug that caused 470K inventory items with Null Folder IDS on the Grid
* DEV-2865 Textures/Snapshots in a notecard are opened again when you click copy to inventory.
* DEV-6612 VWR-3290: Linux scons build script doesn't work with distcc
* DEV-8002 c++ llsd notation parser accepts malformed data
* DEV-8001 c++ xml parse returns wrong number of elements parsed
* DEV-8089 Double delete in statc structured data parse functions
* DEV-5326 Any viewer can request presence information for any agent
* DEV-2378 python service builder does not sort query string
* DEV-7872 Block teleport off teen grid sub-estates like Schome Park / Open University
* DEV-4465 Add a "logfile" command line option to the sim to create log files
2008-02-07 17:15:18 +00:00
Aaron Brashears 5595a99623 Result of svn merge -r71162:71205 svn+ssh://svn/svn/linden/branches/new-license into release. only changes files which are not deployed or the comments section of code. 2007-10-04 23:19:43 +00:00
Kelly Washington e03bb0606a merge -r62831:64079 branches/maintenance to release 2007-06-21 22:40:22 +00:00
Steven Bennetts 4dabd9c047 merge release@58699 beta-1-14-0@58707 -> release 2007-03-02 21:25:50 +00:00
Mark Lentczner d0d4670f49 merge in of error-refactor-3
concludes (fixes) SL-31187
pair programmed and reviewed by markl and karen
2007-02-06 00:57:33 +00:00
Aaron Brashears 305c74d516 Result of svn merge -r57264:57370 svn+ssh://svn/svn/linden/branches/adroit.r40-68 into release. 2007-02-02 17:28:58 +00:00
James Cook 420b91db29 Print done when done. 2007-01-02 08:33:20 +00:00