]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/nowide/src/stat.cpp
2 // Copyright (c) 2020-2022 Alexander Grund
4 // Distributed under the Boost Software License, Version 1.0. (See
5 // accompanying file LICENSE or copy at http://www.boost.org/LICENSE_1_0.txt)
8 #define BOOST_NOWIDE_SOURCE
10 #if defined(__MINGW32__) && defined(__STRICT_ANSI__)
11 // Need the _w* functions which are extensions on MinGW but not on MinGW-w64
13 #ifndef __MINGW64_VERSION_MAJOR
14 #undef __STRICT_ANSI__
18 #include <boost/nowide/config.hpp>
22 #include <boost/nowide/stackstring.hpp>
23 #include <boost/nowide/stat.hpp>
29 int stat(const char* path
, posix_stat_t
* buffer
, size_t buffer_size
)
31 if(sizeof(*buffer
) != buffer_size
)
36 const wstackstring
wpath(path
);
37 return _wstat(wpath
.get(), buffer
);
39 int stat(const char* path
, stat_t
* buffer
, size_t buffer_size
)
41 if(sizeof(*buffer
) != buffer_size
)
46 const wstackstring
wpath(path
);
47 return _wstat64(wpath
.get(), buffer
);