From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-bw0-f49.google.com ([209.85.214.49]) by bombadil.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1Ozpcm-0001fZ-Sn for linux-mtd@lists.infradead.org; Sun, 26 Sep 2010 11:42:33 +0000 Received: by bwz19 with SMTP id 19so3858388bwz.36 for ; Sun, 26 Sep 2010 04:42:32 -0700 (PDT) Subject: Re: [PATCH 3/4 v2] mtd-utils: new strtoX helpers From: Artem Bityutskiy To: Mike Frysinger In-Reply-To: References: <1285293221-25028-3-git-send-email-vapier@gentoo.org> <1285394808-29795-1-git-send-email-vapier@gentoo.org> <1285412062.13050.5.camel@brekeke> <1285443076.13050.12.camel@brekeke> Content-Type: text/plain; charset="UTF-8" Date: Sun, 26 Sep 2010 14:42:29 +0300 Message-ID: <1285501349.13050.14.camel@brekeke> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Cc: linux-mtd@lists.infradead.org Reply-To: dedekind1@gmail.com List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Sat, 2010-09-25 at 15:37 -0400, Mike Frysinger wrote: > On Sat, Sep 25, 2010 at 15:31, Artem Bityutskiy wrote: > > On Sat, 2010-09-25 at 14:59 -0400, Mike Frysinger wrote: > >> On Sat, Sep 25, 2010 at 06:54, Artem Bityutskiy wrote: > >> > On Sat, 2010-09-25 at 02:06 -0400, Mike Frysinger wrote: > >> >> Simply usage of converting strings to numbers by adding some wrappers > >> >> around the standard strtoX functions. These helpers support both hex > >> >> and dec numbers transparently, and the caller need only provide a ptr > >> >> to an error integer if they want to be notified of problems. > >> > > >> > Why do you need a separate file for this? common.h does not suit this? > >> > >> the expansion of PROGRAM_NAME causes build errors for programs that do > >> not define it but include common.h > > > > May be > > > > #ifndef PROGRAM_NAME > > #define PROGRAM_NAME "undefined" > > #endif > > if we're going to go that route, i'd rather just go through the few > files not defining PROGRAM_NAME, add it, and then turn the comment in > common.h about people defining it into an error Sounds good as well. -- Best Regards, Artem Bityutskiy (Битюцкий Артём)