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 1OzaSw-0005ug-Da for linux-mtd@lists.infradead.org; Sat, 25 Sep 2010 19:31:22 +0000 Received: by bwz19 with SMTP id 19so3588600bwz.36 for ; Sat, 25 Sep 2010 12:31:20 -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> Content-Type: text/plain; charset="UTF-8" Date: Sat, 25 Sep 2010 22:31:16 +0300 Message-ID: <1285443076.13050.12.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 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 > -mike May be #ifndef PROGRAM_NAME #define PROGRAM_NAME "undefined" #endif ? -- Best Regards, Artem Bityutskiy (Битюцкий Артём)