Overview
| Artifact ID: | 514b571f77f18de06c0ebe5a6dbb5fd4da7cbe79 |
|---|---|
| Ticket: | 218752ffffffffffffffffffffffffffffffffff
Tcl8.1 on OS/390: va_list is an array |
| User & Date: | nobody on 2000-10-26 01:04:57 |
Changes
- assignee changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
OriginalBugID: 1997 Bug Version: 8.1 SubmitDate: '1999-05-06' LastModified: '1999-05-07' Severity: MED Status: Released Submitter: pat ChangedBy: stanton OS: Other OSVersion: OS/390 4.0 Machine: NA FixedDate: '1999-05-07' FixedInVersion: 8.1.1 ClosedDate: '2000-10-25' Name: Christian Krone ObservedBehavior: Cite from the changes file: > 3/9/99 (new feature) Integrated the stub library mechanism [...] > - Added va_list versions of all VARARGS functions so they can be > invoked from wrapper functions. And these va_list functions - notably tclStringObj.c:Tcl_AppendStringsToObjVA() and tclResult.c:Tcl_AppendResultVA() - cannot be compiled on OS/390! Both functions have the following code: > va_list tmpArgList; > [...] > tmpArgList = argList; On OS/390 va_list is declared as follow: > typedef char *___valist[2]; > typedef ___valist va_list; (an array of two char pointers, right?) And the compiler generates the error: > operand must be a modifiable lvalue. DesiredBehavior: It does compile with a memcpy: > memcpy ((VOID *) &tmpArgList, (VOID *) &argList, sizeof (tmpArgList)); Patch: *** generic/tclStringObj.c.orgThu Apr 29 03:11:49 1999 --- generic/tclStringObj.cTue May 4 15:47:58 1999 *************** *** 429,435 **** * bytes would be appended, just return. */ ! tmpArgList = argList; newLength = oldLength = objPtr->length; while (1) { string = va_arg(tmpArgList, char *); --- 429,435 ---- * bytes would be appended, just return. */ ! memcpy ((VOID *) &tmpArgList, (VOID *) &argList, sizeof (tmpArgList)); newLength = oldLength = objPtr->length; while (1) { string = va_arg(tmpArgList, char *); *** generic/tclResult.c.orgThu Apr 29 03:11:48 1999 --- generic/tclResult.cTue May 4 15:47:47 1999 *************** *** 475,481 **** * Scan through all the arguments to see how much space is needed. */ ! tmpArgList = argList; newSpace = 0; while (1) { string = va_arg(tmpArgList, char *); --- 475,481 ---- * Scan through all the arguments to see how much space is needed. */ ! memcpy ((VOID *) &tmpArgList, (VOID *) &argList, sizeof (tmpArgList)); newSpace = 0; while (1) { string = va_arg(tmpArgList, char *); PatchFiles: tclStringObj.c tclResult.c - foundin changed to: "obsolete: 8.1"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "nobody"
- subsystem changed to: "69. Other"
- title changed to: "Tcl8.1 on OS/390: va_list is an array"
- type changed to: "Bug"