[Python-Dev] socketmodule build failures on Un*xs that don't HAVE_GETADDRINFO

Michael Hudson mwh at python.net
Wed Aug 25 12:44:48 CEST 2004


Trent Mick <trentm at ActiveState.com> writes:

>     http://cvs.sourceforge.net/viewcvs.py/python/python/dist/src/Modules/socketmodule.c?r1=1.288&r2=1.289
>     Wed May 26 17:06:31 2004 UTC (2 months, 4 weeks ago) by mwh 
>     > Band-aid type fix for
>     > 
>     > [ 728330 ] Don't define _SGAPI on IRIX
>     > 
>     > The Right Thing would be nice, for now this'll do.  At least it
>     > isn't going to break anything *other* than IRIX...
>
> Relevant bug:
> https://sourceforge.net/tracker/?func=detail&atid=105470&aid=728330&group_id=5470
>
> Subseqent checkins have gone in to fix the lack of addrinfo.h import on
> some platforms:
>
>     http://cvs.sourceforge.net/viewcvs.py/python/python/dist/src/Modules/socketmodule.c?r1=1.292&r2=1.293
>     http://cvs.sourceforge.net/viewcvs.py/python/python/dist/src/Modules/socketmodule.c?r1=1.297&r2=1.298
>
> So the question: was that original change removing the 
>     #include "addrinfo.h"
> an accident? I.e. should it have been something like this instead?
>
>     #if defined(__sgi)
>     # if _COMPILER_VERSION>700 \
>       && !defined(_SS_ALIGNSIZE) /* defined in sys/socket.h            */
>                                  /* by some newer versions of IRIX     */
>                                  /* (e.g. not by 6.5.10 but by 6.5.21) */
>     #  include "addrinfo.h"
>     # endif
>     #else
>     # include "addrinfo.h"
>     #endif

Well, it certainly seems I goofed with that checkin: as the message
implies, I thought the code I was touching only affected Irix.  I seem
to have mentally entirely paged out the details, though.

Sorry for all the pain.

This hilights what I said in the #ifdeffery thread, though: it's
difficult to check in code that affects systems you have no access to.
Thanks to Trent for taking the time to actually try to work out what's
going on!

Cheers,
mwh

-- 
  About the use of language: it is impossible to sharpen a
  pencil with a blunt axe.  It is equally vain to try to do
  it with ten blunt axes instead.
      -- E.W.Dijkstra, 18th June 1975. Perl did not exist at the time.


More information about the Python-Dev mailing list