lwip-members
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-members] Change wanted in mem.h


From: Robert
Subject: [lwip-members] Change wanted in mem.h
Date: Wed, 2 Jul 2003 11:28:00 -0400 (EDT)

I propose that mem.h be recoded as shown below, wrapping the macros in
#ifndef and #endif statements.


#ifndef MEM_ALIGN_SIZE
#define MEM_ALIGN_SIZE(size) (((size) + MEM_ALIGNMENT - 1) & ~(MEM_ALIGNMENT-1))
#endif

#ifndef MEM_ALIGN
#define MEM_ALIGN(addr) ((void *)(((mem_ptr_t)(addr) + MEM_ALIGNMENT - 1) & 
~(mem_ptr_t)(MEM_ALIGNMENT-1)))
#endif


The purpose of this change is to allow someone to define their own macros
for MEM_ALIGN and MEM_ALIGN_SIZE in cc.h if they wish to.  (Actually in my
case, I do need to since my compiler cannot deal with the macros as they
currently exist, hence my modivation for proposing this change.)  Does
anyone have a problem with making this change?

-- 
Best Regards,
Robert 







reply via email to

[Prev in Thread] Current Thread [Next in Thread]