Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
Boost.Nowide
cstdio.hpp
1 //
2 // Copyright (c) 2012 Artyom Beilis (Tonkikh)
3 // Copyright (c) 2020 Alexander Grund
4 //
5 // Distributed under the Boost Software License, Version 1.0. (See
6 // accompanying file LICENSE or copy at
7 // http://www.boost.org/LICENSE_1_0.txt)
8 //
9 #ifndef BOOST_NOWIDE_CSTDIO_HPP_INCLUDED
10 #define BOOST_NOWIDE_CSTDIO_HPP_INCLUDED
11 
12 #include <boost/nowide/config.hpp>
13 #include <cstdio>
14 
15 namespace boost {
16 namespace nowide {
17 #if !defined(BOOST_WINDOWS) && !defined(BOOST_NOWIDE_DOXYGEN)
18  using std::fopen;
19  using std::freopen;
20  using std::remove;
21  using std::rename;
22 #else
23 
27  BOOST_NOWIDE_DECL FILE* freopen(const char* file_name, const char* mode, FILE* stream);
31  BOOST_NOWIDE_DECL FILE* fopen(const char* file_name, const char* mode);
35  BOOST_NOWIDE_DECL int rename(const char* old_name, const char* new_name);
39  BOOST_NOWIDE_DECL int remove(const char* name);
40 #endif
41  namespace detail {
42  BOOST_NOWIDE_DECL FILE* wfopen(const wchar_t* filename, const wchar_t* mode);
43  }
44 } // namespace nowide
45 } // namespace boost
46 
47 #endif
FILE * freopen(const char *file_name, const char *mode, FILE *stream)
Same as freopen but file_name and mode are UTF-8 strings.
FILE * fopen(const char *file_name, const char *mode)
Same as fopen but file_name and mode are UTF-8 strings.
int remove(const char *name)
Same as rename but name is UTF-8 string.
int rename(const char *old_name, const char *new_name)
Same as rename but old_name and new_name are UTF-8 strings.