Print this page
make: use the more modern wchar routines, not widec.h
@@ -1828,17 +1828,17 @@
* default makefile (make.rules), then we'd like to
* change the macro value of MAKE to be some form
* of argv[0] for recursive MAKE builds.
*/
MBSTOWCS(wcs_buffer, "MAKE");
- def_make_name = GETNAME(wcs_buffer, wslen(wcs_buffer));
+ def_make_name = GETNAME(wcs_buffer, wcslen(wcs_buffer));
def_make_macro = get_prop(def_make_name->prop, macro_prop);
if ((def_make_macro != NULL) &&
(IS_EQUAL(def_make_macro->body.macro.value->string_mb,
"make"))) {
MBSTOWCS(wcs_buffer, argv_zero_string);
- new_make_value = GETNAME(wcs_buffer, wslen(wcs_buffer));
+ new_make_value = GETNAME(wcs_buffer, wcslen(wcs_buffer));
(void) SETVAR(def_make_name,
new_make_value,
false);
}
@@ -2283,17 +2283,17 @@
* default makefile (make.rules), then we'd like to
* change the macro value of ARFLAGS to be in accordance
* with "POSIX" requirements.
*/
MBSTOWCS(wcs_buffer, "ARFLAGS");
- name = GETNAME(wcs_buffer, wslen(wcs_buffer));
+ name = GETNAME(wcs_buffer, wcslen(wcs_buffer));
macro = get_prop(name->prop, macro_prop);
if ((macro != NULL) && /* Maybe (macro == NULL) || ? */
(IS_EQUAL(macro->body.macro.value->string_mb,
"rv"))) {
MBSTOWCS(wcs_buffer, "-rv");
- value = GETNAME(wcs_buffer, wslen(wcs_buffer));
+ value = GETNAME(wcs_buffer, wcslen(wcs_buffer));
(void) SETVAR(name,
value,
false);
}
}
@@ -2545,11 +2545,11 @@
}
tmp_char = *cp;
*cp = (int) nul_char;
MBSTOWCS(wcs_buffer, argv[i]);
*cp = tmp_char;
- name = GETNAME(wcs_buffer, wslen(wcs_buffer));
+ name = GETNAME(wcs_buffer, wcslen(wcs_buffer));
while (*cp != (int) equal_char) {
cp++;
}
cp++;
while (isspace(*cp) && (*cp != (int) nul_char)) {
@@ -2655,25 +2655,25 @@
name = tmp_wcs_buffer;
} else {
MBSTOWCS(wcs_buffer, *environment);
name = wcs_buffer;
}
- value = (wchar_t *) wschr(name, (int) equal_char);
+ value = (wchar_t *) wcschr(name, (int) equal_char);
/*
* Looks like there's a bug in the system, but sometimes
* you can get blank lines in *environment.
*/
if (!value) {
continue;
}
MBSTOWCS(wcs_buffer2, "SHELL=");
- if (IS_WEQUALN(name, wcs_buffer2, wslen(wcs_buffer2))) {
+ if (IS_WEQUALN(name, wcs_buffer2, wcslen(wcs_buffer2))) {
continue;
}
MBSTOWCS(wcs_buffer2, "MAKEFLAGS=");
- if (IS_WEQUALN(name, wcs_buffer2, wslen(wcs_buffer2))) {
+ if (IS_WEQUALN(name, wcs_buffer2, wcslen(wcs_buffer2))) {
report_pwd = true;
/*
* In POSIX mode we do not want MAKEFLAGS to be readonly.
* If the MAKEFLAGS macro is subsequently set by the makefile,
* it replaces the MAKEFLAGS variable currently found in the
@@ -2692,11 +2692,11 @@
* (recursive make), we don't want to read this because then
* the child make will end up writing to the parent
* directory's .make.state and clobbering them.
*/
MBSTOWCS(wcs_buffer2, "SUNPRO_DEPENDENCIES");
- if (IS_WEQUALN(name, wcs_buffer2, wslen(wcs_buffer2))) {
+ if (IS_WEQUALN(name, wcs_buffer2, wcslen(wcs_buffer2))) {
continue;
}
macro = GETNAME(name, value - name);
maybe_append_prop(macro, macro_prop)->body.macro.exported =
@@ -2809,11 +2809,11 @@
}
MBSTOWCS(wcs_buffer, cp);
//default_target_to_build = GETNAME(wcs_buffer,
// FIND_LENGTH);
default_target_to_build = normalize_name(wcs_buffer,
- wslen(wcs_buffer));
+ wcslen(wcs_buffer));
if (default_target_to_build == wait_name) {
if (parallel_process_cnt > 0) {
finish_running();
}
continue;
@@ -2878,11 +2878,11 @@
(cp[3] == (int) '-')) {
argv[i] = NULL;
continue;
}
MBSTOWCS(wcs_buffer, cp);
- default_target_to_build = normalize_name(wcs_buffer, wslen(wcs_buffer));
+ default_target_to_build = normalize_name(wcs_buffer, wcslen(wcs_buffer));
top_level_target = get_wstring(default_target_to_build->string_mb);
report_recursion(default_target_to_build);
commands_done = false;
if (parallel) {
result = (Doname) default_target_to_build->state;