* fhandler_tty.cc (fhandler_tty_slave::open): Use MAX_PATH instead of
CYG_MAX_PATH for event name buffer size. (fhandler_pty_master::setup): Use MAX_PATH instead of CYG_MAX_PATH for mutex name buffer size. * netdb.cc: Drop old comment. (open_system_file): Set path buffer size to MAX_PATH instead of CYG_MAX_PATH. Drop conversion to posix path. Open file using win32 path. Fix typo in ChangeLog.
This commit is contained in:
parent
5224a7bbf3
commit
27114d3aff
@ -1,9 +1,20 @@
|
|||||||
|
2007-12-05 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* fhandler_tty.cc (fhandler_tty_slave::open): Use MAX_PATH instead of
|
||||||
|
CYG_MAX_PATH for event name buffer size.
|
||||||
|
(fhandler_pty_master::setup): Use MAX_PATH instead of CYG_MAX_PATH for
|
||||||
|
mutex name buffer size.
|
||||||
|
* netdb.cc: Drop old comment.
|
||||||
|
(open_system_file): Set path buffer size to MAX_PATH instead of
|
||||||
|
CYG_MAX_PATH. Drop conversion to posix path. Open file using win32
|
||||||
|
path.
|
||||||
|
|
||||||
2007-12-05 Corinna Vinschen <corinna@vinschen.de>
|
2007-12-05 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* fhandler_registry.cc: Use NAME_MAX + 1 instead of CYG_MAX_PATH
|
* fhandler_registry.cc: Use NAME_MAX + 1 instead of CYG_MAX_PATH
|
||||||
throughout for subkey name buffer size.
|
throughout for subkey name buffer size.
|
||||||
* fhandler_socket.cc (search_wsa_event_slot): Use MAX_PATH instead of
|
* fhandler_socket.cc (search_wsa_event_slot): Use MAX_PATH instead of
|
||||||
CYG_MAX_PATH for mutext name buffer size.
|
CYG_MAX_PATH for mutex name buffer size.
|
||||||
(fhandler_socket::init_events): Ditto.
|
(fhandler_socket::init_events): Ditto.
|
||||||
* fhandler_virtual.cc (fhandler_virtual::opendir): Check path length
|
* fhandler_virtual.cc (fhandler_virtual::opendir): Check path length
|
||||||
against PATH_MAX instead of against CYG_MAX_PATH.
|
against PATH_MAX instead of against CYG_MAX_PATH.
|
||||||
|
@ -478,7 +478,7 @@ fhandler_tty_slave::open (int flags, mode_t)
|
|||||||
|
|
||||||
set_flags ((flags & ~O_TEXT) | O_BINARY);
|
set_flags ((flags & ~O_TEXT) | O_BINARY);
|
||||||
/* Create synchronisation events */
|
/* Create synchronisation events */
|
||||||
char buf[CYG_MAX_PATH];
|
char buf[MAX_PATH];
|
||||||
|
|
||||||
/* output_done_event may or may not exist. It will exist if the tty
|
/* output_done_event may or may not exist. It will exist if the tty
|
||||||
was opened by fhandler_tty_master::init, normally called at
|
was opened by fhandler_tty_master::init, normally called at
|
||||||
@ -1402,7 +1402,7 @@ fhandler_pty_master::setup (bool ispty)
|
|||||||
if (!(input_available_event = t.get_event (errstr = INPUT_AVAILABLE_EVENT, TRUE)))
|
if (!(input_available_event = t.get_event (errstr = INPUT_AVAILABLE_EVENT, TRUE)))
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
char buf[CYG_MAX_PATH];
|
char buf[MAX_PATH];
|
||||||
errstr = shared_name (buf, OUTPUT_MUTEX, t.ntty);
|
errstr = shared_name (buf, OUTPUT_MUTEX, t.ntty);
|
||||||
if (!(output_mutex = CreateMutex (&sec_all, FALSE, buf)))
|
if (!(output_mutex = CreateMutex (&sec_all, FALSE, buf)))
|
||||||
goto err;
|
goto err;
|
||||||
|
@ -23,23 +23,19 @@ details. */
|
|||||||
"networks"
|
"networks"
|
||||||
"hosts"
|
"hosts"
|
||||||
|
|
||||||
This routine will try to locate these files based on system type.
|
|
||||||
Currently the only distinction made is between NT and non-NT systems.
|
|
||||||
|
|
||||||
It is the callers responsibility to close the file. */
|
It is the callers responsibility to close the file. */
|
||||||
static FILE *
|
static FILE *
|
||||||
open_system_file (const char *relative_path)
|
open_system_file (const char *relative_path)
|
||||||
{
|
{
|
||||||
char win32_name[CYG_MAX_PATH];
|
/* system dir path is never longer. */
|
||||||
char posix_name[CYG_MAX_PATH];
|
char win32_name[MAX_PATH];
|
||||||
|
|
||||||
if (!GetSystemDirectory (win32_name, CYG_MAX_PATH))
|
if (!GetSystemDirectory (win32_name, MAX_PATH))
|
||||||
return NULL;
|
return NULL;
|
||||||
strcat (win32_name, "\\drivers\\etc\\");
|
strcat (win32_name, "\\drivers\\etc\\");
|
||||||
strcat (win32_name, relative_path);
|
strcat (win32_name, relative_path);
|
||||||
cygwin_conv_to_full_posix_path (win32_name, posix_name);
|
|
||||||
debug_printf ("netdb file to open %s", win32_name);
|
debug_printf ("netdb file to open %s", win32_name);
|
||||||
FILE *result = fopen (posix_name, "rt");
|
FILE *result = fopen (win32_name, "rt");
|
||||||
debug_printf ("handle to netdb file %p", result);
|
debug_printf ("handle to netdb file %p", result);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user