Article View: gnu.gcc.help
Article #50773What is GNU equal to setmode(fd,O_BINARY)?
From: Frank Merrow
Date: Mon, 23 Aug 1993 02:09
Date: Mon, 23 Aug 1993 02:09
25 lines
1664 bytes
1664 bytes
Hi, I have a program that runs in the Unix "filter" style from stdin to stdout. On Unix it runs find, but in MS-DOS I had to add the following: setmode(stdin/stdout,O_BINARY) This was needed to suppress the MS-DOS ctl-Z feature under MS-C. (The input and output is BINARY and not ASCII!) It looks like I am having the IDENTICAL program now under OS/2 when using the GCC compiler and libraries (from ftp-os2.nmsu.edu). However it appears GCC does not provide the same setmode() function as MS-C. The gcc library docs are limited (are there any?). Can anyone tell me what the equivent function call would be to have OS/2 GCC treat stdin and stdout as binary byte streams? Frank -- =================================================================== = Frank Merrow (Home) (714) 455-3096 = = Odetics Inc, Broadcast Division (Work) (714) 772-1000 Ext 3860 = = 1515 S. Manchester Avenue (Fax) (714) 535-8532 = = Anaheim, CA 92802 (Net) frank@odetics.com = ===================================================================
Technical Details
Message-ID:
<1993Aug23.020938.18481@odetics.com>Path:
arc1-ca.pugleaf.net!gmd.de!xlink.net!howland.reston.ans.net!europa.eng.gtefsd.com!uunet!odetics!frankShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,59c26a7e7573ea8e,start X-Google-Attributes: gid11318c,public X-Google-ArrivalTime: 1993-08-22 19:41:29 PST Newsgroups: gnu.gcc.help Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!howland.reston.ans.net!europa.eng.gtefsd.com!uunet!odetics!frank From: frank@odetics.com (Frank Merrow) Subject: What is GNU equal to setmode(fd,O_BINARY)? Message-ID: <1993Aug23.020938.18481@odetics.com> Organization: Odetics, Inc., Anaheim, CA Distribution: na Date: Mon, 23 Aug 93 02:09:38 GMT Lines: 25