* fhandler_clipboard.c (fhandler_dev_clipboard::open): Force text mode.
* fhandler_console.cc (fhandler_console::open): *Really* force binary mode rather than make it optional. * fhandler_proc.cc (fhandler_proc::open): Ditto. * fhandler_process.cc (fhandler_process::open): Ditto. * fhandler_random.cc (fhandler_dev_random::fhandler_dev_random): Ditto. * fhandler_raw.cc (fhandler_dev_raw::open): Ditto. * fhandler_registry.cc (fhandler_registry::open): Ditto. * fhandler_tty.cc (fhandler_tty_slave::open): Ditto. * fhandler_virtual.cc (fhandler_virtual::open): Ditto. * fhandler_windows.cc (fhandler_windows::open): Ditto. * fhandler_zero.cc (fhandler_dev_zero::open): Ditto. * net.cc (fdsock): Ditto. * path.cc (set_flags): Add more debugging.
This commit is contained in:
parent
ef9647e524
commit
1bc9effd28
|
@ -1,3 +1,20 @@
|
|||
2002-07-01 Christopher Faylor <cgf@redhat.com>
|
||||
|
||||
* fhandler_clipboard.c (fhandler_dev_clipboard::open): Force text mode.
|
||||
* fhandler_console.cc (fhandler_console::open): *Really* force binary
|
||||
mode rather than make it optional.
|
||||
* fhandler_proc.cc (fhandler_proc::open): Ditto.
|
||||
* fhandler_process.cc (fhandler_process::open): Ditto.
|
||||
* fhandler_random.cc (fhandler_dev_random::fhandler_dev_random): Ditto.
|
||||
* fhandler_raw.cc (fhandler_dev_raw::open): Ditto.
|
||||
* fhandler_registry.cc (fhandler_registry::open): Ditto.
|
||||
* fhandler_tty.cc (fhandler_tty_slave::open): Ditto.
|
||||
* fhandler_virtual.cc (fhandler_virtual::open): Ditto.
|
||||
* fhandler_windows.cc (fhandler_windows::open): Ditto.
|
||||
* fhandler_zero.cc (fhandler_dev_zero::open): Ditto.
|
||||
* net.cc (fdsock): Ditto.
|
||||
* path.cc (set_flags): Add more debugging.
|
||||
|
||||
2002-07-01 Christopher Faylor <cgf@redhat.com>
|
||||
|
||||
* debug.cc (threads): Avoid initialization.
|
||||
|
|
|
@ -65,7 +65,7 @@ fhandler_dev_clipboard::dup (fhandler_base * child)
|
|||
int
|
||||
fhandler_dev_clipboard::open (path_conv *, int flags, mode_t)
|
||||
{
|
||||
set_flags (flags, O_TEXT);
|
||||
set_flags (flags | O_TEXT);
|
||||
eof = false;
|
||||
pos = 0;
|
||||
if (membuffer)
|
||||
|
|
|
@ -538,7 +538,7 @@ fhandler_console::open (path_conv *, int flags, mode_t)
|
|||
set_io_handle (INVALID_HANDLE_VALUE);
|
||||
set_output_handle (INVALID_HANDLE_VALUE);
|
||||
|
||||
set_flags (flags & ~O_TEXT, O_BINARY);
|
||||
set_flags ((flags & ~O_TEXT) | O_BINARY);
|
||||
|
||||
/* Open the input handle as handle_ */
|
||||
h = CreateFileA ("CONIN$", GENERIC_READ|GENERIC_WRITE,
|
||||
|
|
|
@ -300,7 +300,7 @@ fhandler_proc::open (path_conv *pc, int flags, mode_t mode)
|
|||
|
||||
success:
|
||||
res = 1;
|
||||
set_flags (flags & ~O_TEXT, O_BINARY);
|
||||
set_flags ((flags & ~O_TEXT) | O_BINARY);
|
||||
set_open_status ();
|
||||
out:
|
||||
syscall_printf ("%d = fhandler_proc::open (%p, %d)", res, flags, mode);
|
||||
|
|
|
@ -237,7 +237,7 @@ fhandler_process::open (path_conv *pc, int flags, mode_t mode)
|
|||
|
||||
success:
|
||||
res = 1;
|
||||
set_flags (flags & ~O_TEXT, O_BINARY);
|
||||
set_flags ((flags & ~O_TEXT) | O_BINARY);
|
||||
set_open_status ();
|
||||
out:
|
||||
syscall_printf ("%d = fhandler_proc::open (%p, %d)", res, flags, mode);
|
||||
|
|
|
@ -31,7 +31,7 @@ fhandler_dev_random::fhandler_dev_random (int nunit)
|
|||
int
|
||||
fhandler_dev_random::open (path_conv *, int flags, mode_t)
|
||||
{
|
||||
set_flags (flags & ~O_TEXT, O_BINARY);
|
||||
set_flags ((flags & ~O_TEXT) | O_BINARY);
|
||||
set_open_status ();
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -175,7 +175,7 @@ fhandler_dev_raw::open (path_conv *real_path, int flags, mode_t)
|
|||
}
|
||||
|
||||
set_io_handle (h);
|
||||
set_flags (flags & ~O_TEXT, O_BINARY);
|
||||
set_flags ((flags & ~O_TEXT) | O_BINARY);
|
||||
|
||||
if (devbufsiz > 1L)
|
||||
devbuf = new char [devbufsiz];
|
||||
|
|
|
@ -480,7 +480,7 @@ fhandler_registry::open (path_conv *pc, int flags, mode_t mode)
|
|||
|
||||
success:
|
||||
res = 1;
|
||||
set_flags (flags & ~O_TEXT, O_BINARY);
|
||||
set_flags ((flags & ~O_TEXT) | O_BINARY);
|
||||
set_open_status ();
|
||||
out:
|
||||
if (hKey != (HKEY) INVALID_HANDLE_VALUE)
|
||||
|
|
|
@ -454,7 +454,7 @@ fhandler_tty_slave::open (path_conv *, int flags, mode_t)
|
|||
attach_tty (ttynum);
|
||||
tc->set_ctty (ttynum, flags);
|
||||
|
||||
set_flags (flags & ~O_TEXT, O_BINARY);
|
||||
set_flags ((flags & ~O_TEXT) | O_BINARY);
|
||||
/* Create synchronisation events */
|
||||
char buf[40];
|
||||
|
||||
|
@ -1006,7 +1006,7 @@ fhandler_pty_master::open (path_conv *, int flags, mode_t)
|
|||
|
||||
cygwin_shared->tty[ttynum]->common_init (this);
|
||||
inuse = get_ttyp ()->create_inuse (TTY_MASTER_ALIVE);
|
||||
set_flags (flags & ~O_TEXT, O_BINARY);
|
||||
set_flags ((flags & ~O_TEXT) | O_BINARY);
|
||||
set_open_status ();
|
||||
|
||||
termios_printf ("opened pty master tty%d<%p>", ttynum, this);
|
||||
|
|
|
@ -207,7 +207,7 @@ fhandler_virtual::open (path_conv *, int flags, mode_t mode)
|
|||
set_execable_p (not_executable);
|
||||
set_socket_p (false);
|
||||
|
||||
set_flags (flags & ~O_TEXT, O_BINARY);
|
||||
set_flags ((flags & ~O_TEXT) | O_BINARY);
|
||||
|
||||
set_nohandle (true);
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ fhandler_windows::fhandler_windows ()
|
|||
int
|
||||
fhandler_windows::open (path_conv *, int flags, mode_t)
|
||||
{
|
||||
set_flags (flags & ~O_TEXT, O_BINARY);
|
||||
set_flags ((flags & ~O_TEXT) | O_BINARY);
|
||||
set_close_on_exec_flag (1);
|
||||
set_open_status ();
|
||||
return 1;
|
||||
|
|
|
@ -23,7 +23,7 @@ fhandler_dev_zero::fhandler_dev_zero ()
|
|||
int
|
||||
fhandler_dev_zero::open (path_conv *, int flags, mode_t)
|
||||
{
|
||||
set_flags (flags & ~O_TEXT, O_BINARY);
|
||||
set_flags ((flags & ~O_TEXT) | O_BINARY);
|
||||
set_open_status ();
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -510,7 +510,7 @@ fdsock (int& fd, const char *name, SOCKET soc)
|
|||
debug_printf ("not setting socket inheritance since winsock2_active %d", winsock2_active);
|
||||
fhandler_socket *fh = (fhandler_socket *) cygheap->fdtab.build_fhandler (fd, FH_SOCKET, name);
|
||||
fh->set_io_handle ((HANDLE) soc);
|
||||
fh->set_flags (O_RDWR, O_BINARY);
|
||||
fh->set_flags (O_RDWR | O_BINARY);
|
||||
debug_printf ("fd %d, name '%s', soc %p", fd, name, soc);
|
||||
return fh;
|
||||
}
|
||||
|
|
|
@ -1338,7 +1338,15 @@ set_flags (unsigned *flags, unsigned val)
|
|||
{
|
||||
*flags = val;
|
||||
if (!(*flags & PATH_BINARY))
|
||||
*flags = PATH_TEXT;
|
||||
{
|
||||
*flags |= PATH_TEXT;
|
||||
debug_printf ("flags: text (%p)", *flags & (PATH_TEXT | PATH_BINARY));
|
||||
}
|
||||
else
|
||||
{
|
||||
*flags |= PATH_BINARY;
|
||||
debug_printf ("flags: binary (%p)", *flags & (PATH_TEXT | PATH_BINARY));
|
||||
}
|
||||
}
|
||||
|
||||
/* conv_to_win32_path: Ensure src_path is a pure Win32 path and store
|
||||
|
|
Loading…
Reference in New Issue