buglwIP - A Lightweight TCP/IP stack - Bugs: bug #20162, MEM_ALIGN macro name collision

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #20162: MEM_ALIGN macro name collision

Submitter:  Matthias Weisser <mod42>
Submitted:  Wed 13 Jun 2007 06:23:52 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  Change Request Status:  Fixed
Privacy:  Public Assigned to:  fbernon
Open/Closed:  Closed Planned Release:  None
lwIP version:  None

Wed 13 Jun 2007 05:18:35 PM UTC, comment #5: 

Ok, check in with just LWIP_MEM_ALIGN and LWIP_MEM_ALIGN_SIZE (so, no port breakage since MEM_SIZE and MEM_ALIGNMENT are not changed).

Frédéric Bernon <fbernon>
Group Member
Wed 13 Jun 2007 12:31:50 PM UTC, comment #4: 

Ok, so, if no other remark, I will change in the afternoon :

MEM_ALIGN     -> LWIP_MEM_ALIGN
MEM_ALIGNMENT -> LWIP_MEM_ALIGNMENT
MEM_ALIGN_SIZE-> LWIP_MEM_ALIGN_SIZE


Frédéric Bernon <fbernon>
Group Member
Wed 13 Jun 2007 10:41:38 AM UTC, comment #3: 

OK for me to change to LWIP_MEM_ALIGN. Maybe we should also rename MEM_ALIGN_SIZE then?

Simon Goldschmidt <goldsimon>
Group administrator
Wed 13 Jun 2007 08:48:25 AM UTC, comment #2: 

I forget to change the #ifndef MEM_ALIGN so if you check in please also change this.

My OS defines MEM_ALIGN as the alignment of the result of malloc. So, for the processor I use lwIP on it is only

#define MEM_ALIGN 4


Matthias Weisser <mod42>
Wed 13 Jun 2007 07:30:23 AM UTC, comment #1: 

I didn't look in details, but replace all MEM_ALIGN macros by LWIP_MEM_ALIGN seems a good idea. Perhaps it would be good in the same idea to change MEM_ALIGNMENT in LWIP_MEM_ALIGNMENT (even if it doesn't a port breakage, this is not the first from 1.2.0).

Note on your patch file: in mem.h, you forgot to upgrade the ...

#ifndef MEM_ALIGN

by

#ifndef LWIP_MEM_ALIGN

For information, your OS's MEM_ALIGN doesn't have the same use and parameter than lwIP one? Because, as you see in mem.h, if you have already defined MEM_ALIGN, it will "replace" lwIP's one...

If no objects, I will check in this afternoon...


Frédéric Bernon <fbernon>
Group Member
Wed 13 Jun 2007 06:23:52 AM UTC, original submission:  

My OS defines a macro named MEM_ALIGN which collides with the lwIP MEM_ALIGN macro. My proposal would be to rename the lwIP MEM_ALIGN macro to LWIP_MEM_ALIGN. I attached a patch which does this against the latest CVS revision.

Matthias

Matthias Weisser <mod42>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #13036:  lwIP_MEM_ALIGN.patch added by mod42 (4KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by goldsimon (Posted a comment)
  • -email is unavailable- added by fbernon (Posted a comment)
  • -email is unavailable- added by mod42 (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-06-13 fbernon StatusNone Fixed
        Assigned toNone fbernon
        Open/ClosedOpen Closed
    2007-06-13 mod42 Attached File- Added lwIP_MEM_ALIGN.patch, #13036

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code