summaryrefslogtreecommitdiff
path: root/indra/llcommon/llfile.h
AgeCommit message (Collapse)Author
2024-08-19Refactor LLFileSystem for and fix an old issue in LLFile (#2332)Ansariel Hiller
2024-07-01#1111 Remove xmlrpc-epiAlexander Gavriliuk
2024-05-30Fix a bunch of uninitialized variable warnings that showed up in Visual StudioAnsariel
2024-04-29#824 Process source files in bulk: replace tabs with spaces, convert CRLF to ↵Andrey Lihatskiy
LF, and trim trailing whitespaces as needed
2020-03-25DRTVWR-476: Add LLUniqueFile, adding RAII semantics to LLFILE*.Nat Goodspeed
LLUniqueFile wraps an LLFILE* in a move-only class that closes the wrapped LLFILE* on destruction. It provides conversion operators to permit idiomatic usage as an LLFILE* value.
2018-04-20MAINT-8540 Eliminated a lot of xui related log warnings on startup and ↵andreykproductengine
opening preferences
2017-12-20MAINT-8087: Use env vars from VMP for AppData\Roaming and Local.Nat Goodspeed
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-02-03Automated merge with ssh://bitbucket.org/lindenlab/viewer-releaseNat Goodspeed
2016-11-22DRTVWR-418: libc++ has stat data in <sys/types.h>.Nat Goodspeed
2016-10-13MAINT-6828 Removed unnessesary spam in logsandreykproductengine
2015-11-10remove execute permission from many files that should not have itOz Linden
2015-04-15MAINT-4744: remove nonstandard #include from llfile.h.Nat Goodspeed
Changeset ffd264ca493c removed the whole llstdio_filebuf construct, which is what depended on the __gnu_cxx::stdio_filebuf<> extension. Now, even on Windows, ll[io]fstream very closely resembles std::[io]fstream. Since we no longer depend on that extension, we can remove its #include. This should (!) remove the last obstacle to building with libc++ on the Mac.
2015-04-15Strip down the Windows ll[io]fstream implementations to constructorsNat Goodspeed
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-10restore the ll[io]fstream because we need them as wrappers on Windows for ↵Oz Linden
wide char paths; on other platforms they are now just typedefs to the std classes
2015-04-07replace llifstream and llofstream with std::ifstream and std::ofstream ↵Oz Linden
respectively
2015-04-07convert llifstream and llofstream to std::ifstream and std::ofstream ↵Oz Linden
respectively
2015-01-28MAINT-4744: Eliminate viewer dependency on (old) GNU libstdc++.Nat Goodspeed
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.
2014-10-17Update to build on Xcode 6.0: turn BACK ON warnings as errors for overloaded ↵callum_linden
virtuals [-Woverloaded-virtual] and fix up first (of many) files
2014-03-07Fixes for crash reporter startup race condition, crash reporter CPU use, ↵Aura Linden
Secondlife.log filehandle, XP Crash.
2013-05-01Merge vwr-dev-matGraham Madarasz
2013-04-30Merge 3.5.1 into MaterialsGraham Madarasz
2013-04-19merge changes for DRTVWR-294Oz Linden
2013-03-29Update Mac and Windows breakpad builds to latestGraham Madarasz
2012-09-21More windows build fixesdeveloper@Developer-PC
2012-09-20Restoring llrenderheadless changes so we can fix themDon Kjer
2012-09-20Fix for windows compile issueDon Kjer
2012-09-20Partial rewrite of llifstream and llofstream (Windows implementation ↵Don Kjer
pending). Moved more functionality from llviewerwearable to llwearable
2010-11-19ER-330 : Improve ObjectUpdateCached message packing. Added some viewer ↵Dave SIMmONs
metrics, will disable later.
2010-08-13Change license from GPL to LGPL (version 2.1)Oz Linden
2009-05-22DEV-27646 dll linkage for login module.Brad Kittenbrink
Ok, finally got this to a point where it doesn't break the build and I can check in. llcommon can be built as a shared library (disabled but can be enabled with cmake cache var LLCOMMON_LINK_SHARED. reviewed by Mani on tuesday (I still need to get his suggested changes re-reviewed)
2009-01-08Result of svn merge -r107256:107258 ↵Aaron Brashears
svn+ssh://svn/svn/user/phoenix/license_2009_merge into trunk. QAR-1165
2008-06-26QAR-628 merge string-cleanup-5 -r 90476:90508 -> releaseSteven Bennetts
dataserver-is-deprecated
2008-06-02svn merge -r88066:88786 ↵Bryan O'Sullivan
svn+ssh://svn.lindenlab.com/svn/linden/branches/cmake-9-merge dataserver-is-deprecated for-fucks-sake-whats-with-these-commit-markers
2008-05-08QAR-570 maint-render-4 mergeSteven Bennetts
merge -r 87067:87077 svn+ssh://svn.lindenlab.com/svn/linden/branches/maint-render/maint-render-4-merge -> release. dataserver-is-deprecated.
2008-03-25merge release@82858 maint-render-2-merge@83010 -> releaseSteven Bennetts
QAR-389
2008-02-07svn merge -r 79445:79449 ↵Josh Bell
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
2007-10-04Result of svn merge -r71162:71205 ↵Aaron Brashears
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-04Result of svn merge -r70873:71086 ↵Aaron Brashears
svn+ssh://svn/svn/linden/branches/enable-exceptions into release.
2007-03-02merge release@58699 beta-1-14-0@58707 -> releaseSteven Bennetts
2007-02-06merge in of error-refactor-3Mark Lentczner
concludes (fixes) SL-31187 pair programmed and reviewed by markl and karen
2007-02-02Result of svn merge -r57264:57370 ↵Aaron Brashears
svn+ssh://svn/svn/linden/branches/adroit.r40-68 into release.
2007-01-02Print done when done.James Cook