[Speex-dev] Patch for OS/2 STDIN/STDOUT

Franz Bakan fbakan at gmx.net
Fri Jan 11 16:36:38 PST 2008


Hi,

to make in/output on STDIN/STDOUT work on OS/2 this small patch is needed:

---cut---
diff -ruN o:src/speexdec.c src/speexdec.c
--- o:src/speexdec.c    2007-12-08 05:01:08.000000000 +0100
+++ src/speexdec.c  2008-01-12 00:48:00.000000000 +0100
@@ -231,6 +231,8 @@
       {
 #if defined WIN32 || defined _WIN32
          _setmode(_fileno(stdout), _O_BINARY);
+#elif defined OS2
+         _fsetmode(stdout,"b");
 #endif
          fout=stdout;
       }
diff -ruN o:src/speexenc.c src/speexenc.c
--- o:src/speexenc.c    2007-12-08 05:01:08.000000000 +0100
+++ src/speexenc.c  2008-01-12 00:47:06.000000000 +0100
@@ -514,6 +514,8 @@
    {
 #if defined WIN32 || defined _WIN32
          _setmode(_fileno(stdin), _O_BINARY);
+#elif defined OS2
+         _fsetmode(stdin,"b");
 #endif
       fin=stdin;
    }
---cut---

Would be nice if this could make it into the source-tree.

Thanks
Franz




More information about the Speex-dev mailing list