Topic: setting stdin/stdout to O_BINARY


Author: "Christian Brock" <brock@ivi.fhg.de>
Date: 16 Oct 2001 18:27:14 GMT
Raw View
Hello everyone, I got a problem and two question:

1. Problem
    I want to convert stdin to O_BINARY mode.
    a)
        In unix there is no problem because there is no silly text mode.
    b)
        Under Windows using MSVC++ I hack my way using
                setmode ( fileno (stdin), O_BINARY);
        . fdopen() would also be possible.
    c)
        CodeWarrior does not have setmode and ignores the mode parameter of
fdopen

1. Question
    Is there a clean solution for this problem in STDC++?
2. Question
    Why is there no setmode() in std::?

Thanks for your time! Chr.

--------------------------------------
Christian Brock <brock@ivi.fhg.de>




      [ Send an empty e-mail to c++-help@netlab.cs.rpi.edu for info ]
      [ about comp.lang.c++.moderated. First time posters: do this! ]

[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.research.att.com/~austern/csc/faq.html                ]
[ Note that the FAQ URL has changed!  Please update your bookmarks.     ]