This is the mail archive of the cygwin@sourceware.cygnus.com 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]

Re: No interaction with bash?


---Raj Menon <rxmtemp@mcdata.com> wrote:
>
> 
<snip>
> >
> > To interact with NON-CYGWINB19.DLL dependent binaries you must "SET
> > CYGWIN32=notty" before starting bash.  You can add your other
favorite
> > values but you must at least have notty.
> 
> Or use TCSH.  I have been using the one from Sergey's site for a while
> with none of the problems I see in BASH.  I have my CYGWIN32 env var
> set to "tty" and I still see the output of the win32 apps (with the
latest coolview).
> Also, I have all my mounts set to the default (text!=binary).  I
almost
> never see problems with cygwin apps running under tcsh (text!=binary
problems
> that is).
> 

Well, just for the record, I've been using cygwinb19 bash with
"text!=binary" and "CYGWIN32=notty nobinmode" for a few months now. 
I've not been trying to port UNIX code to cygwin32 but to native
win32.  I've had _NO_ problems with this after the initial problems of
the cygwinb19.dll were solved.  It is my POV that the code should be
fixed to _NOT_ assume a default open mode.  If your using Mingw32 this
can be solved easily by:

#include <fcntl.h>
...
main()
{
  _fmode = _O_BINARY;
  ...
}

Then any open calls using default file modes will be set to _O_BINARY
by default.  _fmode is an external variable that the open routines
within the crtdll.dll use to determine the default open mode.  

Perhaps something similar could be incorporated into the
cygwinb19.dll.  I'm not currently familiar with the code within the
winsup directory so I'm not interested in making a fix, at least not
yet.  But, for now, you have to modify the open/fopen file mode flags
to indicate that you want them in binary mode.

Since _fmode is defined as a macro to define the "real" variable used,
which is different for crtdll than msvcrt, it should be easily
incorporated into the GNU source code set.
==
-        \\||//
---o0O0--Earnie--0O0o----
--earnie_boyd@yahoo.com--
------ooo0O--O0ooo-------



_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


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