Date: Sat, 21 Oct 1995 08:52:08 -0400 From: Jim Leppek <jleppek@harris.com> To: freebsd-current@freefall.FreeBSD.org Subject: patch to fix ranlib Message-ID: <199510211252.IAA04827@cyclops>
next in thread | raw e-mail | index | archive | help
ranlib does not work for odd length extended names. I sent in
some mail with the patch a while ago but I have not heard anything.
could someone else check this and commit this patch.
You can test this by creating any odd length named object over 16chars
ie. obj_with_a_long_nam.o
ar cr test.a obj_with_a_long_nam.o
ranlib test.a will fail with inappropriate file type
apply this patch and things will work:
*** build.c.orig Sat Oct 21 08:46:14 1995
--- build.c Sat Oct 21 08:47:44 1995
***************
*** 103,109 ****
/* Copy the saved objects into the archive. */
size = lseek(tfd, (off_t)0, SEEK_CUR);
(void)lseek(tfd, (off_t)0, SEEK_SET);
! SETCF(tfd, tname, afd, archive, RPAD|WPAD);
copy_ar(&cf, size);
(void)ftruncate(afd, lseek(afd, (off_t)0, SEEK_CUR));
(void)close(tfd);
--- 103,109 ----
/* Copy the saved objects into the archive. */
size = lseek(tfd, (off_t)0, SEEK_CUR);
(void)lseek(tfd, (off_t)0, SEEK_SET);
! SETCF(tfd, tname, afd, archive, WPAD);
copy_ar(&cf, size);
(void)ftruncate(afd, lseek(afd, (off_t)0, SEEK_CUR));
(void)close(tfd);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199510211252.IAA04827>
