Skip to content

Commit c2692f1

Browse files
committed
[GRASS] fixed qgis.d.rast binary mode on windows
1 parent b8df524 commit c2692f1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/providers/grass/qgis.d.rast.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,8 @@ static int cell_draw( char *name,
200200
set = G_malloc( ncols );
201201

202202
/* some buggy C libraries require BOTH setmode() and fdopen(bin) */
203-
#ifdef Q_OS_WIN
203+
// Do not use Q_OS_WIN, we are in C file, no Qt headers
204+
#ifdef WIN32
204205
if ( _setmode( _fileno( stdout ), _O_BINARY ) == -1 )
205206
G_fatal_error( "Cannot set stdout mode" );
206207
#endif

0 commit comments

Comments
 (0)