[PATCH 3/4 v2] mtd-utils: new strtoX helpers
Mike Frysinger
vapier at gentoo.org
Sat Sep 25 15:37:35 EDT 2010
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
-mike
More information about the linux-mtd
mailing list