Here are the unified diff files as requested.

You are right about #pragma pack(). That's supported on pretty much all 
compilers. However, __attribute__ is not supported on all compilers and that's 
what was used in the original code. Our goal was to leave the gcc syntax the 
way it was in the original code. If you are ok with getting rid of the 
__attribute__((packed)), the code will be a lot more readable.

-Manish


-----Original Message-----
From: [email protected] [mailto:[email protected]]
Sent: Monday, January 12, 2009 3:01 PM
To: Manish Talreja
Cc: [email protected]
Subject: Re: [Bridge] Update to RSTP lib

If you want your patch to be understandable, create it as a contextual
diff with the -u option.

Do the pack pragmas really need to be conditional?  Pretty much every
compiler will do the right thing on encountering those.  (Using
__attribute__ as well, for compilers that support it, isn't a bad
thing but no need to avoid #pragma pack on gcc).

On Mon, Jan 12, 2009 at 1:22 PM, Manish Talreja <[email protected]> wrote:
> We have been using the RSTP implementation posted at this location:
>
> https://lists.linux-foundation.org/pipermail/bridge/2008-May/005859.html
>
>
>
> We have modified rstp.c and rstp.h to work with compilers other than gcc.
> Attached are two patch files that show our changes. Currently, we have
> tested this code with the Diab compiler (v 4.4a) and with IAR compiler (v
> 5.11).
>
>
>
> Manish
>
> _______________________________________________
> Bridge mailing list
> [email protected]
> https://lists.linux-foundation.org/mailman/listinfo/bridge
>

Attachment: rstp.h.unified.patch
Description: rstp.h.unified.patch

Attachment: rstp.c.unified.patch
Description: rstp.c.unified.patch

_______________________________________________
Bridge mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/bridge

Reply via email to