[5051] in Athena Bugs
RT /bin/ld error messages
daemon@ATHENA.MIT.EDU (John Carr)
Mon Jun 4 08:32:48 1990
To: bugs@ATHENA.MIT.EDU
Date: Mon, 04 Jun 90 08:32:32 EDT
From: John Carr <jfc@ATHENA.MIT.EDU>
The following patch makes ld on the RT print error messages better.
Currently, the mix of stdout and stderr garbles output redirected to a
file.
*** /source/bsd-4.3/rt/bin/ld.c Thu Apr 5 18:45:38 1990
--- ld.c Mon Jun 4 08:24:50 1990
***************
*** 1542,1546 ****
continue;
if (nund==0)
! printf("Undefined:\n");
nund++;
printf("%s\n", sp->n_un.n_name);
--- 1542,1546 ----
continue;
if (nund==0)
! fprintf(stderr, "Undefined:\n");
nund++;
printf("%s\n", sp->n_un.n_name);
***************
*** 1593,1597 ****
return;
if ((sp->n_type != N_EXT+N_UNDF || sp->n_value) && !Aflag) {
! printf("%s: ", sp->n_un.n_name);
error(0, "user attempt to redfine loader-defined symbol");
return;
--- 1593,1597 ----
return;
if ((sp->n_type != N_EXT+N_UNDF || sp->n_value) && !Aflag) {
! fprintf(stderr, "%s: ", sp->n_un.n_name);
error(0, "user attempt to redfine loader-defined symbol");
return;
***************
*** 1834,1838 ****
continue;
if (cursym.n_type!=sp->n_type || cursym.n_value!=sp->n_value) {
! printf("%s: ", cursym.n_un.n_name);
error(0, "multiply defined");
}
--- 1834,1838 ----
continue;
if (cursym.n_type!=sp->n_type || cursym.n_value!=sp->n_value) {
! fprintf(stderr, "%s: ", cursym.n_un.n_name);
error(0, "multiply defined");
}
***************
*** 2764,2769 ****
if (write(biofd, bp->b_buf, cnt) != cnt) {
char tmp[128];
- sprintf(tmp, "output write error: %s", errstr(errno));
bwrerror = 1;
error(1, tmp);
}
--- 2764,2769 ----
if (write(biofd, bp->b_buf, cnt) != cnt) {
char tmp[128];
bwrerror = 1;
+ sprintf(tmp, "output write error: %s", errstr(errno));
error(1, tmp);
}