This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch/PE-COFF: Provide default suffix to NAME or LIBRARY names in .def files


On Thu, Feb 02, 2006 at 09:24:06AM +1300, Danny Smith wrote:
>----- Original Message ----- 
>From: "Nick Clifton" 
>Sent: Thursday, 2 February 2006 00:25
>> Hi Danny,
>
>
>> Do we really need to be concerned about speed here ?
>> I think that clarity of code is more important in this case, and so I 
>> would recommend a simpler approach, eg:
>> 
>>    if (strchr (image_name, '.') == 0)
>>      {
>>         const char * suffix = is_dll ? ".dll" : ".exe";
>> 
>>         def->name = xmalloc (strlen (image_name) + strlen (suffix) + 1);
>>         sprintf (def->name, "%s%s, image_name, suffix);
>>      }
>> 
>
>Thanks. Attached patch uses your suggestion above.

Looks good to me.  Go ahead and check it in.

cgf


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]