summaryrefslogtreecommitdiffstats
path: root/libcxx/include/cstdio
Commit message (Collapse)AuthorAgeFilesLines
* Remove ::gets for FreeBSD 13 and laterDimitry Andric2019-09-071-1/+1
| | | | | | | | | | | | | | | | | | Summary: In https://svnweb.freebsd.org/changeset/base/351659 @emaste removed gets() from FreeBSD 13's libc, and our copies of libc++ and libstdc++. In that change, the declarations were simply deleted, but I would like to propose this conditional test instead. Reviewers: EricWF, mclow.lists, emaste Reviewed By: mclow.lists Subscribers: krytarowski, christof, ldionne, emaste, libcxx-commits Differential Revision: https://reviews.llvm.org/D67316 llvm-svn: 371324
* Update more file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | | to reflect the new license. These used slightly different spellings that defeated my regular expressions. 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: 351648
* [libc++] Drop support for CRTs older than VS 2015Shoaib Meenai2017-04-071-5/+1
| | | | | | | | | | | LLVM dropped support for Visual Studio versions older than 2015 quite some time ago, so I consider it safe to drop libc++'s support for older CRTs. The CRT in Visual Studio 2015 provides a lot of previously missing functions, so targeting it requires less special casing. Differential Revision: https://reviews.llvm.org/D31798 llvm-svn: 299743
* [libc++] Remove unnecessary MSVCRT exclusionsShoaib Meenai2016-11-081-2/+0
| | | | | | | | | | | | Visual Studio 2013 and up have these functions, and we don't need to support older versions. There are some remaining _LIBCPP_MSVCRT exclusions which are present on Visual Studio 2015 but not 2013. Those will be addressed in a follow-up. Differential Revision: https://reviews.llvm.org/D26377 llvm-svn: 286202
* cstdio: limit gets to CRT versions below 14Saleem Abdulrasool2016-09-011-1/+5
| | | | | | | | | | | | Microsoft removed gets from the CRT in Visual Studio 2015 onwards [1]. Attempting to reference it when targeting CRT versions 14 and above will cause compile errors. [1] https://msdn.microsoft.com/en-us/library/2029ea5f.aspx Patch by Shoaib Meenai! llvm-svn: 280417
* Split <stdio.h> out of <cstdio>.Richard Smith2015-10-091-10/+0
| | | | | | As with <stddef.h>, skip our custom header if __need_FILE or __need___FILE is defined. llvm-svn: 249798
* Remove unnecessary inline functions capturing the contents of C library macros.Richard Smith2015-10-061-25/+0
| | | | | | | | | The C standard requires that these be provided as functions even if they're also provided as macros, and a strict reading of the C++ standard library rules suggests that (for instance) &::isdigit == &::std::isdigit, so these wrappers are technically non-conforming. llvm-svn: 249475
* Make the presence of stdin and stdout optional.Ed Schouten2015-03-261-20/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The idea behind Nuxi CloudABI is that it is targeted at (but not limited to) running networked services in a sandboxed environment. The model behind stdin, stdout and stderr is strongly focused on interactive tools in a command shell. CloudABI does not support the notion of stdin and stdout, as 'standard input/output' does not apply to services. The concept of stderr does makes sense though, as services do need some mechanism to log error messages in a uniform way. This patch extends libc++ in such a way that std::cin and std::cout and the associated <cstdio>/<cwchar> functions can be disabled through the flags _LIBCPP_HAS_NO_STDIN and _LIBCPP_HAS_NO_STDOUT, respectively. At the same time it attempts to clean up src/iostream.cpp a bit. Instead of using a single array of mbstate_t objects and hardcoding the array indices, it creates separate objects that declared next to the iostream objects and their buffers. The code is also restructured by interleaving the construction and setup of c* and wc* objects. That way it is more obvious that this is done identically. The c* and wc* objects already have separate unit tests. Make use of this fact by adding XFAILs in case libcpp-has-no-std* is set. That way the tests work in both directions. If stdin or stdout is disabled, these tests will therefore test for the absence of c* and wc*. Differential Revision: http://reviews.llvm.org/D8340 llvm-svn: 233275
* Add option to disable access to the global filesystem namespace.Ed Schouten2015-03-121-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Systems like FreeBSD's Capsicum and Nuxi CloudABI apply the concept of capability-based security on the way processes can interact with the filesystem API. It is no longer possible to interact with the VFS through calls like open(), unlink(), rename(), etc. Instead, processes are only allowed to interact with files and directories to which they have been granted access. The *at() functions can be used for this purpose. This change adds a new config switch called _LIBCPP_HAS_NO_GLOBAL_FILESYSTEM_NAMESPACE. If set, all functionality that requires the global filesystem namespace will be disabled. More concretely: - fstream's open() function will be removed. - cstdio will no longer pull in fopen(), rename(), etc. - The test suite's get_temp_file_name() will be removed. This will cause all tests that use the global filesystem namespace to break, but will at least make all the other tests run (as get_temp_file_name will not build anyway). It is important to mention that this change will make fstream rather useless on those systems for now. Still, I'd rather not have fstream disabled entirely, as it is of course possible to come up with an extension for fstream that would allow access to local filesystem namespaces (e.g., by adding an openat() member function). Differential revision: http://reviews.llvm.org/D8194 Reviewed by: jroelofs (thanks!) llvm-svn: 232049
* Support Newlib as libc++'s C library [cstdio part, part 2]Jonathan Roelofs2015-01-101-0/+18
| | | | | | | | Wrappers for clearerr, feof, ferror (which newlib implements as macros). http://reviews.llvm.org/D5420 llvm-svn: 225563
* Implement national body comment GB9: remove std::getsMarshall Clow2013-10-121-1/+3
| | | | llvm-svn: 192538
* G M: Restore the ability for libcxx to compile again on mingw 64.Howard Hinnant2013-09-171-0/+5
| | | | llvm-svn: 190837
* Nico Rieck: Currently _MSC_VER and _WIN32 are used to guard code which isHoward Hinnant2013-08-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | MSVC-specific, MSVCRT-specific, or Windows-specific. Because Clang can also define _MSC_VER, and MSVCRT is not necessarily the only C runtime, these macros should not be used interchangeably. This patch divides all Windows-related bits into the aforementioned categories. Two new macros are introduced: - _LIBCPP_MSVC: Defined when compiling with MSVC. Detected using _MSC_VER, excluding Clang. - _LIBCPP_MSVCRT: Defined when using the Microsoft CRT. This is the default when _WIN32 is defined. This leaves _WIN32 for code using the Windows API. This also corrects the spelling of _LIBCP_HAS_IS_BASE_OF to _LIBCPP_HAS_IS_BASE_OF. Nico, please prepare a patch for CREDITS.TXT, thanks. llvm-svn: 187593
* Patch by Andrew C. Morrow: shims to work around macroized getc and putc on ↵Howard Hinnant2012-07-261-0/+12
| | | | | | | | | linux. On my eglibc 2.13 based Debian system 'getc' is a macro defined in /usr/include/stdio.h. This decision to make it a macro doesn't seem to be guarded by any feature test macro as far as I can see. llvm-svn: 160799
* More windows port work by Ruben Van BoxemHoward Hinnant2011-10-221-2/+4
| | | | llvm-svn: 142732
* Windows support by Ruben Van Boxem.Howard Hinnant2011-10-171-0/+2
| | | | llvm-svn: 142235
* license changeHoward Hinnant2010-11-161-2/+2
| | | | llvm-svn: 119395
* Wiped out some non-ascii characters that snuck into the copyright.Howard Hinnant2010-05-111-1/+1
| | | | llvm-svn: 103516
* libcxx initial importHoward Hinnant2010-05-111-0/+159
llvm-svn: 103490
OpenPOWER on IntegriCloud