[Python-bugs-list] [ python-Bugs-814613 ] socketmodule.c fails build, INET_ADDRSTRLEN not defined

SourceForge.net noreply at sourceforge.net
Wed Oct 1 11:51:17 EDT 2003


Bugs item #814613, was opened at 2003-09-30 04:22
Message generated for change (Comment added) made by anthonybaxter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=814613&group_id=5470

Category: Build
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Randy Davis (randydavis1)
Assigned to: Nobody/Anonymous (nobody)
Summary: socketmodule.c fails build, INET_ADDRSTRLEN not defined

Initial Comment:
Modules/socketmodule.c fails to built on IRIX 6.3 gcc 

3.2.2 due to INET_ADDRSTRLEN not being defined.  

Adding an additional "#define INET_ADDRSTRLEN 16" 

outside of the #ifdef's fixes it (so the #ifdefs would 

seem to not be taking into account IRIX 6.3).



Here's the error:



building '_socket' extension

gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -

shared -fno-strict-aliasing -I. -

I/usr2/admin/src/dev/python-2.3.1/./Include -

I/usr/local/include -I/usr2/admin/src/dev/python-

2.3.1/Include -I/usr2/admin/src/dev/python-2.3.1 -

c /usr2/admin/src/dev/pyth

on-2.3.1/Modules/socketmodule.c -o build/temp.irix-6.3-

2.3/socketmodule.o

/usr2/admin/src/dev/python-

2.3.1/Modules/socketmodule.c: In function 

`socket_gethostname':

/usr2/admin/src/dev/python-

2.3.1/Modules/socketmodule.c:2319: warning: implicit 

declaration of function `gethostname'

/usr2/admin/src/dev/python-

2.3.1/Modules/socketmodule.c: In function 

`socket_inet_ntop':

/usr2/admin/src/dev/python-

2.3.1/Modules/socketmodule.c:3016: 

`INET_ADDRSTRLEN' undeclared (first use in this 

function)

/usr2/admin/src/dev/python-

2.3.1/Modules/socketmodule.c:3016: (Each undeclared 

identifier is reported only once

/usr2/admin/src/dev/python-

2.3.1/Modules/socketmodule.c:3016: for each function it 

appears in.)

/usr2/admin/src/dev/python-

2.3.1/Modules/socketmodule.c:3016: warning: unused 

variable `ip'









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

>Comment By: Anthony Baxter (anthonybaxter)
Date: 2003-10-02 01:51

Message:
Logged In: YES 
user_id=29957

With my brain screwed on correctly, I can see that my

previous comments weren't correct. I'm attaching a (brutal)

patch that "fixes" the problem, but before I apply it, I'd

like to know if the problem is just with gcc on Irix, or

does it also break with the SGI compiler? This looks like a

gcc bug, maybe...

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

Comment By: Anthony Baxter (anthonybaxter)
Date: 2003-10-01 19:03

Message:
Logged In: YES 
user_id=29957

Hm. It looks we define INET_ADDRSTRLEN only if ENABLE_IPV6 is

false. Looking on my Linux machine, if IPV6 is enabled,

INET_ADDRSTRLEN is defined in netinet/in.h - can you see if

it's 

available in any Irix header files? Alternately, try rerunning 

configure with --disable-ipv6.



We could probably put an 

#ifndef INET_ADDRSTRLEN 

#define INET_ADDRSTRLEN 16

#endif 

in socketmodule.c, but this seems to me like the problem might

be in the SGI headers...

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

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



More information about the Python-bugs-list mailing list