From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15033 invoked from network); 7 Feb 2005 15:47:54 -0000 Received: from unknown (HELO lists.gnu.org) (199.232.76.165) by sourceware.org with SMTP; 7 Feb 2005 15:47:54 -0000 Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CyBK8-0000w6-VF for listarch-gnats-devel@sources.redhat.com; Mon, 07 Feb 2005 11:01:16 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1CyBID-0000Q8-Ff for help-gnats@gnu.org; Mon, 07 Feb 2005 10:59:17 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1CyBI9-0000Oh-Vg for help-gnats@gnu.org; Mon, 07 Feb 2005 10:59:17 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CyBI9-0000OY-QA for help-gnats@gnu.org; Mon, 07 Feb 2005 10:59:13 -0500 Received: from [195.138.79.154] (helo=relay.apk.od.ua) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1CyB4i-000332-U7 for help-gnats@gnu.org; Mon, 07 Feb 2005 10:45:26 -0500 Received: from nostromo.holding.local (nostromo.holding.local [10.1.1.8]) by relay.apk.od.ua (8.12.11/8.12.11) with SMTP id j17FiOg2029854 for ; Mon, 7 Feb 2005 17:44:25 +0200 (EET) Date: Mon, 07 Feb 2005 15:47:00 -0000 From: "Mike M. Volokhov" To: help-gnats@gnu.org Message-Id: <20050207174424.136b4b5b.mishka@apk.od.ua> In-Reply-To: <20050106170435.GA2921@wookimus.net> References: <20050105222435.GA23939@wookimus.net> <20050106111441.64c255e3.mishka@apk.od.ua> <20050106170435.GA2921@wookimus.net> Organization: Insakharprom-K, Ltd. X-Mailer: Sylpheed version 0.9.99-gtk2-20041024 (GTK+ 2.4.13; i386--netbsdelf) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.80/689/Thu Jan 27 15:33:10 2005 clamav-milter version 0.80j on betty.holding.local X-Virus-Status: Clean Subject: Re: gnatsd problems with 4.0.1 X-BeenThere: help-gnats@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General discussion about GNU GNATS List-Archive: List-Post: List-Help: List-Subscribe: , Sender: help-gnats-bounces+listarch-gnats-devel=sources.redhat.com@gnu.org Errors-To: help-gnats-bounces+listarch-gnats-devel=sources.redhat.com@gnu.org X-SW-Source: 2005-q1/txt/msg00017.txt.bz2 On Thu, 6 Jan 2005 11:04:35 -0600 Chad Walstrom wrote: First, excuse me please for the delayed answer. :-( > Mike M. Volokhov wrote: > > Could you explain me please what a reason to have libiberty code in > > GNATS tree? > > For historical and supposedly portability reasons. Frankly, I'm not > that comfortable with it being there. I haven't had much time lately, > but I'd love to audit the GNATS codebase to find out what functions in > ./libiberty are actually being used and decide either to adopt them > completely by moving them into the ./gnats directory OR drop them > completely. There was a lot of cruft pulled in from my last update. We > can always roll back the CVS to the point before the libiberty update > (which I've been contemplating since the day I mistakenly committed it > to TRUNK rather than the dev branch like I wanted). > > Any opinions in either direction? Yes, that's exactly I've asked why. Including libiberty in GNATS codebase depends on how much it is used by the project. Unfortunately, libiberty itself seems have not official distribution and in addition it may provide some functionality which cannot be acheived by standard C library. > If someone is willing to do the audit, let me know. It may not take > much time, but most of my spare time right now is going toward a > certification class, :-/, and caring for my son, :-). I've done some sort of GNATS sources audit to know how much project dependends on libiberty code. Well, seems it is not too hard dependent! I've used libiberty.h header file to obtain a list of provided functions and ran a simple script across gnats/*.[ch] files. It shows a results at the end of this mail message. So, only six functions are used by GNATS, when libiberty provides about 40. Only two functions (asprintf and vasprintf) are nor POSIX nor standard C relevant (but included in both GNU and BSD libc). Three functions (xstrdup, xmalloc, xrealloc) are totally libiberty-own, but can be easy replaced with their standard equivalents. Thus, I propose to eliminate dependency on libiberty completely. Any comments? -- Best wishes, Mishka. ========8<=======8<========8<=======8<========8<=======8<======== The distribution of used libiberty functions accross GNATS sources: --- asprintf --- 8 gnats/file-pr.c 7 gnats/queue-pr.c 5 gnats/query-pr.c 4 gnats/field.c 4 gnats/gnats-pwconv.c 4 gnats/pr.c 3 gnats/misc.c 2 gnats/database.c 2 gnats/edit.c 2 gnats/index.c 2 gnats/internal.c 2 gnats/query.c 1 gnats/client.c 1 gnats/cmds.c 1 gnats/gnats.h 1 gnats/mail.c 1 gnats/pr-edit.c 1 gnats/pr-stat.c --- basename --- 2 gnats/queue-pr.c 1 gnats/gen-closed-date.c 1 gnats/gen-index.c 1 gnats/getclose.c 1 gnats/gnatsd.c 1 gnats/pr-age.c 1 gnats/pr-edit.c 1 gnats/pr-stat.c 1 gnats/query-pr.c --- vasprintf --- 1 gnats/gnats.h 1 gnats/internal.c --- xmalloc --- 13 gnats/query.c 9 gnats/index.c 7 gnats/pr.c 6 gnats/field.c 5 gnats/misc.c 4 gnats/queue-pr.c 3 gnats/edit.c 3 gnats/file-pr.c 3 gnats/internal.c 2 gnats/adm.c 2 gnats/client.c 2 gnats/gen-closed-date.c 2 gnats/gnatsd.c 1 gnats/cmds.c 1 gnats/database.c 1 gnats/gen-index.c 1 gnats/lists.c 1 gnats/mail.c 1 gnats/pr-age.c 1 gnats/pr-edit.c 1 gnats/pr-stat.c --- xrealloc --- 5 gnats/query.c 3 gnats/gnatsd.c 3 gnats/pr.c 2 gnats/field.c 2 gnats/index.c 2 gnats/misc.c 2 gnats/pr-edit.c 1 gnats/client.c 1 gnats/cmds.c 1 gnats/file-pr.c 1 gnats/gen-index.c 1 gnats/mail.c 1 gnats/queue-pr.c --- xstrdup --- 15 gnats/client.c 10 gnats/mail.c 9 gnats/field.c 8 gnats/cmds.c 8 gnats/database.c 8 gnats/file-pr.c 7 gnats/index.c 7 gnats/pr.c 4 gnats/edit.c 4 gnats/query.c 3 gnats/adm.c 1 gnats/gnatsd.c 1 gnats/internal.c 1 gnats/pr-edit.c 1 gnats/queue-pr.c The dependency of GNATS sources on libiberty functions (functions): 87 xstrdup 69 xmalloc 51 asprintf 25 xrealloc 10 basename 2 vasprintf The dependency of GNATS sources on libiberty functions (files): 24 gnats/query.c 21 gnats/field.c 21 gnats/pr.c 20 gnats/file-pr.c 20 gnats/index.c 19 gnats/client.c 15 gnats/queue-pr.c 13 gnats/mail.c 11 gnats/cmds.c 11 gnats/database.c 10 gnats/misc.c 9 gnats/edit.c 7 gnats/gnatsd.c 7 gnats/internal.c 6 gnats/pr-edit.c 6 gnats/query-pr.c 5 gnats/adm.c 4 gnats/gnats-pwconv.c 3 gnats/gen-closed-date.c 3 gnats/gen-index.c 3 gnats/pr-stat.c 2 gnats/gnats.h 2 gnats/pr-age.c 1 gnats/getclose.c 1 gnats/lists.c A number of libiberty functions in GNATS code: 244 Libiberty functions (used by GNATS / provided): 6 / 42 _______________________________________________ Help-gnats mailing list Help-gnats@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnats