Artifacts Associated With Ticket 218136
Ticket change [6ef2c0b8e9] (rid 100226) by nobody on 2000-10-26 00:53:35:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
OriginalBugID: 2054 Bug Version: 8.1b3 SubmitDate: '1999-05-12' LastModified: '1999-09-15' Severity: CRIT Status: Closed Submitter: pat ChangedBy: hobbs OS: Other OSVersion: UNICOS 10.0.0.2 & 10.0.0.3 Machine: NA FixedDate: '2000-10-25' ClosedDate: '1999-09-15' Name: Richard Paynter CustomShell: Modified tclUnixFCmd.c as shown above. ReproducibleScript: Modified lines 373, 378, and 385, as shown below due to fatal assignments. 373: length = readlink(src, link, sizeof(link)); ==> length = \ readlink((char *)src, link, sizeof(link)) 378: if (symlink(link, dst) < 0) { ==> if (symlink(link, (char *)dst) < 0) { 385: if (mknod(dst, srcStatBuf.st_mode, ==> if (mknod((char *)dst, \ srcStatBuf.st_mode, ObservedBehavior: Compilation aborted on these lines, until I explicitly typecast src and dst as (char *), rather than leaving them as (const char *) DesiredBehavior: Successful compilation of tclUnixFCmd.c Patch: *** tclUnixFCmd.c.old Wed May 12 14:21:02 1999 --- tclUnixFCmd.c Wed May 12 14:15:55 1999 *************** *** 370,381 **** char link[MAXPATHLEN]; int length; ! length = readlink(src, link, sizeof(link)); /* INTL: Native. */ if (length == -1) { return TCL_ERROR; } link[length] = '\0'; ! if (symlink(link, dst) < 0) { /* INTL: Native. */ return TCL_ERROR; } break; --- 370,381 ---- char link[MAXPATHLEN]; int length; ! length = readlink((char *)src, link, sizeof(link)); /* INTL: Native. */ if (length == -1) { return TCL_ERROR; } link[length] = '\0'; ! if (symlink(link, (char *)dst) < 0) { /* INTL: Native. */ return TCL_ERROR; } break; *************** *** 382,388 **** } case S_IFBLK: case S_IFCHR: { ! if (mknod(dst, srcStatBuf.st_mode, /* INTL: Native. */ srcStatBuf.st_rdev) < 0) { return TCL_ERROR; } --- 382,388 ---- } case S_IFBLK: case S_IFCHR: { ! if (mknod((char *)dst, srcStatBuf.st_mode, /* INTL: Native. */ srcStatBuf.st_rdev) < 0) { return TCL_ERROR; } PatchFiles: tclUnixFCmd.c This looks to be a compiler/system bug, because looking at Linux, Solaris and IRIX, they all define this to be a const char *. -- 09/15/1999 hobbs - foundin initialized to: "obsolete: 8.1b3"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "69. Other"
- title initialized to:
Found 3 const char */char * conflicts in tclUnixFCmd.c
- type initialized to: "Bug"
Ticket change [9392c02733] (rid 105842) by welch on 2000-10-26 08:15:55:
- closedate changed to: "2000-10-26T01:15:55"
- closer changed to: "welch"
- priority changed to: "2"
- resolution changed to: "Fixed"
- status changed to: "Closed"
Ticket change [c07d4a7ffe] (rid 102413) by dgp on 2001-04-17 05:54:46:
- closedate changed to: "2001-04-16T22:54:46"
- closer changed to: "dgp"
- subsystem changed to: "37. File System"