summaryrefslogtreecommitdiffstats
path: root/libcxx/include/string.h
Commit message (Collapse)AuthorAgeFilesLines
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* Instead of asking glibc to provide correct C++ signatures for <string.h>Richard Smith2016-02-111-9/+5
| | | | | | | | functions, ask it whether it did provide them after the fact. Some versions of glibc fail to compile if you make this request and don't also claim to be at least GCC 4.3. llvm-svn: 260622
* Work around regression in glibc 2.22: request that glibc provides the correctRichard Smith2016-02-111-0/+4
| | | | | | | prototypes for <string.h> functions that are converted into overload sets in C++. This matches the existing workaround in <wchar.h>. llvm-svn: 260570
* Fix overload sets of strchr, strpbrk, strrchr, memchr and strstr fromRichard Smith2016-02-101-0/+110
| | | | | | | | | | | | | | | | | <string.h> and wcschr, wcspbrk, wcsrchr, wmemchr, and wcsstr from <wchar.h> to provide a const-correct overload set even when the underlying C library does not. This change adds a new macro, _LIBCPP_PREFERRED_OVERLOAD, which (if defined) specifies that a given overload is a better match than an otherwise equally good function declaration without the overload. This is implemented in modern versions of Clang via __attribute__((enable_if)), and not elsewhere. We use this new macro to define overloads in the global namespace for these functions that displace the overloads provided by the C library, unless we believe the C library is already providing the correct signatures. llvm-svn: 260337
* Revert r249929 ("Split <string.h> out of <cstring>").Richard Smith2015-10-291-63/+0
| | | | | | | | | | | | | | This change caused problems when building code like povray that: a) uses 'using namespace std;' b) is built on an environment where the C library provides the "wrong" (non-const-correct) interface for the str* functions c) makes an unqualified call to one of those str* functions A patch is out for review to add a facility to fix this (and to give the correct signatures for these functions whenever possible, even when the C library does not do so). This revert is expected to be temporary. llvm-svn: 251665
* Split <string.h> out of <cstring>.Richard Smith2015-10-101-0/+63
Also fix the overload set for the five functions whose signatures change in the case where we can fix it. This is already covered by existing tests for the affected systems. llvm-svn: 249929
OpenPOWER on IntegriCloud