forked from boostorg/filesystem
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
38 changed files
with
2,721 additions
and
781 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# | ||
# Copyright Andrey Semashev 2020. | ||
# Distributed under the Boost Software License, Version 1.0. | ||
# (See accompanying file LICENSE_1_0.txt or copy at | ||
# http://www.boost.org/LICENSE_1_0.txt) | ||
# | ||
|
||
obj has_stat_st_mtim : has_stat_st_mtim.cpp ; | ||
explicit has_stat_st_mtim ; | ||
obj has_stat_st_mtimensec : has_stat_st_mtimensec.cpp ; | ||
explicit has_stat_st_mtimensec ; | ||
obj has_stat_st_mtimespec : has_stat_st_mtimespec.cpp ; | ||
explicit has_stat_st_mtimespec ; | ||
obj has_bcrypt : has_bcrypt.cpp ; | ||
explicit has_bcrypt ; | ||
obj is_windows_ce : is_windows_ce.cpp ; | ||
explicit is_windows_ce ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Copyright 2020 Andrey Semashev | ||
|
||
// Distributed under the Boost Software License, Version 1.0. | ||
// See http://www.boost.org/LICENSE_1_0.txt | ||
|
||
// See library home page at http://www.boost.org/libs/filesystem | ||
|
||
// Include Boost.Predef first so that windows.h is guaranteed to be not included | ||
#include <boost/predef/os/windows.h> | ||
#include <boost/predef/os/cygwin.h> | ||
#if !BOOST_OS_WINDOWS && !BOOST_OS_CYGWIN | ||
#error "This config test is for Windows only" | ||
#endif | ||
|
||
#include <boost/winapi/config.hpp> | ||
#include <boost/predef/platform.h> | ||
#if !(BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6 && BOOST_WINAPI_PARTITION_APP_SYSTEM) | ||
#error "No BCrypt API" | ||
#endif | ||
|
||
#include <cstddef> | ||
#include <boost/winapi/basic_types.hpp> | ||
#include <boost/winapi/bcrypt.hpp> | ||
|
||
int main() | ||
{ | ||
unsigned char buf[16] = {}; | ||
boost::winapi::BCRYPT_ALG_HANDLE_ handle; | ||
boost::winapi::NTSTATUS_ status = boost::winapi::BCryptOpenAlgorithmProvider(&handle, boost::winapi::BCRYPT_RNG_ALGORITHM_, NULL, 0); | ||
status = boost::winapi::BCryptGenRandom(handle, reinterpret_cast<boost::winapi::PUCHAR_>(static_cast<unsigned char*>(buf)), static_cast<boost::winapi::ULONG_>(sizeof(buf)), 0); | ||
boost::winapi::BCryptCloseAlgorithmProvider(handle, 0); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// Copyright 2020 Andrey Semashev | ||
|
||
// Distributed under the Boost Software License, Version 1.0. | ||
// See http://www.boost.org/LICENSE_1_0.txt | ||
|
||
// See library home page at http://www.boost.org/libs/filesystem | ||
|
||
#include <sys/types.h> | ||
#include <sys/stat.h> | ||
#include <unistd.h> | ||
|
||
int main() | ||
{ | ||
struct stat st; | ||
st.st_mtim.tv_nsec = 10; | ||
} |
Oops, something went wrong.