[Python-Dev] More socket questions

Skip Montanaro skip@pobox.com
Thu, 10 Apr 2003 16:28:55 -0500


    Martin> This is the tricky part of any such change: Nobody knows, and
    Martin> you have to test it on a wide variety of platforms before it is
    Martin> acceptable. That *atleast* includes Windows, OS X, and one or
    Martin> two other flavours of Unix (Linux libc6 typically being one of
    Martin> them).

I can check Mac OS X off your list.  Here's the start of the inet_aton man
page: 

    INET(3)                 System Library Functions Manual                INET(3)

    NAME
         inet_aton, inet_addr, inet_network, inet_ntoa, inet_ntop, inet_pton,
         inet_makeaddr, inet_lnaof, inet_netof - Internet address manipulation
         routines
    ...

And here's the check from distutils:

    >>> import distutils.ccompiler
    >>> cc = distutils.ccompiler.new_compiler()
    >>> cc.has_function("inet_aton")
    True
    >>> cc.has_function("blecherous")
    ld: Undefined symbols:
    _blecherous
    False

(Note that has_function() isn't in cvs yet.)

Skip