Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2007-12-05 19:50:18 +0300
committerCorinna Vinschen <corinna@vinschen.de>2007-12-05 19:50:18 +0300
commit27114d3aff40e6d8d6132f64dc218f8a7765953e (patch)
tree5d92d9d3519894655490e0327ee34df52c12f077 /winsup/cygwin/netdb.cc
parent5224a7bbf34a50c03d630dd02bfd636ff88583c0 (diff)
* 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.
Diffstat (limited to 'winsup/cygwin/netdb.cc')
-rw-r--r--winsup/cygwin/netdb.cc12
1 files changed, 4 insertions, 8 deletions
diff --git a/winsup/cygwin/netdb.cc b/winsup/cygwin/netdb.cc
index 1e5cbcc3b..efbd33776 100644
--- a/winsup/cygwin/netdb.cc
+++ b/winsup/cygwin/netdb.cc
@@ -23,23 +23,19 @@ details. */
"networks"
"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. */
static FILE *
open_system_file (const char *relative_path)
{
- char win32_name[CYG_MAX_PATH];
- char posix_name[CYG_MAX_PATH];
+ /* system dir path is never longer. */
+ char win32_name[MAX_PATH];
- if (!GetSystemDirectory (win32_name, CYG_MAX_PATH))
+ if (!GetSystemDirectory (win32_name, MAX_PATH))
return NULL;
strcat (win32_name, "\\drivers\\etc\\");
strcat (win32_name, relative_path);
- cygwin_conv_to_full_posix_path (win32_name, posix_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);
return result;
}