Posted-From: The MITRE Corporation, Bedford, MA To: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: creat doesn't use proper default filetype Date: Mon, 26 Jul 1993 14:39:10 -0400 From: "Daryl K. Baker" When porting a copy of apps that use creat I noticed that the files opened were in "binary" mode instead of the default text mode. This occurs using version 1.10 of go32 1.10, and gcc 2.4.1 --demo program -- #include #include char *string = "this is a test\n second line\n"; main () { int fd1; int fd2; fd1 = open ("t1", O_CREAT | O_WRONLY); fd2 = creat ("t2", 0666); write ( fd1, string, strlen(string)); write ( fd2, string, strlen(string)); } -- output -- t1: this is a test second line t2: this is a test second line --- T1 and T2 should be the same.