Skip to content

Commit

Permalink
refs #38, added check for older GCCs
Browse files Browse the repository at this point in the history
  • Loading branch information
gulrak committed Nov 23, 2019
1 parent 2c3242a commit 07b7d46
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions include/ghc/filesystem.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1602,12 +1602,12 @@ GHC_INLINE void create_symlink(const path& target_name, const path& new_symlink,
ec = detail::make_error_code(detail::portable_error::not_supported);
return;
}
#ifdef __GNUC__
#if defined(__GNUC__) && __GNUC__ >= 8
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wcast-function-type"
#endif
static CreateSymbolicLinkW_fp api_call = reinterpret_cast<CreateSymbolicLinkW_fp>(GetProcAddress(GetModuleHandleW(L"kernel32.dll"), "CreateSymbolicLinkW"));
#ifdef __GNUC__
#if defined(__GNUC__) && __GNUC__ >= 8
#pragma GCC diagnostic pop
#endif
if (api_call) {
Expand All @@ -1626,12 +1626,12 @@ GHC_INLINE void create_symlink(const path& target_name, const path& new_symlink,

GHC_INLINE void create_hardlink(const path& target_name, const path& new_hardlink, std::error_code& ec)
{
#ifdef __GNUC__
#if defined(__GNUC__) && __GNUC__ >= 8
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wcast-function-type"
#endif
static CreateHardLinkW_fp api_call = reinterpret_cast<CreateHardLinkW_fp>(GetProcAddress(GetModuleHandleW(L"kernel32.dll"), "CreateHardLinkW"));
#ifdef __GNUC__
#if defined(__GNUC__) && __GNUC__ >= 8
#pragma GCC diagnostic pop
#endif
if (api_call) {
Expand Down

0 comments on commit 07b7d46

Please sign in to comment.