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.

Submitted by:  Brian McFarland <bmcfarland>
Submitted on:  Thu 18 Aug 2011 02:06:35 PM UTC  
 
Category: sockets/netconnSeverity: 3 - Normal
Item Group: Change RequestStatus: Fixed
Privacy: PublicAssigned to: Simon Goldschmidt <goldsimon>
Open/Closed: ClosedPlanned 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>
Project AdministratorIn charge of this item.
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>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by goldsimon (Posted a comment)
  • -unavailable- added by bmcfarland (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 24 Aug 2011 06:26:11 PM UTCgoldsimonStatusNone=>Fixed
      Assigned toNone=>goldsimon
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1