This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Proposal for new CYGWIN flag: notextmode masks away O_TEXT

My apologies if this has already been discussed:

I would just love a CYGWIN variable setting that would make cygwin ignore
the O_TEXT flag from all programs, thus bypassing any translation code in
May I suggest "notextmode", if not taken already :)

At work, we're aiming for maximum UNIX compatibility between all files
across win32/linux/solaris. All this O_TEXT stuff really, really gets in the
way. All our mounts are binmode, yet the fact that some programs set the
O_TEXT flag, and cygwin doesn't ignore it, will at some point add a stray
carriage return (see various threads on CRLF) in various pipes and

We'd rather patch/wrap all non-cygwin utilities in our tool chain (i.e.
cl.exe) to output binmode only. Thinking of it, one could add an lf-ize
utility that invokes a program and adds CR to input while removing them from
output. This would keep the pipes clear of carriage returns.

lfize cl.exe | grep -v "^$"
lfize cat textfile | sed | awk

I freely admit not offering much thought to CTRL+Z.


Unsubscribe info:
Bug reporting:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]