Skip to content

Commit

Permalink
Fixed compilation issues on MSVC compilers (lsils#612)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelwa authored Jun 27, 2023
1 parent 2130e72 commit 84711b2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion experiments/experiments.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
\author Mathias Soeken
*/

#pragma once

#include <array>
#include <cstdio>
#include <fstream>
Expand Down Expand Up @@ -517,7 +519,11 @@ inline bool abc_cec_impl( Ntk const& ntk, std::string const& benchmark_fullpath

std::array<char, 128> buffer;
std::string result;
#if WIN32
std::unique_ptr<FILE, decltype( &_pclose )> pipe( _popen( command.c_str(), "r" ), _pclose );
#else
std::unique_ptr<FILE, decltype( &pclose )> pipe( popen( command.c_str(), "r" ), pclose );
#endif
if ( !pipe )
{
throw std::runtime_error( "popen() failed" );
Expand Down Expand Up @@ -547,4 +553,4 @@ inline bool abc_cec( Ntk const& ntk, std::string const& benchmark )
return abc_cec_impl( ntk, benchmark_path( benchmark ) );
}

} // namespace experiments
} // namespace experiments

0 comments on commit 84711b2

Please sign in to comment.