mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-03-31 02:32:49 -05:00
Remove test for, and fallback impl of, wmemchr.
This was introduced in commit e7acb9f6968d482, as a side effect of also wanting to call wmemchr to find a NUL wide character in the buffer returned from GetDlgItemTextW. But the previous commit has superseded that code, so now we don't use wmemchr in this code base any more. Remove the machinery that provides it, saving a now-useless cmake configure-time check.
This commit is contained in:
parent
05a13d5cf7
commit
da8241cff6
@ -15,7 +15,6 @@
|
||||
#cmakedefine01 HAVE_GETNAMEDPIPECLIENTPROCESSID
|
||||
#cmakedefine01 HAVE_SETDEFAULTDLLDIRECTORIES
|
||||
#cmakedefine01 HAVE_STRTOUMAX
|
||||
#cmakedefine01 HAVE_WMEMCHR
|
||||
#cmakedefine01 HAVE_DWMAPI_H
|
||||
|
||||
#cmakedefine NOT_X_WINDOWS
|
||||
|
@ -53,7 +53,6 @@ define_negation(NO_HTMLHELP HAVE_HTMLHELP_H)
|
||||
check_include_files("winsock2.h;afunix.h" HAVE_AFUNIX_H)
|
||||
|
||||
check_symbol_exists(strtoumax "inttypes.h" HAVE_STRTOUMAX)
|
||||
check_symbol_exists(wmemchr "wchar.h" HAVE_WMEMCHR)
|
||||
check_symbol_exists(AddDllDirectory "windows.h" HAVE_ADDDLLDIRECTORY)
|
||||
check_symbol_exists(SetDefaultDllDirectories "windows.h"
|
||||
HAVE_SETDEFAULTDLLDIRECTORIES)
|
||||
|
5
defs.h
5
defs.h
@ -53,11 +53,6 @@ uintmax_t strtoumax(const char *nptr, char **endptr, int base);
|
||||
#define SIZEu "zu"
|
||||
#endif
|
||||
|
||||
#if !HAVE_WMEMCHR
|
||||
/* Work around lack of wmemchr in older MSVC */
|
||||
wchar_t *wmemchr(const wchar_t *s, wchar_t c, size_t n);
|
||||
#endif
|
||||
|
||||
#if defined __GNUC__ || defined __clang__
|
||||
/*
|
||||
* On MinGW, the correct compiler format checking for vsnprintf() etc
|
||||
|
@ -42,9 +42,6 @@ add_sources_from_current_dir(utils
|
||||
if(NOT HAVE_STRTOUMAX)
|
||||
add_sources_from_current_dir(utils utils/strtoumax.c)
|
||||
endif()
|
||||
if(NOT HAVE_WMEMCHR)
|
||||
add_sources_from_current_dir(utils utils/wmemchr.c)
|
||||
endif()
|
||||
add_sources_from_current_dir(eventloop
|
||||
cliloop.c handle-wait.c)
|
||||
add_sources_from_current_dir(console
|
||||
|
@ -1,15 +0,0 @@
|
||||
/*
|
||||
* Work around lack of wmemchr in older MSVC libraries.
|
||||
*/
|
||||
|
||||
#include <wchar.h>
|
||||
|
||||
#include "defs.h"
|
||||
|
||||
wchar_t *wmemchr(const wchar_t *s, wchar_t c, size_t n)
|
||||
{
|
||||
for (; n != 0; s++, n--)
|
||||
if (*s == c)
|
||||
return (wchar_t *)s;
|
||||
return NULL;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user