Revision: 60016 http://sourceforge.net/p/brlcad/code/60016 Author: bob1961 Date: 2014-02-28 21:53:29 +0000 (Fri, 28 Feb 2014) Log Message: ----------- When on windows we need to arrange for stdin, stdout and stderr to be in binary mode. This fixes the breakage of bw-pix and pix-bw on windows.
Modified Paths: -------------- brlcad/trunk/src/util/bw-pix.c brlcad/trunk/src/util/pix-bw.c Modified: brlcad/trunk/src/util/bw-pix.c =================================================================== --- brlcad/trunk/src/util/bw-pix.c 2014-02-28 21:50:32 UTC (rev 60015) +++ brlcad/trunk/src/util/bw-pix.c 2014-02-28 21:53:29 UTC (rev 60016) @@ -94,6 +94,12 @@ return 1; } +#if defined(_WIN32) && !defined(__CYGWIN__) + setmode(fileno(stdin), O_BINARY); + setmode(fileno(stdout), O_BINARY); + setmode(fileno(stderr), O_BINARY); +#endif + img = icv_read(in_file, ICV_IMAGE_BW, inx, iny); if (img == NULL) return 1; Modified: brlcad/trunk/src/util/pix-bw.c =================================================================== --- brlcad/trunk/src/util/pix-bw.c 2014-02-28 21:50:32 UTC (rev 60015) +++ brlcad/trunk/src/util/pix-bw.c 2014-02-28 21:53:29 UTC (rev 60016) @@ -150,6 +150,13 @@ bu_log("%s", usage); return 1; } + +#if defined(_WIN32) && !defined(__CYGWIN__) + setmode(fileno(stdin), O_BINARY); + setmode(fileno(stdout), O_BINARY); + setmode(fileno(stderr), O_BINARY); +#endif + img = icv_read(in_file, ICV_IMAGE_PIX, inx, iny); if (img == NULL) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Flow-based real-time traffic analytics software. Cisco certified tool. Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer Customize your own dashboards, set traffic alerts and generate reports. Network behavioral analysis & security monitoring. All-in-one tool. http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk _______________________________________________ BRL-CAD Source Commits mailing list brlcad-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-commits