buglwIP - A Lightweight TCP/IP stack - Bugs: bug #34057, socklen_t should be a typedef.

 
 

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

bug #34057: socklen_t should be a typedef.

Submitter:  Brian McFarland <bmcfarland>
Submitted:  Thu 18 Aug 2011 02:06:35 PM UTC
   
 
Category:  sockets/netconn Severity:  3 - Normal
Item Group:  Change Request Status:  Fixed
Privacy:  Public Assigned to:  goldsimon
Open/Closed:  Closed Planned Release:  None
lwIP version:  1.4.0

Wed 24 Aug 2011 06:26:11 PM UTC, comment #1: 

Why not...

Changed to a typedef (If your port already typedef's socklen_t, define SOCKLEN_T_DEFINED to prevent sockets.h from redefining it.)

Simon Goldschmidt <goldsimon>
Group administrator
Thu 18 Aug 2011 02:06:35 PM UTC, original submission:  

It seems like "socklen_t", which is #defined in sockets.h should be a typedef, not a #define.  I suggest this because a true typedef causes compilers to produce better error messages. 

For example, I'm working on a port of thttpd and it was producing an error "conflicting types for 'u32_t'".  The cause was that thttpd was trying to redefine socklen_t, and so the real fix was in thttpd, not lwip.  However, using a typedef produces the error: "conflicting types for 'socklen_t'", which makes the problem more obvious. 

I'm using v1.3.2 out of the FreeRTOS source tree, but v1.4.0 still contains the same #define.  Admittedly, I have not checked in CVS.

Brian McFarland <bmcfarland>

 

(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 bmcfarland (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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-08-24 goldsimon StatusNone Fixed
        Assigned toNone goldsimon
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code