Permalink
Browse files

Fix previous commit with GDAL version < 1.10 (#4858)

  • Loading branch information...
rouault committed Jun 1, 2014
1 parent 2c5aad9 commit 5beb10e1ecfefbaee03e462fd1f7043dee8db934
Showing with 3 additions and 1 deletion.
  1. +3 −1 mapogroutput.c
View
@@ -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

0 comments on commit 5beb10e

Please sign in to comment.