[PATCH] Rename makedoc's dup to prevent collisions
Jeff Johnston
jjohnstn@redhat.com
Tue Oct 2 19:11:00 GMT 2012
Patch checked in. I did it manually as something went wrong when I
saved it via my e-mail reader.
-- Jeff J.
On 09/23/2012 05:24 PM, Michael Hope wrote:
> On 22 September 2012 08:22, Craig Howland <howland@lgsinnovations.com> wrote:
>> Michael:
>>
>> I think that this is not enough. Don't you also need to change the "dup" in
>> doc.str?
>
> It's good as is. The mini language used in doc.str is implemented in
> makedoc.c. The language has a 'dup' intrinsic which is mapped to the
> C function 'dup_' on line 1413 by:
> add_intrinsic("dup", dup_ );
>
> so the function name change doesn't affect the keyword.
>
> Tested by building lib{c,m}/lib{c,m}.info with and without the patch.
> The generated files are identical.
>
> -- Michael
>
>> On 09/20/2012 10:47 PM, Michael Hope wrote:
>>>
>>> Rename the dup word in makedoc to prevent it colliding with dup(2). This
>>> shows
>>> up when building for the Linux Standard Base 3.0 as the LSB stdio.h
>>> #includes unistd.h.
>>>
>>> OK?
>>>
>>> -- Michael
>>>
>>> newlib/
>>>
>>> 2012-09-21 Michael Hope <michael.hope@linaro.org>
>>>
>>> * doc/makedoc.c (dup_): Rename to avoid colliding with dup(2).
>>>
>>> diff --git a/newlib/doc/makedoc.c b/newlib/doc/makedoc.c
>>> index 0bbffb6..7d38a5d 100644
>>> --- a/newlib/doc/makedoc.c
>>> +++ b/newlib/doc/makedoc.c
>>> @@ -1012,7 +1012,7 @@ WORD(swap)
>>>
>>> }
>>>
>>> -WORD(dup)
>>> +WORD(dup_)
>>> {
>>> tos++;
>>> init_string(tos);
>>> @@ -1410,7 +1410,7 @@ char *av[])
>>> add_intrinsic("skip_past_newline", skip_past_newline );
>>> add_intrinsic("catstr", icatstr );
>>> add_intrinsic("copy_past_newline", icopy_past_newline );
>>> - add_intrinsic("dup", dup );
>>> + add_intrinsic("dup", dup_ );
>>> add_intrinsic("remchar", remchar );
>>> add_intrinsic("get_stuff_in_command", get_stuff_in_command );
>>> add_intrinsic("get_stuff_in_angle", get_stuff_in_angle );
>>
>>
More information about the Newlib
mailing list