To: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: MORE on O_TEXT/O_BINARY Date: Tue, 21 Jun 1994 11:33:00 PDT From: "Marty Leisner" Well, I've learned" fopen("b") is ANSI open(O_BINARY) is not POSIX... Recompiling the gnu fileutils, I needed to stick this in the fileutils lib (or else have to change every open call everywhere or change __fmode in each main...): .data .globl __fmode __fmode: -> .long 0x000 ; changes from O_TEXTMODE .text .globl _open _open: testl $0xc000,8(%esp) jnz L0 andl $0xc000,__fmode movl __fmode,%eax orl %eax,8(%esp) L0: movb $2,%al jmp turbo_assist I really think the default mode should be binary "unless you need to do something special". marty Member of the League of Programming Freedom leisner AT sdsp DOT mc DOT xerox DOT com leisner AT eso DOT mc DOT xerox DOT com