[Python-bugs-list] [ python-Bugs-636431 ] ./configure test socklen_t fails on *BSD

noreply@sourceforge.net noreply@sourceforge.net
Mon, 11 Nov 2002 06:59:17 -0800


Bugs item #636431, was opened at 2002-11-11 03:30
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=636431&group_id=5470

Category: Build
Group: Python 2.3
>Status: Closed
>Resolution: Fixed
Priority: 6
Submitted By: Jon Ribbens (jribbens)
Assigned to: Nobody/Anonymous (nobody)
Summary: ./configure test socklen_t fails on *BSD

Initial Comment:
Context: the patch applied updating CVS version 1.121 
of configure.in to version 1.122. This code is broken. 
Yes I know that was over 2 years ago! I am somewhat 
bemused it hasn't been noticed before.

The patch adds #include <sys/socket.h> to confdefs.h. 
This is broken because it means <sys/socket.h> 
becomes the first header to be #included during the test 
for socklen_t, and it is illegal on *BSD to include 
<sys/socket.h> before <sys/types.h>.

The upshot of this is that pyconfig.h ends up #defining 
socklen_t, which then means that when <sys.types.h> 
is #included while building Python all sorts of compiler 
diagnostics are generated, and god-only-knows what the 
effect on the resulting binary is, and obviously the 
correct definition for socklen_t is not being used.

----------------------------------------------------------------------

>Comment By: Martin v. L÷wis (loewis)
Date: 2002-11-11 15:59

Message:
Logged In: YES 
user_id=21627

Committed as

configure 1.357
configure.in 1.368
pyconfig.h.in 1.60


----------------------------------------------------------------------

Comment By: Jon Ribbens (jribbens)
Date: 2002-11-11 15:45

Message:
Logged In: YES 
user_id=76089

The patch is slightly broken, it is including sys/socket.h twice 
instead of sys/types.h. With that typo fixed it works fine and 
solves the problem.

Many thanks.

----------------------------------------------------------------------

Comment By: Martin v. L÷wis (loewis)
Date: 2002-11-11 14:50

Message:
Logged In: YES 
user_id=21627

Can you please try the attached patch?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=636431&group_id=5470