buglwIP - A Lightweight TCP/IP stack - Bugs: bug #52899, Compile problem

 
 

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

bug #52899: Compile problem

Submitter:  Carsten Frank <carstenfrank>
Submitted:  Mon 15 Jan 2018 01:32:40 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  Faulty Behaviour Status:  Fixed
Privacy:  Public Assigned to:  goldsimon
Open/Closed:  Closed Planned Release:  2.1.0
lwIP version:  2.0.3

Tue 16 Jan 2018 07:37:46 PM UTC, comment #1: 

Right. The downside is that with the old style define, some (16 bit?) compilers complain about shifting "major" up 24 bytes (larger shift than the datatype supports). I don't know if that's a problem for the preprocessor.

However, let's still fix this. Unfortunately, the 2.0.x versions are broken here so need to be fixed differently...

Simon Goldschmidt <goldsimon>
Group administrator
Mon 15 Jan 2018 01:32:40 PM UTC, original submission:  

Code like:
   #if LWIP_VERSION >= 0x01050000
       bla bla bla
   #endif

Does not compile with 2.0.x.

Version 1.4 init.h (Works):
#define LWIP_VERSION   (LWIP_VERSION_MAJOR << 24   | LWIP_VERSION_MINOR << 16 | \
                        LWIP_VERSION_REVISION << 8 | LWIP_VERSION_RC)

Version 2.0.x init.h (compile problem):
/** Provides the version of the stack */
#define LWIP_VERSION   (((u32_t)LWIP_VERSION_MAJOR) << 24   | ((u32_t)LWIP_VERSION_MINOR) << 16 | \
                        ((u32_t)LWIP_VERSION_REVISION) << 8 | ((u32_t)LWIP_VERSION_RC))

Does not work because preprocessor does not know u32_t. Generally the preprocessor can't work with type casts.




Carsten Frank <carstenfrank>

 

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

No files currently attached

 

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 carstenfrank (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
    2018-01-16 goldsimon StatusNone Fixed
        Assigned toNone goldsimon
        Open/ClosedOpen Closed
        Planned ReleaseNone 2.1.0

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code