summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2012-06-30 01:51:24 +0000
committerIgor Pashev <pashev.igor@gmail.com>2012-06-30 01:51:24 +0000
commitd188ae114e2a026fd891f1dcfd9922df6deecee2 (patch)
treec74b20750157b8626201d8eb46a54f1609ab9acd
parentc016a191283ed59f245772825331ae40088800ef (diff)
downloadsunmake-d188ae114e2a026fd891f1dcfd9922df6deecee2.tar.gz
Ported Make/lib/mksh/src/macro.cc
-rw-r--r--usr/src/make_src/Make/lib/mksh/src/macro.cc12
1 files changed, 2 insertions, 10 deletions
diff --git a/usr/src/make_src/Make/lib/mksh/src/macro.cc b/usr/src/make_src/Make/lib/mksh/src/macro.cc
index 43d7603..6040bb9 100644
--- a/usr/src/make_src/Make/lib/mksh/src/macro.cc
+++ b/usr/src/make_src/Make/lib/mksh/src/macro.cc
@@ -161,7 +161,7 @@ expand_value(Name value, register String destination, Boolean cmd)
value->being_expanded = true;
/* Setup the structure we read from */
Wstring vals(value);
- sourceb.string.text.p = sourceb.string.buffer.start = wsdup(vals.get_string());
+ sourceb.string.text.p = sourceb.string.buffer.start = wcsdup(vals.get_string());
sourceb.string.free_after_use = true;
sourceb.string.text.end =
sourceb.string.buffer.end =
@@ -585,7 +585,7 @@ get_macro_value:
eq = percent + 1;
if (eq[0] == (int) nul_char) {
MBSTOWCS(wcs_buffer, "");
- right_hand[i] = (wchar_t *) wsdup(wcs_buffer);
+ right_hand[i] = (wchar_t *) wcsdup(wcs_buffer);
i++;
break;
}
@@ -1381,13 +1381,6 @@ found_it:;
new_value = ALLOC_WC(length);
new_value_allocated = true;
WCSTOMBS(mbs_buffer, old_vr);
-#if !defined(linux)
- (void) wsprintf(new_value,
- NOCATGETS("/usr/arch/%s/%s:%s"),
- ha->string_mb + 1,
- ta->string_mb + 1,
- mbs_buffer);
-#else
char * mbs_new_value = (char *)getmem(length);
(void) sprintf(mbs_new_value,
NOCATGETS("/usr/arch/%s/%s:%s"),
@@ -1396,7 +1389,6 @@ found_it:;
mbs_buffer);
MBSTOWCS(new_value, mbs_new_value);
retmem_mb(mbs_new_value);
-#endif
}
if (new_value[0] != 0) {
(void) setvar_daemon(virtual_root,