summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2001-08-09 12:48:17 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2001-08-09 12:48:17 (GMT)
commitdbdcb0fc3af0a6712e7dca764a1c9c0878582433 (patch)
tree8d8f3a35118404e3f95394a45d450fee58a17e80
parent4414933f6205e598496a270cc5582e942bceada7 (diff)
downloadcpython-dbdcb0fc3af0a6712e7dca764a1c9c0878582433.zip
cpython-dbdcb0fc3af0a6712e7dca764a1c9c0878582433.tar.gz
cpython-dbdcb0fc3af0a6712e7dca764a1c9c0878582433.tar.bz2
Regenerate for glibc 2.2.3.
-rw-r--r--Lib/plat-linux2/DLFCN.py83
-rw-r--r--Lib/plat-linux2/IN.py855
-rw-r--r--Lib/plat-linux2/TYPES.py171
-rwxr-xr-xLib/plat-linux2/regen2
4 files changed, 769 insertions, 342 deletions
diff --git a/Lib/plat-linux2/DLFCN.py b/Lib/plat-linux2/DLFCN.py
new file mode 100644
index 0000000..16ec538
--- /dev/null
+++ b/Lib/plat-linux2/DLFCN.py
@@ -0,0 +1,83 @@
+# Generated by h2py from /usr/include/dlfcn.h
+_DLFCN_H = 1
+
+# Included from features.h
+_FEATURES_H = 1
+__USE_ANSI = 1
+__FAVOR_BSD = 1
+_ISOC99_SOURCE = 1
+_POSIX_SOURCE = 1
+_POSIX_C_SOURCE = 199506L
+_XOPEN_SOURCE = 600
+_XOPEN_SOURCE_EXTENDED = 1
+_LARGEFILE64_SOURCE = 1
+_BSD_SOURCE = 1
+_SVID_SOURCE = 1
+_BSD_SOURCE = 1
+_SVID_SOURCE = 1
+__USE_ISOC99 = 1
+_POSIX_SOURCE = 1
+_POSIX_C_SOURCE = 2
+_POSIX_C_SOURCE = 199506L
+__USE_POSIX = 1
+__USE_POSIX2 = 1
+__USE_POSIX199309 = 1
+__USE_POSIX199506 = 1
+__USE_XOPEN = 1
+__USE_XOPEN_EXTENDED = 1
+__USE_UNIX98 = 1
+_LARGEFILE_SOURCE = 1
+__USE_XOPEN2K = 1
+__USE_ISOC99 = 1
+__USE_XOPEN_EXTENDED = 1
+__USE_LARGEFILE = 1
+__USE_LARGEFILE64 = 1
+__USE_FILE_OFFSET64 = 1
+__USE_MISC = 1
+__USE_BSD = 1
+__USE_SVID = 1
+__USE_GNU = 1
+__USE_REENTRANT = 1
+__STDC_IEC_559__ = 1
+__STDC_IEC_559_COMPLEX__ = 1
+__STDC_ISO_10646__ = 200009L
+__GNU_LIBRARY__ = 6
+__GLIBC__ = 2
+__GLIBC_MINOR__ = 2
+
+# Included from sys/cdefs.h
+_SYS_CDEFS_H = 1
+def __PMT(args): return args
+
+def __P(args): return args
+
+def __PMT(args): return args
+
+def __STRING(x): return #x
+
+__flexarr = []
+__flexarr = [0]
+__flexarr = []
+__flexarr = [1]
+def __ASMNAME(cname): return __ASMNAME2 (__USER_LABEL_PREFIX__, cname)
+
+def __attribute__(xyz): return
+
+def __attribute_format_arg__(x): return __attribute__ ((__format_arg__ (x)))
+
+def __attribute_format_arg__(x): return
+
+__USE_LARGEFILE = 1
+__USE_LARGEFILE64 = 1
+__USE_EXTERN_INLINES = 1
+
+# Included from gnu/stubs.h
+
+# Included from bits/dlfcn.h
+RTLD_LAZY = 0x00001
+RTLD_NOW = 0x00002
+RTLD_BINDING_MASK = 0x3
+RTLD_NOLOAD = 0x00004
+RTLD_GLOBAL = 0x00100
+RTLD_LOCAL = 0
+RTLD_NODELETE = 0x01000
diff --git a/Lib/plat-linux2/IN.py b/Lib/plat-linux2/IN.py
index 42c041f..d97b132 100644
--- a/Lib/plat-linux2/IN.py
+++ b/Lib/plat-linux2/IN.py
@@ -3,37 +3,423 @@ _NETINET_IN_H = 1
# Included from features.h
_FEATURES_H = 1
-_GNU_SOURCE = 1
__USE_ANSI = 1
__FAVOR_BSD = 1
+_ISOC99_SOURCE = 1
+_POSIX_SOURCE = 1
+_POSIX_C_SOURCE = 199506L
+_XOPEN_SOURCE = 600
+_XOPEN_SOURCE_EXTENDED = 1
+_LARGEFILE64_SOURCE = 1
+_BSD_SOURCE = 1
+_SVID_SOURCE = 1
_BSD_SOURCE = 1
_SVID_SOURCE = 1
+__USE_ISOC99 = 1
_POSIX_SOURCE = 1
_POSIX_C_SOURCE = 2
+_POSIX_C_SOURCE = 199506L
__USE_POSIX = 1
__USE_POSIX2 = 1
+__USE_POSIX199309 = 1
+__USE_POSIX199506 = 1
+__USE_XOPEN = 1
+__USE_XOPEN_EXTENDED = 1
+__USE_UNIX98 = 1
+_LARGEFILE_SOURCE = 1
+__USE_XOPEN2K = 1
+__USE_ISOC99 = 1
+__USE_XOPEN_EXTENDED = 1
+__USE_LARGEFILE = 1
+__USE_LARGEFILE64 = 1
+__USE_FILE_OFFSET64 = 1
__USE_MISC = 1
__USE_BSD = 1
__USE_SVID = 1
__USE_GNU = 1
-__GNU_LIBRARY__ = 1
+__USE_REENTRANT = 1
+__STDC_IEC_559__ = 1
+__STDC_IEC_559_COMPLEX__ = 1
+__STDC_ISO_10646__ = 200009L
+__GNU_LIBRARY__ = 6
+__GLIBC__ = 2
+__GLIBC_MINOR__ = 2
# Included from sys/cdefs.h
_SYS_CDEFS_H = 1
-def __P(args): return args
+def __PMT(args): return args
def __P(args): return args
-def __P(args): return ()
+def __PMT(args): return args
def __STRING(x): return #x
-def __STRING(x): return "x"
+__flexarr = []
+__flexarr = [0]
+__flexarr = []
+__flexarr = [1]
+def __ASMNAME(cname): return __ASMNAME2 (__USER_LABEL_PREFIX__, cname)
+
+def __attribute__(xyz): return
+
+def __attribute_format_arg__(x): return __attribute__ ((__format_arg__ (x)))
+
+def __attribute_format_arg__(x): return
+
+__USE_LARGEFILE = 1
+__USE_LARGEFILE64 = 1
+__USE_EXTERN_INLINES = 1
+
+# Included from gnu/stubs.h
+
+# Included from stdint.h
+_STDINT_H = 1
+
+# Included from bits/wchar.h
+_BITS_WCHAR_H = 1
+__WCHAR_MIN = (-2147483647l - 1l)
+__WCHAR_MAX = (2147483647l)
+
+# Included from bits/wordsize.h
+__WORDSIZE = 32
+def __INT64_C(c): return c ## L
+
+def __UINT64_C(c): return c ## UL
+
+def __INT64_C(c): return c ## LL
+
+def __UINT64_C(c): return c ## ULL
+
+INT8_MIN = (-128)
+INT16_MIN = (-32767-1)
+INT32_MIN = (-2147483647-1)
+INT8_MAX = (127)
+INT16_MAX = (32767)
+INT32_MAX = (2147483647)
+UINT8_MAX = (255)
+UINT16_MAX = (65535)
+INT_LEAST8_MIN = (-128)
+INT_LEAST16_MIN = (-32767-1)
+INT_LEAST32_MIN = (-2147483647-1)
+INT_LEAST8_MAX = (127)
+INT_LEAST16_MAX = (32767)
+INT_LEAST32_MAX = (2147483647)
+UINT_LEAST8_MAX = (255)
+UINT_LEAST16_MAX = (65535)
+INT_FAST8_MIN = (-128)
+INT_FAST16_MIN = (-9223372036854775807L-1)
+INT_FAST32_MIN = (-9223372036854775807L-1)
+INT_FAST16_MIN = (-2147483647-1)
+INT_FAST32_MIN = (-2147483647-1)
+INT_FAST8_MAX = (127)
+INT_FAST16_MAX = (9223372036854775807L)
+INT_FAST32_MAX = (9223372036854775807L)
+INT_FAST16_MAX = (2147483647)
+INT_FAST32_MAX = (2147483647)
+UINT_FAST8_MAX = (255)
+INTPTR_MIN = (-9223372036854775807L-1)
+INTPTR_MAX = (9223372036854775807L)
+INTPTR_MIN = (-2147483647-1)
+INTPTR_MAX = (2147483647)
+PTRDIFF_MIN = (-9223372036854775807L-1)
+PTRDIFF_MAX = (9223372036854775807L)
+PTRDIFF_MIN = (-2147483647-1)
+PTRDIFF_MAX = (2147483647)
+SIG_ATOMIC_MIN = (-2147483647-1)
+SIG_ATOMIC_MAX = (2147483647)
+WCHAR_MIN = __WCHAR_MIN
+WCHAR_MAX = __WCHAR_MAX
+def INT8_C(c): return c
+
+def INT16_C(c): return c
+
+def INT32_C(c): return c
+
+def INT64_C(c): return c ## L
+
+def INT64_C(c): return c ## LL
+
+def UINT8_C(c): return c ## U
+
+def UINT16_C(c): return c ## U
+
+def UINT32_C(c): return c ## U
+def UINT64_C(c): return c ## UL
-# Included from sys/socket.h
+def UINT64_C(c): return c ## ULL
+
+def INTMAX_C(c): return c ## L
+
+def UINTMAX_C(c): return c ## UL
+
+def INTMAX_C(c): return c ## LL
+
+def UINTMAX_C(c): return c ## ULL
+
+
+# Included from bits/types.h
+_BITS_TYPES_H = 1
+__FD_SETSIZE = 1024
+
+# Included from bits/pthreadtypes.h
+_BITS_PTHREADTYPES_H = 1
+
+# Included from bits/sched.h
+SCHED_OTHER = 0
+SCHED_FIFO = 1
+SCHED_RR = 2
+CSIGNAL = 0x000000ff
+CLONE_VM = 0x00000100
+CLONE_FS = 0x00000200
+CLONE_FILES = 0x00000400
+CLONE_SIGHAND = 0x00000800
+CLONE_PID = 0x00001000
+CLONE_PTRACE = 0x00002000
+CLONE_VFORK = 0x00004000
+__defined_schedparam = 1
+def IN_CLASSA(a): return ((((in_addr_t)(a)) & 0x80000000) == 0)
+
+IN_CLASSA_NET = 0xff000000
+IN_CLASSA_NSHIFT = 24
+IN_CLASSA_HOST = (0xffffffff & ~IN_CLASSA_NET)
+IN_CLASSA_MAX = 128
+def IN_CLASSB(a): return ((((in_addr_t)(a)) & 0xc0000000) == 0x80000000)
+
+IN_CLASSB_NET = 0xffff0000
+IN_CLASSB_NSHIFT = 16
+IN_CLASSB_HOST = (0xffffffff & ~IN_CLASSB_NET)
+IN_CLASSB_MAX = 65536
+def IN_CLASSC(a): return ((((in_addr_t)(a)) & 0xe0000000) == 0xc0000000)
+
+IN_CLASSC_NET = 0xffffff00
+IN_CLASSC_NSHIFT = 8
+IN_CLASSC_HOST = (0xffffffff & ~IN_CLASSC_NET)
+def IN_CLASSD(a): return ((((in_addr_t)(a)) & 0xf0000000) == 0xe0000000)
+
+def IN_MULTICAST(a): return IN_CLASSD(a)
+
+def IN_EXPERIMENTAL(a): return ((((in_addr_t)(a)) & 0xe0000000) == 0xe0000000)
+
+def IN_BADCLASS(a): return ((((in_addr_t)(a)) & 0xf0000000) == 0xf0000000)
+
+IN_LOOPBACKNET = 127
+INET_ADDRSTRLEN = 16
+INET6_ADDRSTRLEN = 46
+
+# Included from bits/socket.h
+
+# Included from limits.h
+_LIBC_LIMITS_H_ = 1
+MB_LEN_MAX = 16
+_LIMITS_H = 1
+CHAR_BIT = 8
+SCHAR_MIN = (-128)
+SCHAR_MAX = 127
+UCHAR_MAX = 255
+CHAR_MIN = 0
+CHAR_MAX = UCHAR_MAX
+CHAR_MIN = SCHAR_MIN
+CHAR_MAX = SCHAR_MAX
+SHRT_MIN = (-32768)
+SHRT_MAX = 32767
+USHRT_MAX = 65535
+INT_MAX = 2147483647
+LONG_MAX = 9223372036854775807L
+LONG_MAX = 2147483647L
+LONG_MIN = (-LONG_MAX - 1L)
+
+# Included from bits/posix1_lim.h
+_BITS_POSIX1_LIM_H = 1
+_POSIX_AIO_LISTIO_MAX = 2
+_POSIX_AIO_MAX = 1
+_POSIX_ARG_MAX = 4096
+_POSIX_CHILD_MAX = 6
+_POSIX_DELAYTIMER_MAX = 32
+_POSIX_LINK_MAX = 8
+_POSIX_MAX_CANON = 255
+_POSIX_MAX_INPUT = 255
+_POSIX_MQ_OPEN_MAX = 8
+_POSIX_MQ_PRIO_MAX = 32
+_POSIX_NGROUPS_MAX = 0
+_POSIX_OPEN_MAX = 16
+_POSIX_FD_SETSIZE = _POSIX_OPEN_MAX
+_POSIX_NAME_MAX = 14
+_POSIX_PATH_MAX = 256
+_POSIX_PIPE_BUF = 512
+_POSIX_RTSIG_MAX = 8
+_POSIX_SEM_NSEMS_MAX = 256
+_POSIX_SEM_VALUE_MAX = 32767
+_POSIX_SIGQUEUE_MAX = 32
+_POSIX_SSIZE_MAX = 32767
+_POSIX_STREAM_MAX = 8
+_POSIX_TZNAME_MAX = 6
+_POSIX_QLIMIT = 1
+_POSIX_HIWAT = _POSIX_PIPE_BUF
+_POSIX_UIO_MAXIOV = 16
+_POSIX_TTY_NAME_MAX = 9
+_POSIX_TIMER_MAX = 32
+_POSIX_LOGIN_NAME_MAX = 9
+_POSIX_CLOCKRES_MIN = 20000000
+
+# Included from bits/local_lim.h
+
+# Included from linux/limits.h
+NR_OPEN = 1024
+NGROUPS_MAX = 32
+ARG_MAX = 131072
+CHILD_MAX = 999
+OPEN_MAX = 256
+LINK_MAX = 127
+MAX_CANON = 255
+MAX_INPUT = 255
+NAME_MAX = 255
+PATH_MAX = 4095
+PIPE_BUF = 4096
+RTSIG_MAX = 32
+_POSIX_THREAD_KEYS_MAX = 128
+PTHREAD_KEYS_MAX = 1024
+_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 4
+PTHREAD_DESTRUCTOR_ITERATIONS = _POSIX_THREAD_DESTRUCTOR_ITERATIONS
+_POSIX_THREAD_THREADS_MAX = 64
+PTHREAD_THREADS_MAX = 1024
+AIO_PRIO_DELTA_MAX = 20
+PTHREAD_STACK_MIN = 16384
+TIMER_MAX = 256
+SSIZE_MAX = INT_MAX
+NGROUPS_MAX = _POSIX_NGROUPS_MAX
+
+# Included from bits/posix2_lim.h
+_BITS_POSIX2_LIM_H = 1
+_POSIX2_BC_BASE_MAX = 99
+_POSIX2_BC_DIM_MAX = 2048
+_POSIX2_BC_SCALE_MAX = 99
+_POSIX2_BC_STRING_MAX = 1000
+_POSIX2_COLL_WEIGHTS_MAX = 2
+_POSIX2_EXPR_NEST_MAX = 32
+_POSIX2_LINE_MAX = 2048
+_POSIX2_RE_DUP_MAX = 255
+_POSIX2_CHARCLASS_NAME_MAX = 14
+BC_BASE_MAX = _POSIX2_BC_BASE_MAX
+BC_DIM_MAX = _POSIX2_BC_DIM_MAX
+BC_SCALE_MAX = _POSIX2_BC_SCALE_MAX
+BC_STRING_MAX = _POSIX2_BC_STRING_MAX
+COLL_WEIGHTS_MAX = 255
+EXPR_NEST_MAX = _POSIX2_EXPR_NEST_MAX
+LINE_MAX = _POSIX2_LINE_MAX
+CHARCLASS_NAME_MAX = 2048
+RE_DUP_MAX = (0x7fff)
+
+# Included from bits/xopen_lim.h
+_XOPEN_LIM_H = 1
+
+# Included from bits/stdio_lim.h
+L_tmpnam = 20
+TMP_MAX = 238328
+FILENAME_MAX = 4095
+L_ctermid = 9
+L_cuserid = 9
+FOPEN_MAX = 16
+IOV_MAX = 1024
+_XOPEN_IOV_MAX = _POSIX_UIO_MAXIOV
+NL_ARGMAX = _POSIX_ARG_MAX
+NL_LANGMAX = _POSIX2_LINE_MAX
+NL_MSGMAX = INT_MAX
+NL_NMAX = INT_MAX
+NL_SETMAX = INT_MAX
+NL_TEXTMAX = INT_MAX
+NZERO = 20
+WORD_BIT = 16
+WORD_BIT = 32
+WORD_BIT = 64
+WORD_BIT = 16
+WORD_BIT = 32
+WORD_BIT = 64
+WORD_BIT = 32
+LONG_BIT = 32
+LONG_BIT = 64
+LONG_BIT = 32
+LONG_BIT = 64
+LONG_BIT = 64
+LONG_BIT = 32
+from TYPES import *
+PF_UNSPEC = 0
+PF_LOCAL = 1
+PF_UNIX = PF_LOCAL
+PF_FILE = PF_LOCAL
+PF_INET = 2
+PF_AX25 = 3
+PF_IPX = 4
+PF_APPLETALK = 5
+PF_NETROM = 6
+PF_BRIDGE = 7
+PF_ATMPVC = 8
+PF_X25 = 9
+PF_INET6 = 10
+PF_ROSE = 11
+PF_DECnet = 12
+PF_NETBEUI = 13
+PF_SECURITY = 14
+PF_KEY = 15
+PF_NETLINK = 16
+PF_ROUTE = PF_NETLINK
+PF_PACKET = 17
+PF_ASH = 18
+PF_ECONET = 19
+PF_ATMSVC = 20
+PF_SNA = 22
+PF_IRDA = 23
+PF_PPPOX = 24
+PF_WANPIPE = 25
+PF_BLUETOOTH = 31
+PF_MAX = 32
+AF_UNSPEC = PF_UNSPEC
+AF_LOCAL = PF_LOCAL
+AF_UNIX = PF_UNIX
+AF_FILE = PF_FILE
+AF_INET = PF_INET
+AF_AX25 = PF_AX25
+AF_IPX = PF_IPX
+AF_APPLETALK = PF_APPLETALK
+AF_NETROM = PF_NETROM
+AF_BRIDGE = PF_BRIDGE
+AF_ATMPVC = PF_ATMPVC
+AF_X25 = PF_X25
+AF_INET6 = PF_INET6
+AF_ROSE = PF_ROSE
+AF_DECnet = PF_DECnet
+AF_NETBEUI = PF_NETBEUI
+AF_SECURITY = PF_SECURITY
+AF_KEY = PF_KEY
+AF_NETLINK = PF_NETLINK
+AF_ROUTE = PF_ROUTE
+AF_PACKET = PF_PACKET
+AF_ASH = PF_ASH
+AF_ECONET = PF_ECONET
+AF_ATMSVC = PF_ATMSVC
+AF_SNA = PF_SNA
+AF_IRDA = PF_IRDA
+AF_PPPOX = PF_PPPOX
+AF_WANPIPE = PF_WANPIPE
+AF_BLUETOOTH = PF_BLUETOOTH
+AF_MAX = PF_MAX
+SOL_RAW = 255
+SOL_DECNET = 261
+SOL_X25 = 262
+SOL_PACKET = 263
+SOL_ATM = 264
+SOL_AAL = 265
+SOL_IRDA = 266
+SOMAXCONN = 128
+
+# Included from bits/sockaddr.h
+_BITS_SOCKADDR_H = 1
+def __SOCKADDR_COMMON(sa_prefix): return \
+
+_SS_SIZE = 128
+def CMSG_FIRSTHDR(mhdr): return \
-# Included from linux/socket.h
# Included from asm/socket.h
@@ -59,372 +445,159 @@ SO_NO_CHECK = 11
SO_PRIORITY = 12
SO_LINGER = 13
SO_BSDCOMPAT = 14
-
-# Included from linux/sockios.h
-SIOCADDRT = 0x890B
-SIOCDELRT = 0x890C
-SIOCGIFNAME = 0x8910
-SIOCSIFLINK = 0x8911
-SIOCGIFCONF = 0x8912
-SIOCGIFFLAGS = 0x8913
-SIOCSIFFLAGS = 0x8914
-SIOCGIFADDR = 0x8915
-SIOCSIFADDR = 0x8916
-SIOCGIFDSTADDR = 0x8917
-SIOCSIFDSTADDR = 0x8918
-SIOCGIFBRDADDR = 0x8919
-SIOCSIFBRDADDR = 0x891a
-SIOCGIFNETMASK = 0x891b
-SIOCSIFNETMASK = 0x891c
-SIOCGIFMETRIC = 0x891d
-SIOCSIFMETRIC = 0x891e
-SIOCGIFMEM = 0x891f
-SIOCSIFMEM = 0x8920
-SIOCGIFMTU = 0x8921
-SIOCSIFMTU = 0x8922
-SIOCSIFHWADDR = 0x8924
-SIOCGIFENCAP = 0x8925
-SIOCSIFENCAP = 0x8926
-SIOCGIFHWADDR = 0x8927
-SIOCGIFSLAVE = 0x8929
-SIOCSIFSLAVE = 0x8930
-SIOCADDMULTI = 0x8931
-SIOCDELMULTI = 0x8932
-SIOCGIFBR = 0x8940
-SIOCSIFBR = 0x8941
-OLD_SIOCDARP = 0x8950
-OLD_SIOCGARP = 0x8951
-OLD_SIOCSARP = 0x8952
-SIOCDARP = 0x8953
-SIOCGARP = 0x8954
-SIOCSARP = 0x8955
-SIOCDRARP = 0x8960
-SIOCGRARP = 0x8961
-SIOCSRARP = 0x8962
-SIOCGIFMAP = 0x8970
-SIOCSIFMAP = 0x8971
-SIOCADDDLCI = 0x8980
-SIOCDELDLCI = 0x8981
-SIOCDEVPRIVATE = 0x89F0
-SIOCPROTOPRIVATE = 0x89E0
-
-# Included from linux/uio.h
-UIO_MAXIOV = 16
-SCM_RIGHTS = 1
+SO_PASSCRED = 16
+SO_PEERCRED = 17
+SO_RCVLOWAT = 18
+SO_SNDLOWAT = 19
+SO_RCVTIMEO = 20
+SO_SNDTIMEO = 21
+SO_SECURITY_AUTHENTICATION = 22
+SO_SECURITY_ENCRYPTION_TRANSPORT = 23
+SO_SECURITY_ENCRYPTION_NETWORK = 24
+SO_BINDTODEVICE = 25
+SO_ATTACH_FILTER = 26
+SO_DETACH_FILTER = 27
+SO_PEERNAME = 28
+SO_TIMESTAMP = 29
+SCM_TIMESTAMP = SO_TIMESTAMP
+SO_ACCEPTCONN = 30
SOCK_STREAM = 1
SOCK_DGRAM = 2
SOCK_RAW = 3
SOCK_RDM = 4
SOCK_SEQPACKET = 5
SOCK_PACKET = 10
-AF_UNSPEC = 0
-AF_UNIX = 1
-AF_INET = 2
-AF_AX25 = 3
-AF_IPX = 4
-AF_APPLETALK = 5
-AF_NETROM = 6
-AF_BRIDGE = 7
-AF_AAL5 = 8
-AF_X25 = 9
-AF_INET6 = 10
-AF_MAX = 12
-PF_UNSPEC = AF_UNSPEC
-PF_UNIX = AF_UNIX
-PF_INET = AF_INET
-PF_AX25 = AF_AX25
-PF_IPX = AF_IPX
-PF_APPLETALK = AF_APPLETALK
-PF_NETROM = AF_NETROM
-PF_BRIDGE = AF_BRIDGE
-PF_AAL5 = AF_AAL5
-PF_X25 = AF_X25
-PF_INET6 = AF_INET6
-PF_MAX = AF_MAX
-SOMAXCONN = 128
-MSG_OOB = 1
-MSG_PEEK = 2
-MSG_DONTROUTE = 4
-MSG_PROXY = 16
-SOL_IP = 0
-SOL_IPX = 256
-SOL_AX25 = 257
-SOL_ATALK = 258
-SOL_NETROM = 259
-SOL_TCP = 6
-SOL_UDP = 17
+SOCK_MAX = (SOCK_PACKET+1)
+
+# Included from bits/in.h
IP_TOS = 1
-IPTOS_LOWDELAY = 0x10
-IPTOS_THROUGHPUT = 0x08
-IPTOS_RELIABILITY = 0x04
-IPTOS_MINCOST = 0x02
IP_TTL = 2
IP_HDRINCL = 3
IP_OPTIONS = 4
+IP_ROUTER_ALERT = 5
+IP_RECVOPTS = 6
+IP_RETOPTS = 7
+IP_PKTINFO = 8
+IP_PKTOPTIONS = 9
+IP_PMTUDISC = 10
+IP_MTU_DISCOVER = 10
+IP_RECVERR = 11
+IP_RECVTTL = 12
+IP_RECVTOS = 13
IP_MULTICAST_IF = 32
IP_MULTICAST_TTL = 33
IP_MULTICAST_LOOP = 34
IP_ADD_MEMBERSHIP = 35
IP_DROP_MEMBERSHIP = 36
+IP_RECVRETOPTS = IP_RETOPTS
+IP_PMTUDISC_DONT = 0
+IP_PMTUDISC_WANT = 1
+IP_PMTUDISC_DO = 2
+SOL_IP = 0
IP_DEFAULT_MULTICAST_TTL = 1
IP_DEFAULT_MULTICAST_LOOP = 1
IP_MAX_MEMBERSHIPS = 20
-IPX_TYPE = 1
-TCP_NODELAY = 1
-TCP_MAXSEG = 2
-SOPRI_INTERACTIVE = 0
-SOPRI_NORMAL = 1
-SOPRI_BACKGROUND = 2
+IPV6_ADDRFORM = 1
+IPV6_PKTINFO = 2
+IPV6_HOPOPTS = 3
+IPV6_DSTOPTS = 4
+IPV6_RTHDR = 5
+IPV6_PKTOPTIONS = 6
+IPV6_CHECKSUM = 7
+IPV6_HOPLIMIT = 8
+IPV6_NEXTHOP = 9
+IPV6_AUTHHDR = 10
+IPV6_UNICAST_HOPS = 16
+IPV6_MULTICAST_IF = 17
+IPV6_MULTICAST_HOPS = 18
+IPV6_MULTICAST_LOOP = 19
+IPV6_JOIN_GROUP = 20
+IPV6_LEAVE_GROUP = 21
+IPV6_ROUTER_ALERT = 22
+IPV6_MTU_DISCOVER = 23
+IPV6_MTU = 24
+IPV6_RECVERR = 25
+IPV6_RXHOPOPTS = IPV6_HOPOPTS
+IPV6_RXDSTOPTS = IPV6_DSTOPTS
+IPV6_ADD_MEMBERSHIP = IPV6_JOIN_GROUP
+IPV6_DROP_MEMBERSHIP = IPV6_LEAVE_GROUP
+IPV6_PMTUDISC_DONT = 0
+IPV6_PMTUDISC_WANT = 1
+IPV6_PMTUDISC_DO = 2
+SOL_IPV6 = 41
+SOL_ICMPV6 = 58
+IPV6_RTHDR_LOOSE = 0
+IPV6_RTHDR_STRICT = 1
+IPV6_RTHDR_TYPE_0 = 0
+
+# Included from endian.h
+_ENDIAN_H = 1
+__LITTLE_ENDIAN = 1234
+__BIG_ENDIAN = 4321
+__PDP_ENDIAN = 3412
-# Included from sys/types.h
+# Included from bits/endian.h
+__BYTE_ORDER = __LITTLE_ENDIAN
+__FLOAT_WORD_ORDER = __BYTE_ORDER
+LITTLE_ENDIAN = __LITTLE_ENDIAN
+BIG_ENDIAN = __BIG_ENDIAN
+PDP_ENDIAN = __PDP_ENDIAN
+BYTE_ORDER = __BYTE_ORDER
-# Included from linux/types.h
+# Included from bits/byteswap.h
+def __bswap_constant_16(x): return \
-# Included from linux/posix_types.h
-__FD_SETSIZE = 1024
-def __FDELT(d): return ((d) / __NFDBITS)
+def __bswap_16(x): return \
+def __bswap_16(x): return __bswap_constant_16 (x)
-# Included from asm/posix_types.h
-def __FD_ZERO(fdsetp): return \
+def __bswap_constant_32(x): return \
+def __bswap_32(x): return \
-# Included from asm/types.h
+def __bswap_32(x): return \
-# Included from sys/bitypes.h
+def __bswap_32(x): return __bswap_constant_32 (x)
-# Included from pthread/mit/posix.h
+def __bswap_constant_64(x): return \
-# Included from pthread/mit/types.h
+def __bswap_64(x): return \
-# Included from pthread/mit/xtypes.h
+def ntohl(x): return (x)
-# Included from pthread/mit/sys/types.h
-IMPLINK_IP = 155
-IMPLINK_LOWEXPER = 156
-IMPLINK_HIGHEXPER = 158
+def ntohs(x): return (x)
-# Included from linux/in.h
-__SOCK_SIZE__ = 16
-IN_CLASSA_NET = 0xff000000
-IN_CLASSA_NSHIFT = 24
-IN_CLASSA_HOST = (0xffffffff & ~IN_CLASSA_NET)
-IN_CLASSA_MAX = 128
-IN_CLASSB_NET = 0xffff0000
-IN_CLASSB_NSHIFT = 16
-IN_CLASSB_HOST = (0xffffffff & ~IN_CLASSB_NET)
-IN_CLASSB_MAX = 65536
-IN_CLASSC_NET = 0xffffff00
-IN_CLASSC_NSHIFT = 8
-IN_CLASSC_HOST = (0xffffffff & ~IN_CLASSC_NET)
-def IN_MULTICAST(a): return IN_CLASSD(a)
+def htonl(x): return (x)
-IN_MULTICAST_NET = 0xF0000000
-IN_LOOPBACKNET = 127
-INADDR_LOOPBACK = 0x7f000001
-INADDR_UNSPEC_GROUP = 0xe0000000
-INADDR_ALLHOSTS_GROUP = 0xe0000001
-INADDR_MAX_LOCAL_GROUP = 0xe00000ff
+def htons(x): return (x)
-# Included from asm/byteorder.h
-__LITTLE_ENDIAN = 1234
+def ntohl(x): return __bswap_32 (x)
+
+def ntohs(x): return __bswap_16 (x)
+
+def htonl(x): return __bswap_32 (x)
+
+def htons(x): return __bswap_16 (x)
+
+def IN6_IS_ADDR_UNSPECIFIED(a): return \
+
+def IN6_IS_ADDR_LOOPBACK(a): return \
+
+def IN6_IS_ADDR_LINKLOCAL(a): return \
+
+def IN6_IS_ADDR_SITELOCAL(a): return \
+
+def IN6_IS_ADDR_V4MAPPED(a): return \
+
+def IN6_IS_ADDR_V4COMPAT(a): return \
+
+def IN6_IS_ADDR_MC_NODELOCAL(a): return \
+
+def IN6_IS_ADDR_MC_LINKLOCAL(a): return \
+
+def IN6_IS_ADDR_MC_SITELOCAL(a): return \
+
+def IN6_IS_ADDR_MC_ORGLOCAL(a): return \
-# Included from linux/config.h
-
-# Included from linux/autoconf.h
-CONFIG_MODULES = 1
-CONFIG_MODVERSIONS = 1
-CONFIG_KERNELD = 1
-CONFIG_MATH_EMULATION = 1
-CONFIG_NET = 1
-CONFIG_PCI = 1
-CONFIG_SYSVIPC = 1
-CONFIG_BINFMT_AOUT = 1
-CONFIG_BINFMT_ELF = 1
-CONFIG_KERNEL_ELF = 1
-CONFIG_M386 = 1
-CONFIG_BLK_DEV_FD = 1
-CONFIG_BLK_DEV_IDE = 1
-CONFIG_BLK_DEV_IDECD = 1
-CONFIG_BLK_DEV_IDETAPE = 1
-CONFIG_BLK_DEV_IDE_PCMCIA = 1
-CONFIG_BLK_DEV_CMD640 = 1
-CONFIG_BLK_DEV_CMD640_ENHANCED = 1
-CONFIG_BLK_DEV_RZ1000 = 1
-CONFIG_BLK_DEV_LOOP_MODULE = 1
-CONFIG_BLK_DEV_MD = 1
-CONFIG_MD_LINEAR_MODULE = 1
-CONFIG_MD_STRIPED_MODULE = 1
-CONFIG_BLK_DEV_RAM = 1
-CONFIG_BLK_DEV_INITRD = 1
-CONFIG_FIREWALL = 1
-CONFIG_NET_ALIAS = 1
-CONFIG_INET = 1
-CONFIG_IP_FORWARD = 1
-CONFIG_IP_FIREWALL = 1
-CONFIG_IP_ACCT = 1
-CONFIG_NET_IPIP_MODULE = 1
-CONFIG_IP_ALIAS_MODULE = 1
-CONFIG_INET_RARP_MODULE = 1
-CONFIG_IP_NOSR = 1
-CONFIG_SKB_LARGE = 1
-CONFIG_IPX_MODULE = 1
-CONFIG_ATALK_MODULE = 1
-CONFIG_SCSI = 1
-CONFIG_BLK_DEV_SD = 1
-CONFIG_CHR_DEV_ST_MODULE = 1
-CONFIG_BLK_DEV_SR = 1
-CONFIG_CHR_DEV_SG_MODULE = 1
-CONFIG_SCSI_CONSTANTS = 1
-CONFIG_SCSI_7000FASST_MODULE = 1
-CONFIG_SCSI_AHA152X_MODULE = 1
-CONFIG_SCSI_AHA1542_MODULE = 1
-CONFIG_SCSI_AHA1740_MODULE = 1
-CONFIG_SCSI_AIC7XXX_MODULE = 1
-CONFIG_SCSI_ADVANSYS_MODULE = 1
-CONFIG_SCSI_IN2000_MODULE = 1
-CONFIG_SCSI_AM53C974 = 1
-CONFIG_SCSI_BUSLOGIC_MODULE = 1
-CONFIG_SCSI_DTC3280_MODULE = 1
-CONFIG_SCSI_EATA_DMA_MODULE = 1
-CONFIG_SCSI_EATA_PIO_MODULE = 1
-CONFIG_SCSI_EATA_MODULE = 1
-CONFIG_SCSI_FUTURE_DOMAIN_MODULE = 1
-CONFIG_SCSI_GENERIC_NCR5380_MODULE = 1
-CONFIG_SCSI_G_NCR5380_PORT = 1
-CONFIG_SCSI_NCR53C406A_MODULE = 1
-CONFIG_SCSI_NCR53C7xx_MODULE = 1
-CONFIG_SCSI_NCR53C8XX_MODULE = 1
-CONFIG_SCSI_PPA_MODULE = 1
-CONFIG_SCSI_PAS16_MODULE = 1
-CONFIG_SCSI_QLOGIC_FAS_MODULE = 1
-CONFIG_SCSI_QLOGIC_ISP_MODULE = 1
-CONFIG_SCSI_SEAGATE_MODULE = 1
-CONFIG_SCSI_T128_MODULE = 1
-CONFIG_SCSI_U14_34F_MODULE = 1
-CONFIG_SCSI_ULTRASTOR_MODULE = 1
-CONFIG_NETDEVICES = 1
-CONFIG_DUMMY_MODULE = 1
-CONFIG_EQUALIZER_MODULE = 1
-CONFIG_PLIP_MODULE = 1
-CONFIG_PPP_MODULE = 1
-CONFIG_SLIP_MODULE = 1
-CONFIG_SLIP_COMPRESSED = 1
-CONFIG_SLIP_SMART = 1
-CONFIG_NET_ETHERNET = 1
-CONFIG_NET_VENDOR_3COM = 1
-CONFIG_EL1_MODULE = 1
-CONFIG_EL2_MODULE = 1
-CONFIG_EL3_MODULE = 1
-CONFIG_VORTEX_MODULE = 1
-CONFIG_LANCE = 1
-CONFIG_LANCE32 = 1
-CONFIG_NET_VENDOR_SMC = 1
-CONFIG_WD80x3_MODULE = 1
-CONFIG_ULTRA_MODULE = 1
-CONFIG_SMC9194_MODULE = 1
-CONFIG_NET_ISA = 1
-CONFIG_E2100_MODULE = 1
-CONFIG_DEPCA_MODULE = 1
-CONFIG_EWRK3_MODULE = 1
-CONFIG_EEXPRESS_MODULE = 1
-CONFIG_HPLAN_PLUS_MODULE = 1
-CONFIG_HPLAN_MODULE = 1
-CONFIG_HP100_MODULE = 1
-CONFIG_NE2000_MODULE = 1
-CONFIG_NET_EISA = 1
-CONFIG_APRICOT_MODULE = 1
-CONFIG_DE4X5_MODULE = 1
-CONFIG_DEC_ELCP_MODULE = 1
-CONFIG_DGRS_MODULE = 1
-CONFIG_NET_POCKET = 1
-CONFIG_DE600_MODULE = 1
-CONFIG_DE620_MODULE = 1
-CONFIG_TR = 1
-CONFIG_IBMTR_MODULE = 1
-CONFIG_ARCNET_MODULE = 1
-CONFIG_ARCNET_ETH = 1
-CONFIG_ARCNET_1051 = 1
-CONFIG_ISDN_MODULE = 1
-CONFIG_ISDN_PPP = 1
-CONFIG_ISDN_PPP_VJ = 1
-CONFIG_ISDN_DRV_ICN_MODULE = 1
-CONFIG_ISDN_DRV_PCBIT_MODULE = 1
-CONFIG_ISDN_DRV_TELES_MODULE = 1
-CONFIG_CD_NO_IDESCSI = 1
-CONFIG_AZTCD_MODULE = 1
-CONFIG_GSCD_MODULE = 1
-CONFIG_SBPCD_MODULE = 1
-CONFIG_MCD_MODULE = 1
-CONFIG_MCDX_MODULE = 1
-CONFIG_OPTCD_MODULE = 1
-CONFIG_CM206_MODULE = 1
-CONFIG_SJCD_MODULE = 1
-CONFIG_CDI_INIT = 1
-CONFIG_ISP16_CDI_MODULE = 1
-CONFIG_CDU31A_MODULE = 1
-CONFIG_CDU535_MODULE = 1
-CONFIG_QUOTA = 1
-CONFIG_LOCK_MANDATORY = 1
-CONFIG_MINIX_FS = 1
-CONFIG_EXT_FS_MODULE = 1
-CONFIG_EXT2_FS = 1
-CONFIG_XIA_FS_MODULE = 1
-CONFIG_FAT_FS = 1
-CONFIG_MSDOS_FS = 1
-CONFIG_VFAT_FS_MODULE = 1
-CONFIG_UMSDOS_FS_MODULE = 1
-CONFIG_PROC_FS = 1
-CONFIG_NFS_FS = 1
-CONFIG_SMB_FS_MODULE = 1
-CONFIG_NCP_FS_MODULE = 1
-CONFIG_ISO9660_FS = 1
-CONFIG_HPFS_FS_MODULE = 1
-CONFIG_SYSV_FS_MODULE = 1
-CONFIG_UFS_FS_MODULE = 1
-CONFIG_SERIAL = 1
-CONFIG_CYCLADES_MODULE = 1
-CONFIG_RISCOM8_MODULE = 1
-CONFIG_PRINTER_MODULE = 1
-CONFIG_MOUSE = 1
-CONFIG_ATIXL_BUSMOUSE = 1
-CONFIG_BUSMOUSE = 1
-CONFIG_MS_BUSMOUSE = 1
-CONFIG_PSMOUSE = 1
-CONFIG_82C710_MOUSE = 1
-CONFIG_FTAPE_MODULE = 1
-UTS_SYSNAME = "Linux"
-UTS_MACHINE = "unknown"
-UTS_NODENAME = "(none)"
-UTS_DOMAINNAME = "(none)"
-DEF_INITSEG = 0x9000
-DEF_SYSSEG = 0x1000
-DEF_SETUPSEG = 0x9020
-DEF_SYSSIZE = 0x7F00
-NORMAL_VGA = 0xffff
-EXTENDED_VGA = 0xfffe
-ASK_VGA = 0xfffd
-def __constant_ntohl(x): return \
-
-def __constant_ntohs(x): return \
-
-def __htonl(x): return __ntohl(x)
-
-def __htons(x): return __ntohs(x)
-
-def __constant_htonl(x): return __constant_ntohl(x)
-
-def __constant_htons(x): return __constant_ntohs(x)
-
-def ntohl(x): return \
-
-def ntohs(x): return \
-
-def htonl(x): return \
-
-def htons(x): return \
-
-def LOOPBACK(x): return (((x) & htonl(0xff000000)) == htonl(0x7f000000))
-
-def MULTICAST(x): return (((x) & htonl(0xf0000000)) == htonl(0xe0000000))
+def IN6_IS_ADDR_MC_GLOBAL(a): return \
diff --git a/Lib/plat-linux2/TYPES.py b/Lib/plat-linux2/TYPES.py
new file mode 100644
index 0000000..2006bfc
--- /dev/null
+++ b/Lib/plat-linux2/TYPES.py
@@ -0,0 +1,171 @@
+# Generated by h2py from /usr/include/sys/types.h
+_SYS_TYPES_H = 1
+
+# Included from features.h
+_FEATURES_H = 1
+__USE_ANSI = 1
+__FAVOR_BSD = 1
+_ISOC99_SOURCE = 1
+_POSIX_SOURCE = 1
+_POSIX_C_SOURCE = 199506L
+_XOPEN_SOURCE = 600
+_XOPEN_SOURCE_EXTENDED = 1
+_LARGEFILE64_SOURCE = 1
+_BSD_SOURCE = 1
+_SVID_SOURCE = 1
+_BSD_SOURCE = 1
+_SVID_SOURCE = 1
+__USE_ISOC99 = 1
+_POSIX_SOURCE = 1
+_POSIX_C_SOURCE = 2
+_POSIX_C_SOURCE = 199506L
+__USE_POSIX = 1
+__USE_POSIX2 = 1
+__USE_POSIX199309 = 1
+__USE_POSIX199506 = 1
+__USE_XOPEN = 1
+__USE_XOPEN_EXTENDED = 1
+__USE_UNIX98 = 1
+_LARGEFILE_SOURCE = 1
+__USE_XOPEN2K = 1
+__USE_ISOC99 = 1
+__USE_XOPEN_EXTENDED = 1
+__USE_LARGEFILE = 1
+__USE_LARGEFILE64 = 1
+__USE_FILE_OFFSET64 = 1
+__USE_MISC = 1
+__USE_BSD = 1
+__USE_SVID = 1
+__USE_GNU = 1
+__USE_REENTRANT = 1
+__STDC_IEC_559__ = 1
+__STDC_IEC_559_COMPLEX__ = 1
+__STDC_ISO_10646__ = 200009L
+__GNU_LIBRARY__ = 6
+__GLIBC__ = 2
+__GLIBC_MINOR__ = 2
+
+# Included from sys/cdefs.h
+_SYS_CDEFS_H = 1
+def __PMT(args): return args
+
+def __P(args): return args
+
+def __PMT(args): return args
+
+def __STRING(x): return #x
+
+__flexarr = []
+__flexarr = [0]
+__flexarr = []
+__flexarr = [1]
+def __ASMNAME(cname): return __ASMNAME2 (__USER_LABEL_PREFIX__, cname)
+
+def __attribute__(xyz): return
+
+def __attribute_format_arg__(x): return __attribute__ ((__format_arg__ (x)))
+
+def __attribute_format_arg__(x): return
+
+__USE_LARGEFILE = 1
+__USE_LARGEFILE64 = 1
+__USE_EXTERN_INLINES = 1
+
+# Included from gnu/stubs.h
+
+# Included from bits/types.h
+_BITS_TYPES_H = 1
+__FD_SETSIZE = 1024
+
+# Included from bits/pthreadtypes.h
+_BITS_PTHREADTYPES_H = 1
+
+# Included from bits/sched.h
+SCHED_OTHER = 0
+SCHED_FIFO = 1
+SCHED_RR = 2
+CSIGNAL = 0x000000ff
+CLONE_VM = 0x00000100
+CLONE_FS = 0x00000200
+CLONE_FILES = 0x00000400
+CLONE_SIGHAND = 0x00000800
+CLONE_PID = 0x00001000
+CLONE_PTRACE = 0x00002000
+CLONE_VFORK = 0x00004000
+__defined_schedparam = 1
+
+# Included from time.h
+_TIME_H = 1
+
+# Included from bits/time.h
+_BITS_TIME_H = 1
+CLOCKS_PER_SEC = 1000000l
+CLOCK_REALTIME = 0
+CLOCK_PROCESS_CPUTIME_ID = 2
+CLOCK_THREAD_CPUTIME_ID = 3
+TIMER_ABSTIME = 1
+_STRUCT_TIMEVAL = 1
+CLK_TCK = CLOCKS_PER_SEC
+__clock_t_defined = 1
+__time_t_defined = 1
+__clockid_t_defined = 1
+__timer_t_defined = 1
+__timespec_defined = 1
+def __isleap(year): return \
+
+__BIT_TYPES_DEFINED__ = 1
+
+# Included from endian.h
+_ENDIAN_H = 1
+__LITTLE_ENDIAN = 1234
+__BIG_ENDIAN = 4321
+__PDP_ENDIAN = 3412
+
+# Included from bits/endian.h
+__BYTE_ORDER = __LITTLE_ENDIAN
+__FLOAT_WORD_ORDER = __BYTE_ORDER
+LITTLE_ENDIAN = __LITTLE_ENDIAN
+BIG_ENDIAN = __BIG_ENDIAN
+PDP_ENDIAN = __PDP_ENDIAN
+BYTE_ORDER = __BYTE_ORDER
+
+# Included from sys/select.h
+_SYS_SELECT_H = 1
+
+# Included from bits/select.h
+def __FD_ZERO(fdsp): return \
+
+def __FD_ZERO(set): return \
+
+
+# Included from bits/sigset.h
+_SIGSET_H_types = 1
+_SIGSET_H_fns = 1
+def __sigmask(sig): return \
+
+def __sigemptyset(set): return \
+
+def __sigfillset(set): return \
+
+def __sigisemptyset(set): return \
+
+def __FDELT(d): return ((d) / __NFDBITS)
+
+FD_SETSIZE = __FD_SETSIZE
+def FD_ZERO(fdsetp): return __FD_ZERO (fdsetp)
+
+
+# Included from sys/sysmacros.h
+_SYS_SYSMACROS_H = 1
+def major(dev): return ((int)(((dev) >> 8) & 0xff))
+
+def minor(dev): return ((int)((dev) & 0xff))
+
+def major(dev): return (((dev).__val[1] >> 8) & 0xff)
+
+def minor(dev): return ((dev).__val[1] & 0xff)
+
+def major(dev): return (((dev).__val[0] >> 8) & 0xff)
+
+def minor(dev): return ((dev).__val[0] & 0xff)
+
diff --git a/Lib/plat-linux2/regen b/Lib/plat-linux2/regen
index fa3d95a..c76950e 100755
--- a/Lib/plat-linux2/regen
+++ b/Lib/plat-linux2/regen
@@ -5,4 +5,4 @@ Linux*) ;;
exit 1;;
esac
set -v
-h2py -i '(u_long)' /usr/include/netinet/in.h
+h2py -i '(u_long)' /usr/include/sys/types.h /usr/include/netinet/in.h /usr/include/dlfcn.h