Skip to content

Commit

Permalink
Fix previous commit with GDAL version < 1.10 (#4858)
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed Jun 1, 2014
1 parent 2c5aad9 commit 5beb10e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mapogroutput.c
Original file line number Diff line number Diff line change
Expand Up @@ -549,11 +549,13 @@ int msOGRWriteFromQuery( mapObj *map, outputFormatObj *format, int sendheaders )
/* ==================================================================== */
storage = msGetOutputFormatOption( format, "STORAGE", "filesystem" );
if( EQUAL(storage,"stream") && !msIO_isStdContext() ) {
#if defined(GDAL_COMPUTE_VERSION) && GDAL_VERSION_NUM >= GDAL_COMPUTE_VERSION(2,0,0)
#if defined(GDAL_COMPUTE_VERSION)
#if GDAL_VERSION_NUM >= GDAL_COMPUTE_VERSION(2,0,0)
msIOContext *ioctx = msIO_getHandler (stdout);
if( ioctx != NULL )
VSIStdoutSetRedirection( msOGRStdoutWriteFunction, (FILE*)ioctx );
else
#endif
#endif
/* bug #4858, streaming output won't work if standard output has been
* redirected, we switch to memory output in this case
Expand Down

0 comments on commit 5beb10e

Please sign in to comment.