Fix compil issue on Windows

This commit is contained in:
jean-pierre charras 2017-03-04 11:10:58 +01:00
parent 4618e6c7f8
commit af161771b8
2 changed files with 7 additions and 1 deletions

View File

@ -27,6 +27,8 @@
#if defined( WIN32 ) && defined( __GNUC__ )
#include <ext/stdio_filebuf.h>
#define OSTREAM std::ostream
#define OPEN_OSTREAM( var, name ) \
kicad::stream var ## _BUF_; \
std::ostream& var = *var ## _BUF_.Open( name, std::ios_base::out | std::ios_base::trunc | std::ios_base::binary )
@ -63,6 +65,8 @@
#elif defined( _MSC_VER ) // defined( WIN32 ) && defined( __GNUC__ )
#define OSTREAM std::ofstream
#define OPEN_OSTREAM( var, name ) \
std::ofstream var; \
var.open( wxString::FromUTF8Unchecked( name ).wc_str(), \
@ -82,6 +86,8 @@
#else // defined( WIN32 ) && defined( __GNUC__ )
#define OSTREAM std::ofstream
#define OPEN_OSTREAM( var, name ) \
std::ofstream var; \
var.open( name, std::ios_base::out | std::ios_base::trunc )

View File

@ -416,7 +416,7 @@ static void write_triangle_bag( std::ostream& aOut_file, VRML_COLOR& aColor,
static void write_layers( MODEL_VRML& aModel, BOARD* aPcb,
const char* aFileName, std::ofstream* aOutputFile )
const char* aFileName, OSTREAM* aOutputFile )
{
// VRML_LAYER board;
aModel.m_board.Tesselate( &aModel.m_holes );