* dcrt0.cc: Include string.h.
(initial_env): Use small_printf's %P specifier. * dll_init.cc (dll_list::alloc): Use PATH_MAX instead of CYG_MAX_PATH for path name buffer size. * dll_init.h (struct dll): Ditto. * environ.cc: Include string.h. (win_env::add_cache): Use temporary local buffer for path conversion. (posify): Ditto. * exceptions.cc (try_to_debug): Use CreateProcessW to allow long path names. * miscfuncs.cc: Drop unused implementations of strcasematch and strncasematch. (ch_case_eq): Drop. (strcasestr): Drop. (cygwin_wcscasecmp): New function. (cygwin_wcsncasecmp): New function. (cygwin_strcasecmp): New function. (cygwin_strncasecmp): New function. (cygwin_wcslwr): New function. (cygwin_wcsupr): New function. (cygwin_strlwr): New function. (cygwin_strupr): New function. * ntdll.h (RtlDowncaseUnicodeString): Declare. (RtlUpcaseUnicodeString): Declare. (RtlInt64ToHexUnicodeString): Fix typo in comment. * string.h: Disable not NLS aware implementations of strcasematch and strncasematch. (cygwin_strcasecmp): Declare. (strcasecmp): Define as cygwin_strcasecmp. (cygwin_strncasecmp): Declare. (strncasecmp): Define as cygwin_strncasecmp. (strcasematch):Define using cygwin_strcasecmp. (strncasematch):Define using cygwin_strncasecmp. (cygwin_strlwr): Declare. (strlwr): Define as cygwin_strlwr. (cygwin_strupr): Declare. (strupr): Define as cygwin_strupr. * wchar.h: New file. * wincap.cc (wincapc::init): Use "NT" as fix OS string. * winsup.h (strcasematch): Drop declaration. (strncasematch): Ditto. (strcasestr): Ditto.
This commit is contained in:
@@ -308,7 +308,6 @@ wincapc wincap __attribute__((section (".cygwin_dll_common"), shared));
|
||||
void
|
||||
wincapc::init ()
|
||||
{
|
||||
const char *os;
|
||||
bool has_osversioninfoex = true;
|
||||
|
||||
if (caps)
|
||||
@@ -331,7 +330,6 @@ wincapc::init ()
|
||||
switch (version.dwMajorVersion)
|
||||
{
|
||||
case 4:
|
||||
os = "NT";
|
||||
if (!has_osversioninfoex
|
||||
&& strcmp (version.szCSDVersion, "Service Pack 4") < 0)
|
||||
caps = &wincap_nt4;
|
||||
@@ -339,7 +337,6 @@ wincapc::init ()
|
||||
caps = &wincap_nt4sp4;
|
||||
break;
|
||||
case 5:
|
||||
os = "NT";
|
||||
switch (version.dwMinorVersion)
|
||||
{
|
||||
case 0:
|
||||
@@ -367,11 +364,9 @@ wincapc::init ()
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
os = "NT";
|
||||
caps = &wincap_vista;
|
||||
break;
|
||||
default:
|
||||
os = "??";
|
||||
caps = &wincap_unknown;
|
||||
break;
|
||||
}
|
||||
@@ -382,7 +377,6 @@ wincapc::init ()
|
||||
api_fatal ("Windows 95/98/Me are not supported.");
|
||||
break;
|
||||
default:
|
||||
os = "??";
|
||||
caps = &wincap_unknown;
|
||||
break;
|
||||
}
|
||||
@@ -396,7 +390,7 @@ wincapc::init ()
|
||||
else
|
||||
((wincaps *)this->caps)->needs_count_in_si_lpres2 = false;
|
||||
|
||||
__small_sprintf (osnam, "%s-%d.%d", os, version.dwMajorVersion,
|
||||
__small_sprintf (osnam, "NT-%d.%d", version.dwMajorVersion,
|
||||
version.dwMinorVersion);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user