Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!princeton!allegra!ulysses!mhuxt!ihnp4!cuae2!ltuxa!we53!rwh From: rwh@we53.UUCP Newsgroups: comp.lang.c,comp.sys.ibm.pc Subject: Problem with Microsoft C ver 3 and above under DOS 2.XX Message-ID: <471@we53.UUCP> Date: Thu, 8-Jan-87 13:04:33 EST Article-I.D.: we53.471 Posted: Thu Jan 8 13:04:33 1987 Date-Received: Fri, 9-Jan-87 20:51:07 EST Organization: AT&T Software Systems, St. Louis, MO Lines: 29 Keywords: C, Microsoft C, MS-DOS Xref: mnetor comp.lang.c:635 comp.sys.ibm.pc:866 If you are runing MS-DOS 2.XX and use microsoft C version 3.00 and/or 4.0 the following code will cause some problems. FILE *fp; fp = fopen( "prn", "w" ); . . . fclose(fp); Not necessarily on the first time through, but some subsequent time the above will lock up the computer, and cause it to display random system error messages and generally go crazy. The above happens ANYTIME an attempt to fopen a character device. Micosoft claimed that the problem was in DOS not their run-time library, It seems to run correctly under DOS 3.XX. I'm not sure if the above has been fixed under ver 4.00 of the compiler, but stat always returns -1 on a character device under DOS 2.XX with errno set to 0. Stat works correctly under DOS 3.XX. Also the above code ran fine with Aztec C86 compilers, so what's wrong with DOS? or Microsofts C ? Has anyone else discovered this problem? My clone dosen't have DOS 3 (its an orphan), but I saw the problems listed above on IBMs, Eagles, and Compaqs. Web Homer