From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14274 invoked by alias); 31 Mar 2008 16:04:38 -0000 Received: (qmail 14264 invoked by uid 22791); 31 Mar 2008 16:04:37 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 31 Mar 2008 16:04:02 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 29CD098119; Mon, 31 Mar 2008 16:04:00 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 1464E9802B; Mon, 31 Mar 2008 16:04:00 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1JgMUJ-00017X-BS; Mon, 31 Mar 2008 12:03:59 -0400 Date: Mon, 31 Mar 2008 16:10:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sourceware.org Cc: Doug Evans Subject: [RFC] gnulib (was: Re: [RFA] lmemmem.patch) Message-ID: <20080331160359.GA4003@caradoc.them.org> Mail-Followup-To: gdb-patches@sourceware.org, Doug Evans References: <200803241758.m2OHwDid017265@greed.delorie.com> <20080324203738.GC29991@ins.uni-bonn.de> <20080324205119.GE29991@ins.uni-bonn.de> <20080324212354.GA16323@caradoc.them.org> <20080330213540.GA2856@caradoc.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080330213540.GA2856@caradoc.them.org> User-Agent: Mutt/1.5.17 (2007-12-11) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-03/txt/msg00505.txt.bz2 On Sun, Mar 30, 2008 at 05:35:40PM -0400, Daniel Jacobowitz wrote: > Here you go. How does this look? It frees us to rely on gnulib's > stdint.h, string.h, and other useful modules should we want them. I > didn't make gdbserver completely use gnulib, only build memmem; I > tested this on Linux (memmem present) and Windows (memmem missing). > GDB will use the included memmem even on Linux, since glibc's is known > to be slower. A word of explanation is probably called for, since there wasn't much context. GDB runs on many platforms. This calls for a certain amount of portability goop to overcome their different limitations. Right now, this is handled mostly in libiberty. One exception is gdb_stdint.h, which comes from a macro in config. A recent development on the portability scene is gnulib: http://www.gnu.org/software/gnulib/ There's an explanation of it on that page. In summary, it's a collection of source files and a script that can automatically copy the necessary ones into your project or update existing copies (gnulib-tool). It's much larger and more active than libiberty and it has both portability and general utility routines, e.g. checksum algorithms and Unicode support. Two other things I would like to use it for are stdint.h and automatic line wrapping in error messages. -- Daniel Jacobowitz CodeSourcery