From owner-freebsd-current Sat Oct 21 05:46:10 1995 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id FAA01015 for current-outgoing; Sat, 21 Oct 1995 05:46:10 -0700 Received: from cyclops (xtwa15.ess.harris.com [130.41.26.174]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id FAA01010 for ; Sat, 21 Oct 1995 05:46:06 -0700 Received: (from jleppek@localhost) by cyclops (8.6.12/8.6.9) id IAA04827; Sat, 21 Oct 1995 08:52:08 -0400 Date: Sat, 21 Oct 1995 08:52:08 -0400 From: Jim Leppek Message-Id: <199510211252.IAA04827@cyclops> To: freebsd-current@freefall.FreeBSD.org Subject: patch to fix ranlib Sender: owner-current@FreeBSD.org Precedence: bulk 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);