Skip to content

Commit

Permalink
nocr4
Browse files Browse the repository at this point in the history
  • Loading branch information
DennisHeimbigner committed Sep 25, 2024
1 parent a2985fd commit 026c6a1
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions unit_test/tst_pluginpaths.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
#include "XGetopt.h"
#endif

#ifdef _WIN32
#include "windows.h"
#endif

#include "netcdf.h"
#include "netcdf_filter.h"
#include "netcdf_aux.h"
Expand Down Expand Up @@ -305,9 +309,12 @@ main(int argc, char** argv)
size_t i;

#ifdef _WIN32
/* Convert \r\n -> \n output on stdout */
if(freopen(0, "wb", stdout)==0)
{fprintf(stderr,"@@@@ freopen failed\n"); fflush(stderr);}
/* suppress \r\n output on stdout */
{
int fd = _fileno(stdout);
if(_setmode(fd,_O_BINARY)==0)
{fprintf(stderr,"@@@@ _setmode failed: %d\n",fd); fflush(stderr);}
}
#endif

/* Init options */
Expand Down

0 comments on commit 026c6a1

Please sign in to comment.