Print this page
make: use the more modern wchar routines, not widec.h
@@ -188,19 +188,19 @@
}
uname(&uts_info);
strcpy(local_host_mb, &uts_info.nodename[0]);
MBSTOWCS(local_host, local_host_mb);
- local_host_wslen = wslen(local_host);
+ local_host_wslen = wcslen(local_host);
// There is no getdomainname() function on Solaris.
// And netname2host() function does not work on Linux.
// So we have to use different APIs.
if (host2netname(mbs_buffer, NULL, NULL) &&
netname2host(mbs_buffer, mbs_buffer2, MAXNETNAMELEN+1)) {
MBSTOWCS(full_host, mbs_buffer2);
- full_host_wslen = wslen(full_host);
+ full_host_wslen = wcslen(full_host);
}
for (ms = make_machines_list;
(ms) && (*ms );
) {
@@ -235,30 +235,30 @@
/*
* Print "Ignoring unknown host" if:
* 1) hostname is longer than MAX_HOSTNAMELEN, or
* 2) hostname is unknown
*/
- if ((wslen(mp) > MAX_HOSTNAMELEN) ||
+ if ((wcslen(mp) > MAX_HOSTNAMELEN) ||
((hp = gethostbyname(mbs_buffer)) == NULL)) {
warning(gettext("Ignoring unknown host %s"),
mbs_buffer);
SKIPTOEND(ms);
/* Increment ptr if not end of file. */
if (*ms) {
ms++;
}
} else {
/* Compare current hostname with local_host. */
- if (wslen(mp) == local_host_wslen &&
+ if (wcslen(mp) == local_host_wslen &&
IS_WEQUALN(mp, local_host, local_host_wslen)) {
/*
* Bingo, local_host is in .make.machines.
* Continue reading.
*/
pmake_max_jobs = PMAKE_DEF_MAX_JOBS;
/* Compare current hostname with full_host. */
- } else if (wslen(mp) == full_host_wslen &&
+ } else if (wcslen(mp) == full_host_wslen &&
IS_WEQUALN(mp, full_host, full_host_wslen)) {
/*
* Bingo, full_host is in .make.machines.
* Continue reading.
*/