Message-Id: <9604111455.AA18037@gemini.sdsp.mc.xerox.com> To: djgpp-workers AT delorie DOT com Subject: O_BINARY/O_TEXT on open Date: Thu, 11 Apr 1996 07:55:56 PDT From: "Marty Leisner" I just ported the gun sh/file/text utils to djgpp v2.0 (and built linux based cross compilers on 2.7.2). I have an old POSIX spec...no mention of O_BINARY...glibc 1.09 docs don't mention O_BINARY...Stevens Advanced Unix Programming doesn't mention O_BINARY...Linux man pages don't mention O_BINARY... where is O_BINARY mentioned? When was it introduced? The default is O_TEXT...the default will break some programs...but I've seen much less breakage with defaulting O_BINARY than O_TEXT... What I'm doing is hacking up the the makefile to include a file which defines fmode = O_BINARY to default to binary...(better than hacking up code). I'd like to have a cleaner way to do this than hacking up the source Can this be handled in stubedit? Instead of defaulting to something, look up something in the stub... Can an environment variable be used before main is run...(i.e. if set, get the value of the environment). An alternative would be to have gdb modify the coff file... Currently, its somewhat painful to port code... marty leisner AT sdsp DOT mc DOT xerox DOT com Member of the League for Programming Freedom (http://www.lpf.org) Any sufficiently advanced technology is indistinguishable from magic Arthur C. Clarke, The Lost Worlds of 2001