summaryrefslogtreecommitdiff
path: root/indra/llcommon/llpreprocessor.h
AgeCommit message (Collapse)Author
2020-03-25SL-793: Add LL_PRETTY_FUNCTION macro wrapping __PRETTY_FUNCTION__Nat Goodspeed
which is, of course, different in Visual Studio (__FUNCSIG__). Use LL_PRETTY_FUNCTION in DEBUG output instead of plain __FUNCTION__.
2018-12-14SL-10153: Introduce ll_convert, windows_message() templates.Nat Goodspeed
Add ll_convert<TO, FROM> template, used as (e.g.): ll_convert<std::string>(value_of_some_other_string_type); There is no generic template implementation -- the template exists solely to provide generic aliases for a bewildering family of llstring.h string- conversion functions with highly-specific names. There's a generic implementation, though, for the degenerate case where FROM and TO are identical. Add ll_convert<> specialization aliases for most of the string-conversion functions declared in llstring.h, including the Windows-specific ones involving llutf16string and std::wstring. Add a mini-lecture in llstring.h about appropriate use of string types on Windows. Add LL_WCHAR_T_NATIVE llpreprocessor.h macro so we can detect whether to provide separate conversions for llutf16string and std::wstring, or whether those would collide because the types are identical. Add inline ll_convert_wide_to_string(const std::wstring&) overloads so caller isn't required to call arg.c_str(), which naturally permits an ll_convert alias. Add ll_convert_wide_to_wstring(), ll_convert_wstring_to_wide() as placeholders for converting between Windows std::wstring and Linden LLWString, with corresponding ll_convert aliases. We don't yet have library code to perform such conversions officially; for now, just copy characters. Add LLStringUtil::getenv(key) and getoptenv(key) functions. The latter returns boost::optional<string_type> in case the caller needs to detect absence of a given environment variable rather than simply accepting a default value. Naturally getenv(), which accepts a default, is implemented using getoptenv(). getoptenv(), in turn, is implemented using an underlying llstring_getoptenv(). On Windows, llstring_getoptenv() returns boost::optional<std::wstring> (based on GetEnvironmentVariableW()), whereas elsewhere, llstring_getoptenv() returns boost::optional<std::string> (based on classic Posix getenv()). The beauty of generic ll_convert is that the portable LLStringUtilBase<T>:: getoptenv() template can call the platform-specific llstring_getoptenv() and transparently perform whatever conversion is necessary to return the desired string_type. Add windows_message<T>(error) template, with an overload that implicitly calls GetLastError(). We provide a single concrete windows_message<std::wstring>() implementation because that's what we get from Windows FormatMessageW() -- everything else is a generic conversion to the desired target string type. This obviates llprocess.cpp's previous WindowsErrorString() implementation -- reimplement using windows_message<std::string>().
2018-05-17SL-821: Add LL_TO_WSTRING() macro to llpreprocessor.h.Nat Goodspeed
Also use existing LL_TO_STRING() macro to stringize LL_VIEWER_CHANNEL in llversioninfo.cpp and its tests.
2017-02-23DRTVWR-418: Fix a round of compile errors surfaced by -std=c++11.Nat Goodspeed
These are mostly things that were in fact erroneous, but accepted by older compilers. This changeset has not yet been built with Visual Studio 2013 or Linux gcc, even with -std=c++11. This changeset has not been built *without* -std=c++11. It should be used in conjunction with a corresponding change to LL_BUILD_DARWIN_BASE_SWITCHES in viewer-build-variables/variables. This is a work in progress. We do not assert that this changeset completes the work needed to turn on -std=c++11, even on the Mac.
2016-11-16DRTVWR-418: Replace preprocessor tests for Windows-specific _M_AMD64Nat Goodspeed
with tests on ADDRESS_SIZE, which is now set on the compiler command line.
2016-04-24Windows z64: Disable warning 4267 via llpreprocessor rather than cmake filesNicky
(transplanted from 165fa5852652a1da005cf3b2201c192f028efd43)
2015-11-10remove execute permission from many files that should not have itOz Linden
2014-11-19OPEN-282 - Define LL_THREAD_LOCAL for our platforms in order to unify TLS ↵Cinder
support
2013-09-05changed fast timer over to using macroRichard Linden
another attempt to move mem stat into base class
2013-08-27broke out llunit.h into llunittype.h and llunits.h for unit declarationsRichard Linden
changed unit declarations macros to make a lot more sense
2013-08-26fixed eol typeRichard Linden
2013-08-26added compile time warnings to use of deprecated llinfos, llwarns, etc.Richard Linden
2013-08-19BUILDFIX: refactored decltype out into traits classRichard Linden
2013-08-19BUILDFIX: abstracted decltype into macro LLTYPEOF for temporaryRichard Linden
gcc 4.1/4.2 support
2013-03-29Update Mac and Windows breakpad builds to latestGraham Madarasz
2012-02-01converted a bunch of narrowing implicit conversions to explicitRichard Linden
2011-11-28bumped up MSVC warning level to 3 to catch more stuff that gcc catchesRichard Linden
2010-08-13Change license from GPL to LGPL (version 2.1)Oz Linden
2010-01-25We already have a LL_FORCE_INLINE in llpreprocessor.h, don't re-invent it ↵Tofu Linden
for llfasttimers.h. Also define LL_LIKELY/LL_UNLIKELY with a warning about its micro-optimizey nature, and use it to annotate llasserts (i.e. make llassert() lower-overhead and thus more attractive, even in inner-ish loops.)
2009-11-30Linker optimization - use "extern template" for commonly regenerated templatesJames Cook
Also replaced many duplicate calls to LLViewerCamera::getInstance() with local pointer. Reviewed with Ambroff
2009-11-28Suppress MSVC warning about extern template for linker optimizationJames Cook
2009-11-18Switch some files to Unix line endingsBryan O'Sullivan
2009-11-16mergeLoren Shih
--HG-- branch : avatar-pipeline
2009-11-13mergeLoren Shih
--HG-- branch : avatar-pipeline
2009-11-12DEV-42747 - lltreeiterators_test.cpp broken on Windowsrichard
reviewed by Nat
2009-11-03mergeLoren Shih
--HG-- branch : avatar-pipeline
2009-10-07Merged latest viewer/login-api with latest viewer/viewer-20brad kittenbrink
2009-10-03Merge inspectors UI project, gooey-4, into viewer-2 trunk. Added new ↵James Cook
tooltips to 3D avatars, 2D avatar names, and 3D objects. Refactors tooltips and text boxes, line editors, and text editors. Breaks LLExpandableTextBox, but a fix is coming. Resolved conflicts in lltexteditor.cpp, llchatitemscontainerctrl.cpp, llchatmsgbox.cpp, llfloaterbuycurrency.cpp, llnearbychat.cpp, floater_buy_currency.xml, and ru/strings.xml Merging revisions 134925-135157 of svn+ssh://svn.lindenlab.com/svn/linden/branches/gooey/gooey-4 into C:\source\viewer-2.0.0-3, respecting ancestry
2009-09-03QAR-1619: Fix Windows link errors when building INTEGRATION_TEST_lllazy.Nat Goodspeed
The problem arose because we were setting LL_COMMON_BUILD in llcommon/CMakeLists.txt, not only for the library build itself but also for its LL_ADD_INTEGRATION_TEST tests. This told all the headers compiled into the INTEGRATION_TEST_lllazy executable that the executable was providing all the llcommon symbols, rather than importing them. The solution is to switch to the llcommon_EXPORTS symbol automagically defined by CMake when building the llcommon shared library itself.
2009-07-30Merged in viewer-2.0.0-3 changes up through r129050. Boost got clobbered so ↵brad kittenbrink
I'll need to rebuild that, plus a couple other minor clenaups.
2009-07-30Fixes to build on linux for DEV-35401.palmer@eniac54.lindenlab.com
Moves libllcommon.so to a staging dir for unit tests to work and gets rid of LL_COMMON_API in forward declarations
2009-07-16Merged work for DEV-2066 (and formerly QAR-1538) in Viewer 2.Mark Palange
merged all changes, post copy, from the following branches: linden/brachnes/enable-o-v user/cg/qar-1538 user/mani/viewer2-enable-o-v
2009-07-02Windows now links to shared apr when LLCOMMON_LINK_SHARED is on.brad kittenbrink
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-02-03QAR-1177 maint-viewer-12 + uploadfees-viewer combo mergemeAdam Moss
svn merge -r108355:109316 svn+ssh://svn.lindenlab.com/svn/linden/branches/moss/maint-viewer-12-uploadfees-qa108314 Whew.
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-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-04-03svn merge -r83872:83893 linden/branches/Branch_1-20-0-Server to linden/releaseKelly Washington
HAVOK4 IN TEH HOUSE!!11!!ONE!! If it is broken blame Joel for not fixing the loginassetdatabaseinventorygroupIM server instead of working on this. QAR-448
2008-02-14svn merge -r 79730:79944 ↵Josh Bell
svn+ssh://svn.lindenlab.com/svn/linden/branches/parcel_media/sl-parcelmedia-6 --> release QAR-275 Parcel Media Sam made me do it.
2007-10-17QAR-25 svn merge -r71797:71803 svn+ssh://svn/svn/linden/branches/logitech_lcd_4Christian Goetze
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-07-20svn merge -r 64548:64837 svn+ssh://svn/svn/linden/branches/maintenance into ↵Don Kjer
release * WARNING *: maintenance r64837 is not the last rev to use in the next merge. use r65269
2007-07-02svn merge -r 62595:62596 and 62598:63308 sse-skinning-3 for faster software ↵James Cook
avatar rendering. Visual Studio 2005 project file fixed pending.
2007-04-11svn merge -r 59968:60342 ↵Josh Bell
svn+ssh://svn.lindenlab.com/svn/linden/branches/maintenance --> release
2007-03-20svn merge -r59459:59476 ↵Karen Clark
svn+ssh://svn.lindenlab.com/svn/linden/branches/adroit.r69-75_2 into svn+ssh://svn.lindenlab.com/svn/linden/release.
2007-03-07merge release@58791 vc8@58828 -> releaseSteven Bennetts
Adds Dev Studio 2005 (VC8) Reviewed by Rob
2007-03-02merge -r 58503:58641 maintenance -> releaseSteven Bennetts
2007-02-12Landing embedded Mozilla support for the Linux Client.Adam Moss
svn merge svn+ssh://svn.lindenlab.com/svn/linden/release@57782 svn+ssh://svn.lindenlab.com/svn/linden/branches/moss/linuxmozilla-r57782base
2007-02-02Result of svn merge -r57264:57370 ↵Aaron Brashears
svn+ssh://svn/svn/linden/branches/adroit.r40-68 into release.
2007-01-04svn merge svn+ssh://svn.lindenlab.com/svn/linden/release@56429 ↵Josh Bell
svn+ssh://svn.lindenlab.com/svn/linden/branches/maintenance@56431 This turned up the following "lost" changes: llapp.cpp (from maintenance r55371) - SIGPIPE fix, possibly llfontgl.cpp (from maintenance r50207) - whitespace only inventorybridge.cpp (property - non-executable) skins/xui/*/* (from maintenance r55380) - XML processing instruction went AWOL