diff options
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/plat-unixware7/FCNTL.py | 77 | ||||
-rw-r--r-- | Lib/plat-unixware7/IN.py | 836 | ||||
-rw-r--r-- | Lib/plat-unixware7/SOCKET.py | 267 | ||||
-rw-r--r-- | Lib/plat-unixware7/STROPTS.py | 328 | ||||
-rw-r--r-- | Lib/plat-unixware7/TERMIOS.py | 270 | ||||
-rwxr-xr-x | Lib/plat-unixware7/regen | 12 | ||||
-rwxr-xr-x | Lib/test/test_fcntl.py | 2 | ||||
-rw-r--r-- | Lib/test/test_fork1.py | 5 | ||||
-rw-r--r-- | Lib/test/test_math.py | 6 |
9 files changed, 1800 insertions, 3 deletions
diff --git a/Lib/plat-unixware7/FCNTL.py b/Lib/plat-unixware7/FCNTL.py new file mode 100644 index 0000000..ddbc9aa --- /dev/null +++ b/Lib/plat-unixware7/FCNTL.py @@ -0,0 +1,77 @@ +# Generated by h2py from /usr/include/sys/fcntl.h + +# Included from sys/types.h +def quad_low(x): return x.val[0] + +ADT_EMASKSIZE = 8 +SHRT_MIN = -32768 +SHRT_MAX = 32767 +INT_MIN = (-2147483647-1) +INT_MAX = 2147483647 +LONG_MIN = (-2147483647-1) +LONG_MAX = 2147483647 +OFF32_MAX = LONG_MAX +ISTAT_ASSERTED = 0 +ISTAT_ASSUMED = 1 +ISTAT_NONE = 2 +OFF_MAX = OFF32_MAX +CLOCK_MAX = LONG_MAX +P_MYID = (-1) +P_MYHOSTID = (-1) + +# Included from sys/select.h +FD_SETSIZE = 4096 +NBBY = 8 +NULL = 0 +O_RDONLY = 0 +O_WRONLY = 1 +O_RDWR = 2 +O_NDELAY = 0x04 +O_APPEND = 0x08 +O_SYNC = 0x10 +O_NONBLOCK = 0x80 +O_LARGEFILE = 0x80000 +O_CREAT = 0x100 +O_TRUNC = 0x200 +O_EXCL = 0x400 +O_NOCTTY = 0x800 +F_DUPFD = 0 +F_GETFD = 1 +F_SETFD = 2 +F_GETFL = 3 +F_SETFL = 4 +F_GETLK = 14 +F_O_GETLK = 5 +F_GETLK = 5 +F_GETLK = 14 +F_SETLK = 6 +F_SETLKW = 7 +F_CHKFL = 8 +F_ALLOCSP = 10 +F_FREESP = 11 +F_RSETLK = 20 +F_RGETLK = 21 +F_RSETLKW = 22 +F_GETOWN = 23 +F_SETOWN = 24 +F_DUP2 = 25 +F_GETLK64 = 100 +F_SETLKW64 = 101 +F_SETLK64 = 102 +F_RSETLK64 = 103 +F_RGETLK64 = 104 +F_RSETLKW64 = 105 +F_FREESP64 = 106 +F_RDCHK = 0x6001 +F_GETLK = F_GETLK64 +F_SETLKW = F_SETLKW64 +F_SETLK = F_SETLK64 +F_RSETLK = F_RSETLK64 +F_RGETLK = F_RGETLK64 +F_RSETLKW = F_RSETLKW64 +F_FREESP = F_FREESP64 +F_RDLCK = 01 +F_WRLCK = 02 +F_UNLCK = 03 +O_ACCMODE = 3 +FD_CLOEXEC = 1 diff --git a/Lib/plat-unixware7/IN.py b/Lib/plat-unixware7/IN.py new file mode 100644 index 0000000..3f97606 --- /dev/null +++ b/Lib/plat-unixware7/IN.py @@ -0,0 +1,836 @@ +# Generated by h2py from /usr/include/netinet/in.h + +# Included from netinet/in_f.h +def IN_CLASSA(i): return (((long)(i) & 0x80000000) == 0) + +IN_CLASSA_NET = 0xff000000 +IN_CLASSA_NSHIFT = 24 +IN_CLASSA_HOST = 0x00ffffff +IN_CLASSA_MAX = 128 +def IN_CLASSB(i): return (((long)(i) & 0xc0000000) == 0x80000000) + +IN_CLASSB_NET = 0xffff0000 +IN_CLASSB_NSHIFT = 16 +IN_CLASSB_HOST = 0x0000ffff +IN_CLASSB_MAX = 65536 +def IN_CLASSC(i): return (((long)(i) & 0xe0000000) == 0xc0000000) + +IN_CLASSC_NET = 0xffffff00 +IN_CLASSC_NSHIFT = 8 +IN_CLASSC_HOST = 0x000000ff +def IN_CLASSD(i): return (((long)(i) & 0xf0000000) == 0xe0000000) + +IN_CLASSD_NET = 0xf0000000 +IN_CLASSD_NSHIFT = 28 +IN_CLASSD_HOST = 0x0fffffff +def IN_MULTICAST(i): return IN_CLASSD(i) + +def IN_EXPERIMENTAL(i): return (((long)(i) & 0xe0000000) == 0xe0000000) + +def IN_BADCLASS(i): return (((long)(i) & 0xf0000000) == 0xf0000000) + +INADDR_ANY = 0x00000000 +INADDR_LOOPBACK = 0x7f000001 +INADDR_BROADCAST = 0xffffffff +INADDR_NONE = 0xffffffff +IN_LOOPBACKNET = 127 +INADDR_UNSPEC_GROUP = 0xe0000000 +INADDR_ALLHOSTS_GROUP = 0xe0000001 +INADDR_ALLRTRS_GROUP = 0xe0000002 +INADDR_MAX_LOCAL_GROUP = 0xe00000ff + +# Included from netinet/in6.h + +# Included from sys/types.h +def quad_low(x): return x.val[0] + +ADT_EMASKSIZE = 8 +SHRT_MIN = -32768 +SHRT_MAX = 32767 +INT_MIN = (-2147483647-1) +INT_MAX = 2147483647 +LONG_MIN = (-2147483647-1) +LONG_MAX = 2147483647 +OFF32_MAX = LONG_MAX +ISTAT_ASSERTED = 0 +ISTAT_ASSUMED = 1 +ISTAT_NONE = 2 +OFF_MAX = OFF32_MAX +CLOCK_MAX = LONG_MAX +P_MYID = (-1) +P_MYHOSTID = (-1) + +# Included from sys/select.h +FD_SETSIZE = 4096 +NBBY = 8 +NULL = 0 + +# Included from sys/bitypes.h + +# Included from netinet/in6_f.h +def IN6_IS_ADDR_UNSPECIFIED(a): return IN6_ADDR_EQUAL_L(a, 0, 0, 0, 0) + +def IN6_SET_ADDR_UNSPECIFIED(a): return IN6_ADDR_COPY_L(a, 0, 0, 0, 0) + +def IN6_IS_ADDR_ANY(a): return IN6_ADDR_EQUAL_L(a, 0, 0, 0, 0) + +def IN6_SET_ADDR_ANY(a): return IN6_ADDR_COPY_L(a, 0, 0, 0, 0) + +def IN6_IS_ADDR_LOOPBACK(a): return IN6_ADDR_EQUAL_L(a, 0, 0, 0, 0x01000000) + +def IN6_SET_ADDR_LOOPBACK(a): return IN6_ADDR_COPY_L(a, 0, 0, 0, 0x01000000) + +IN6_MC_FLAG_PERMANENT = 0x0 +IN6_MC_FLAG_TRANSIENT = 0x1 +IN6_MC_SCOPE_NODELOCAL = 0x1 +IN6_MC_SCOPE_LINKLOCAL = 0x2 +IN6_MC_SCOPE_SITELOCAL = 0x5 +IN6_MC_SCOPE_ORGLOCAL = 0x8 +IN6_MC_SCOPE_GLOBAL = 0xE +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 \ + +def IN6_IS_ADDR_MC_GLOBAL(a): return \ + + +# Included from sys/convsa.h +__NETLIB_UW211_SVR4 = 1 +__NETLIB_UW211_XPG4 = 2 +__NETLIB_GEMINI_SVR4 = 3 +__NETLIB_GEMINI_XPG4 = 4 +__NETLIB_FP1_SVR4 = 5 +__NETLIB_FP1_XPG4 = 6 +__NETLIB_BASE_VERSION__ = __NETLIB_UW211_SVR4 +__NETLIB_VERSION__ = __NETLIB_FP1_SVR4 +__NETLIB_VERSION__ = __NETLIB_FP1_XPG4 +__NETLIB_VERSION__ = __NETLIB_GEMINI_SVR4 +__NETLIB_VERSION__ = __NETLIB_GEMINI_XPG4 +__NETLIB_VERSION__ = __NETLIB_UW211_SVR4 +__NETLIB_VERSION__ = __NETLIB_UW211_XPG4 +__NETLIB_VERSION__ = __NETLIB_FP1_XPG4 + +# Included from sys/byteorder.h +LITTLE_ENDIAN = 1234 +BIG_ENDIAN = 4321 +PDP_ENDIAN = 3412 + +# Included from sys/byteorder_f.h +BYTE_ORDER = LITTLE_ENDIAN +def htonl(hl): return __htonl(hl) + +def ntohl(nl): return __ntohl(nl) + +def htons(hs): return __htons(hs) + +def ntohs(ns): return __ntohs(ns) + +def ntohl(x): return (x) + +def ntohs(x): return (x) + +def htonl(x): return (x) + +def htons(x): return (x) + +def __NETLIB_VERSION_IS_XPG4(version): return (((version) % 2) == 0) + +def __NETLIB_VERSION_HAS_SALEN(version): return ((version) >= __NETLIB_GEMINI_SVR4) + +def __NETLIB_VERSION_IS_IKS(version): return ((version) >= __NETLIB_FP1_SVR4) + +def SA_FAMILY_GET(sa): return \ + +INET6_ADDRSTRLEN = 46 +IPV6_UNICAST_HOPS = 3 +IPV6_ADDRFORM = 24 +IPV6_MULTICAST_HOPS = 25 +IPV6_MULTICAST_IF = 26 +IPV6_MULTICAST_LOOP = 27 +IPV6_ADD_MEMBERSHIP = 28 +IPV6_DROP_MEMBERSHIP = 29 + +# Included from sys/insrem.h +def LIST_INIT(head): return \ + +def LIST_INIT(head): return \ + +def remque(a): return REMQUE(a) + + +# Included from sys/socket.h + +# Included from sys/uio.h +SHUT_RD = 0 +SHUT_WR = 1 +SHUT_RDWR = 2 + +# Included from sys/netconfig.h + +# Included from sys/cdefs.h +def __P(protos): return protos + +def __STRING(x): return #x + +def __P(protos): return () + +def __STRING(x): return "x" + +NETCONFIG = "/etc/netconfig" +NETPATH = "NETPATH" +NC_TPI_CLTS = 1 +NC_TPI_COTS = 2 +NC_TPI_COTS_ORD = 3 +NC_TPI_RAW = 4 +NC_NOFLAG = 00 +NC_VISIBLE = 01 +NC_BROADCAST = 02 +NC_NOPROTOFMLY = "-" +NC_LOOPBACK = "loopback" +NC_INET = "inet" +NC_INET6 = "inet6" +NC_IMPLINK = "implink" +NC_PUP = "pup" +NC_CHAOS = "chaos" +NC_NS = "ns" +NC_NBS = "nbs" +NC_ECMA = "ecma" +NC_DATAKIT = "datakit" +NC_CCITT = "ccitt" +NC_SNA = "sna" +NC_DECNET = "decnet" +NC_DLI = "dli" +NC_LAT = "lat" +NC_HYLINK = "hylink" +NC_APPLETALK = "appletalk" +NC_NIT = "nit" +NC_IEEE802 = "ieee802" +NC_OSI = "osi" +NC_X25 = "x25" +NC_OSINET = "osinet" +NC_GOSIP = "gosip" +NC_NETWARE = "netware" +NC_NOPROTO = "-" +NC_TCP = "tcp" +NC_UDP = "udp" +NC_ICMP = "icmp" +NC_IPX = "ipx" +NC_SPX = "spx" +NC_TPI_CLTS = 1 +NC_TPI_COTS = 2 +NC_TPI_COTS_ORD = 3 +NC_TPI_RAW = 4 +SOCK_STREAM = 2 +SOCK_DGRAM = 1 +SOCK_RAW = 4 +SOCK_RDM = 5 +SOCK_SEQPACKET = 6 +SO_DEBUG = 0x0001 +SO_ACCEPTCONN = 0x0002 +SO_REUSEADDR = 0x0004 +SO_KEEPALIVE = 0x0008 +SO_DONTROUTE = 0x0010 +SO_BROADCAST = 0x0020 +SO_USELOOPBACK = 0x0040 +SO_LINGER = 0x0080 +SO_OOBINLINE = 0x0100 +SO_ORDREL = 0x0200 +SO_IMASOCKET = 0x0400 +SO_MGMT = 0x0800 +SO_REUSEPORT = 0x1000 +SO_LISTENING = 0x2000 +SO_RDWR = 0x4000 +SO_SEMA = 0x8000 +SO_DONTLINGER = (~SO_LINGER) +SO_SNDBUF = 0x1001 +SO_RCVBUF = 0x1002 +SO_SNDLOWAT = 0x1003 +SO_RCVLOWAT = 0x1004 +SO_SNDTIMEO = 0x1005 +SO_RCVTIMEO = 0x1006 +SO_ERROR = 0x1007 +SO_TYPE = 0x1008 +SO_PROTOTYPE = 0x1009 +SO_ALLRAW = 0x100a +SOL_SOCKET = 0xffff +AF_UNSPEC = 0 +AF_UNIX = 1 +AF_LOCAL = AF_UNIX +AF_INET = 2 +AF_IMPLINK = 3 +AF_PUP = 4 +AF_CHAOS = 5 +AF_NS = 6 +AF_NBS = 7 +AF_ECMA = 8 +AF_DATAKIT = 9 +AF_CCITT = 10 +AF_SNA = 11 +AF_DECnet = 12 +AF_DLI = 13 +AF_LAT = 14 +AF_HYLINK = 15 +AF_APPLETALK = 16 +AF_NIT = 17 +AF_802 = 18 +AF_OSI = 19 +AF_ISO = AF_OSI +AF_X25 = 20 +AF_OSINET = 21 +AF_GOSIP = 22 +AF_YNET = 23 +AF_ROUTE = 24 +AF_LINK = 25 +pseudo_AF_XTP = 26 +AF_INET6 = 27 +AF_MAX = 27 +AF_INET_BSWAP = 0x0200 +PF_UNSPEC = AF_UNSPEC +PF_UNIX = AF_UNIX +PF_LOCAL = AF_LOCAL +PF_INET = AF_INET +PF_IMPLINK = AF_IMPLINK +PF_PUP = AF_PUP +PF_CHAOS = AF_CHAOS +PF_NS = AF_NS +PF_NBS = AF_NBS +PF_ECMA = AF_ECMA +PF_DATAKIT = AF_DATAKIT +PF_CCITT = AF_CCITT +PF_SNA = AF_SNA +PF_DECnet = AF_DECnet +PF_DLI = AF_DLI +PF_LAT = AF_LAT +PF_HYLINK = AF_HYLINK +PF_APPLETALK = AF_APPLETALK +PF_NIT = AF_NIT +PF_802 = AF_802 +PF_OSI = AF_OSI +PF_ISO = PF_OSI +PF_X25 = AF_X25 +PF_OSINET = AF_OSINET +PF_GOSIP = AF_GOSIP +PF_YNET = AF_YNET +PF_ROUTE = AF_ROUTE +PF_LINK = AF_LINK +pseudo_PF_XTP = pseudo_AF_XTP +PF_INET6 = AF_INET6 +PF_MAX = AF_MAX +SOMAXCONN = 5 +SCM_RIGHTS = 1 +MSG_OOB = 0x1 +MSG_PEEK = 0x2 +MSG_DONTROUTE = 0x4 +MSG_CTRUNC = 0x8 +MSG_TRUNC = 0x10 +MSG_EOR = 0x30 +MSG_WAITALL = 0x20 +MSG_MAXIOVLEN = 16 +def OPTLEN(x): return ((((x) + sizeof(long) - 1) / sizeof(long)) * sizeof(long)) + +GIARG = 0x1 +CONTI = 0x2 +GITAB = 0x4 +SOCKETSYS = 88 +SOCKETSYS = 83 +SO_ACCEPT = 1 +SO_BIND = 2 +SO_CONNECT = 3 +SO_GETPEERNAME = 4 +SO_GETSOCKNAME = 5 +SO_GETSOCKOPT = 6 +SO_LISTEN = 7 +SO_RECV = 8 +SO_RECVFROM = 9 +SO_SEND = 10 +SO_SENDTO = 11 +SO_SETSOCKOPT = 12 +SO_SHUTDOWN = 13 +SO_SOCKET = 14 +SO_SOCKPOLL = 15 +SO_GETIPDOMAIN = 16 +SO_SETIPDOMAIN = 17 +SO_ADJTIME = 18 + +# Included from sys/stream.h + +# Included from sys/cred.h + +# Included from sys/ksynch.h + +# Included from sys/dl.h +SIGNBIT = 0x80000000 + +# Included from sys/ipl.h + +# Included from sys/disp_p.h + +# Included from sys/trap.h +DIVERR = 0 +SGLSTP = 1 +NMIFLT = 2 +BPTFLT = 3 +INTOFLT = 4 +BOUNDFLT = 5 +INVOPFLT = 6 +NOEXTFLT = 7 +DBLFLT = 8 +EXTOVRFLT = 9 +INVTSSFLT = 10 +SEGNPFLT = 11 +STKFLT = 12 +GPFLT = 13 +PGFLT = 14 +EXTERRFLT = 16 +ALIGNFLT = 17 +MCEFLT = 18 +USERFLT = 0x100 +TRP_PREEMPT = 0x200 +TRP_UNUSED = 0x201 +PF_ERR_MASK = 0x01 +PF_ERR_PAGE = 0 +PF_ERR_PROT = 1 +PF_ERR_WRITE = 2 +PF_ERR_USER = 4 +EVT_STRSCHED = 0x04 +EVT_GLOBCALLOUT = 0x08 +EVT_LCLCALLOUT = 0x10 +EVT_SOFTINTMASK = (EVT_STRSCHED|EVT_GLOBCALLOUT|EVT_LCLCALLOUT) +PL0 = 0 +PL1 = 1 +PL2 = 2 +PL3 = 3 +PL4 = 4 +PL5 = 5 +PL6 = 6 +PLHI = 8 +PL7 = PLHI +PLBASE = PL0 +PLTIMEOUT = PL1 +PLDISK = PL5 +PLSTR = PL6 +PLTTY = PLSTR +PLMIN = PL0 +PLMIN = PL1 +MAX_INTR_LEVELS = 10 +MAX_INTR_NESTING = 50 +STRSCHED = EVT_STRSCHED +GLOBALSOFTINT = EVT_GLOBCALLOUT +LOCALSOFTINT = EVT_LCLCALLOUT + +# Included from sys/ksynch_p.h +def GET_TIME(timep): return \ + +LK_THRESHOLD = 500000 + +# Included from sys/list.h + +# Included from sys/listasm.h +def remque_null(e): return \ + +def LS_ISEMPTY(listp): return \ + +LK_BASIC = 0x1 +LK_SLEEP = 0x2 +LK_NOSTATS = 0x4 +def CYCLES_SINCE(c): return CYCLES_BETWEEN((c), CYCLES()) + +LSB_NLKDS = 92 +EVT_RUNRUN = 0x01 +EVT_KPRUNRUN = 0x02 +SP_UNLOCKED = 0 +SP_LOCKED = 1 +KS_LOCKTEST = 0x01 +KS_MPSTATS = 0x02 +KS_DEINITED = 0x04 +KS_NVLTTRACE = 0x08 +RWS_READ = (ord('r')) +RWS_WRITE = (ord('w')) +RWS_UNLOCKED = (ord('u')) +RWS_BUSY = (ord('b')) +def SLEEP_LOCKOWNED(lkp): return \ + +def SLEEP_DISOWN(lkp): return \ + +KS_NOPRMPT = 0x00000001 +__KS_LOCKTEST = KS_LOCKTEST +__KS_LOCKTEST = 0 +__KS_MPSTATS = KS_MPSTATS +__KS_MPSTATS = 0 +__KS_NVLTTRACE = KS_NVLTTRACE +__KS_NVLTTRACE = 0 +KSFLAGS = (__KS_LOCKTEST|__KS_MPSTATS|__KS_NVLTTRACE) +KSVUNIPROC = 1 +KSVMPDEBUG = 2 +KSVMPNODEBUG = 3 +KSVFLAG = KSVUNIPROC +KSVFLAG = KSVMPDEBUG +KSVFLAG = KSVMPNODEBUG + +# Included from sys/ksinline.h +_A_SP_LOCKED = 1 +_A_SP_UNLOCKED = 0 +_A_INVPL = -1 +def _ATOMIC_INT_INCR(atomic_intp): return \ + +def _ATOMIC_INT_DECR(atomic_intp): return \ + +def ATOMIC_INT_READ(atomic_intp): return _ATOMIC_INT_READ(atomic_intp) + +def ATOMIC_INT_INCR(atomic_intp): return _ATOMIC_INT_INCR(atomic_intp) + +def ATOMIC_INT_DECR(atomic_intp): return _ATOMIC_INT_DECR(atomic_intp) + +def FSPIN_INIT(lp): return + +def FSPIN_LOCK(l): return DISABLE() + +def FSPIN_TRYLOCK(l): return (DISABLE(), B_TRUE) + +def FSPIN_UNLOCK(l): return ENABLE() + +def LOCK_DEINIT(lp): return + +def LOCK_DEALLOC(lp): return + +def LOCK_OWNED(lp): return (B_TRUE) + +def RW_DEINIT(lp): return + +def RW_DEALLOC(lp): return + +def RW_OWNED(lp): return (B_TRUE) + +def IS_LOCKED(lockp): return B_FALSE + +def LOCK_PLMIN(lockp): return \ + +def TRYLOCK_PLMIN(lockp): return LOCK_PLMIN(lockp) + +def LOCK_SH_PLMIN(lockp): return LOCK_PLMIN(lockp) + +def RW_RDLOCK_PLMIN(lockp): return LOCK_PLMIN(lockp) + +def RW_WRLOCK_PLMIN(lockp): return LOCK_PLMIN(lockp) + +def LOCK_DEINIT(l): return + +def LOCK_PLMIN(lockp): return LOCK((lockp), PLMIN) + +def TRYLOCK_PLMIN(lockp): return TRYLOCK((lockp), PLMIN) + +def LOCK_SH_PLMIN(lockp): return LOCK_SH((lockp), PLMIN) + +def RW_RDLOCK_PLMIN(lockp): return RW_RDLOCK((lockp), PLMIN) + +def RW_WRLOCK_PLMIN(lockp): return RW_WRLOCK((lockp), PLMIN) + +def FSPIN_IS_LOCKED(fsp): return B_FALSE + +def SPIN_IS_LOCKED(lockp): return B_FALSE + +def FSPIN_OWNED(l): return (B_TRUE) + +CR_MLDREAL = 0x00000001 +CR_RDUMP = 0x00000002 +def crhold(credp): return crholdn((credp), 1) + +def crfree(credp): return crfreen((credp), 1) + + +# Included from sys/strmdep.h +def str_aligned(X): return (((uint)(X) & (sizeof(int) - 1)) == 0) + + +# Included from sys/engine.h + +# Included from sys/clock.h + +# Included from sys/time.h +DST_NONE = 0 +DST_USA = 1 +DST_AUST = 2 +DST_WET = 3 +DST_MET = 4 +DST_EET = 5 +DST_CAN = 6 +DST_GB = 7 +DST_RUM = 8 +DST_TUR = 9 +DST_AUSTALT = 10 +ITIMER_REAL = 0 +ITIMER_VIRTUAL = 1 +ITIMER_PROF = 2 +FD_SETSIZE = 4096 +FD_NBBY = 8 + +# Included from time.h +NULL = 0 +CLOCKS_PER_SEC = 1000000 + +# Included from sys/clock_p.h +CGBITS = 4 +IDBITS = 28 +def toid_unpackcg(idval): return (((idval) >> IDBITS) & 0xf) + +def toid_unpackid(idval): return ((idval) & 0xfffffff) + +def toid_unpackcg(idval): return 0 + +def toid_unpackid(idval): return (idval) + +NCALLOUT_HASH = 1024 +CALLOUT_MAXVAL = 0x7fffffff +TO_PERIODIC = 0x80000000 +TO_IMMEDIATE = 0x80000000 +SEC = 1 +MILLISEC = 1000 +MICROSEC = 1000000 +NANOSEC = 1000000000 +SECHR = (60*60) +SECDAY = (24*SECHR) +SECYR = (365*SECDAY) +def TIME_OWNED_R(cgnum): return (B_TRUE) + +LOOPSECONDS = 1800 +LOOPMICROSECONDS = (LOOPSECONDS * MICROSEC) +def TICKS_SINCE(t): return TICKS_BETWEEN(t, TICKS()) + +MAXRQS = 2 +E_OFFLINE = 0x01 +E_BAD = 0x02 +E_SHUTDOWN = 0x04 +E_DRIVER = 0x08 +E_DEFAULTKEEP = 0x100 +E_DRIVERBOUND = 0x200 +E_EXCLUSIVE = 0x400 +E_CGLEADER = 0x800 +E_NOWAY = (E_OFFLINE|E_BAD|E_SHUTDOWN) +E_BOUND = 0x01 +E_GLOBAL = 0x00 +E_UNAVAIL = -1 +ENGINE_ONLINE = 1 +def PROCESSOR_UNMAP(e): return ((e) - engine) + +BOOTENG = 0 +QMOVED = 0x0001 +QWANTR = 0x0002 +QWANTW = 0x0004 +QFULL = 0x0008 +QREADR = 0x0010 +QUSE = 0x0020 +QNOENB = 0x0040 +QUP = 0x0080 +QBACK = 0x0100 +QINTER = 0x0200 +QPROCSON = 0x0400 +QTOENAB = 0x0800 +QFREEZE = 0x1000 +QBOUND = 0x2000 +QDEFCNT = 0x4000 +QENAB = 0x0001 +QSVCBUSY = 0x0002 +STRM_PUTCNT_TABLES = 31 +def STRM_MYENG_PUTCNT(sdp): return STRM_PUTCNT(l.eng_num, sdp) + +QB_FULL = 0x01 +QB_WANTW = 0x02 +QB_BACK = 0x04 +NBAND = 256 +DB_WASDUPED = 0x1 +DB_2PIECE = 0x2 +STRLEAKHASHSZ = 1021 +MSGMARK = 0x01 +MSGNOLOOP = 0x02 +MSGDELIM = 0x04 +MSGNOGET = 0x08 +MSGLOG = 0x10 +M_DATA = 0x00 +M_PROTO = 0x01 +M_BREAK = 0x08 +M_PASSFP = 0x09 +M_SIG = 0x0b +M_DELAY = 0x0c +M_CTL = 0x0d +M_IOCTL = 0x0e +M_SETOPTS = 0x10 +M_RSE = 0x11 +M_TRAIL = 0x12 +M_IOCACK = 0x81 +M_IOCNAK = 0x82 +M_PCPROTO = 0x83 +M_PCSIG = 0x84 +M_READ = 0x85 +M_FLUSH = 0x86 +M_STOP = 0x87 +M_START = 0x88 +M_HANGUP = 0x89 +M_ERROR = 0x8a +M_COPYIN = 0x8b +M_COPYOUT = 0x8c +M_IOCDATA = 0x8d +M_PCRSE = 0x8e +M_STOPI = 0x8f +M_STARTI = 0x90 +M_PCCTL = 0x91 +M_PCSETOPTS = 0x92 +QNORM = 0x00 +QPCTL = 0x80 +STRCANON = 0x01 +RECOPY = 0x02 +SO_ALL = 0x003f +SO_READOPT = 0x0001 +SO_WROFF = 0x0002 +SO_MINPSZ = 0x0004 +SO_MAXPSZ = 0x0008 +SO_HIWAT = 0x0010 +SO_LOWAT = 0x0020 +SO_MREADON = 0x0040 +SO_MREADOFF = 0x0080 +SO_NDELON = 0x0100 +SO_NDELOFF = 0x0200 +SO_ISTTY = 0x0400 +SO_ISNTTY = 0x0800 +SO_TOSTOP = 0x1000 +SO_TONSTOP = 0x2000 +SO_BAND = 0x4000 +SO_DELIM = 0x8000 +SO_NODELIM = 0x010000 +SO_STRHOLD = 0x020000 +SO_LOOP = 0x040000 +DRVOPEN = 0x0 +MODOPEN = 0x1 +CLONEOPEN = 0x2 +OPENFAIL = -1 +BPRI_LO = 1 +BPRI_MED = 2 +BPRI_HI = 3 +INFPSZ = -1 +FLUSHALL = 1 +FLUSHDATA = 0 +STRHIGH = 5120 +STRLOW = 1024 +MAXIOCBSZ = 1024 +def straln(a): return (caddr_t)((long)(a) & ~(sizeof(int)-1)) + +IPM_ID = 200 +ICMPM_ID = 201 +TCPM_ID = 202 +UDPM_ID = 203 +ARPM_ID = 204 +APPM_ID = 205 +RIPM_ID = 206 +PPPM_ID = 207 +AHDLCM_ID = 208 +MHDLCRIPM_ID = 209 +HDLCM_ID = 210 +PPCID_ID = 211 +IGMPM_ID = 212 +IPIPM_ID = 213 +IPPROTO_IP = 0 +IPPROTO_HOPOPTS = 0 +IPPROTO_ICMP = 1 +IPPROTO_IGMP = 2 +IPPROTO_GGP = 3 +IPPROTO_IPIP = 4 +IPPROTO_TCP = 6 +IPPROTO_EGP = 8 +IPPROTO_PUP = 12 +IPPROTO_UDP = 17 +IPPROTO_IDP = 22 +IPPROTO_TP = 29 +IPPROTO_IPV6 = 41 +IPPROTO_ROUTING = 43 +IPPROTO_FRAGMENT = 44 +IPPROTO_ESP = 50 +IPPROTO_AH = 51 +IPPROTO_ICMPV6 = 58 +IPPROTO_NONE = 59 +IPPROTO_DSTOPTS = 60 +IPPROTO_HELLO = 63 +IPPROTO_ND = 77 +IPPROTO_EON = 80 +IPPROTO_RAW = 255 +IPPROTO_MAX = 256 +IPPORT_ECHO = 7 +IPPORT_DISCARD = 9 +IPPORT_SYSTAT = 11 +IPPORT_DAYTIME = 13 +IPPORT_NETSTAT = 15 +IPPORT_FTP = 21 +IPPORT_TELNET = 23 +IPPORT_SMTP = 25 +IPPORT_TIMESERVER = 37 +IPPORT_NAMESERVER = 42 +IPPORT_WHOIS = 43 +IPPORT_MTP = 57 +IPPORT_TFTP = 69 +IPPORT_RJE = 77 +IPPORT_FINGER = 79 +IPPORT_TTYLINK = 87 +IPPORT_SUPDUP = 95 +IPPORT_EXECSERVER = 512 +IPPORT_LOGINSERVER = 513 +IPPORT_CMDSERVER = 514 +IPPORT_EFSSERVER = 520 +IPPORT_BIFFUDP = 512 +IPPORT_WHOSERVER = 513 +IPPORT_ROUTESERVER = 520 +IPPORT_RESERVED = 1024 +IPPORT_USERRESERVED = 65535 +IPPORT_RESERVED_LOW = 512 +IPPORT_RESERVED_HIGH = 1023 +IPPORT_USERRESERVED_LOW = 32768 +IPPORT_USERRESERVED_HIGH = 65535 +INET_ADDRSTRLEN = 16 +IP_OPTIONS = 1 +IP_TOS = 2 +IP_TTL = 3 +IP_HDRINCL = 4 +IP_RECVOPTS = 5 +IP_RECVRETOPTS = 6 +IP_RECVDSTADDR = 7 +IP_RETOPTS = 8 +IP_MULTICAST_IF = 9 +IP_MULTICAST_LOOP = 10 +IP_ADD_MEMBERSHIP = 11 +IP_DROP_MEMBERSHIP = 12 +IP_BROADCAST_IF = 14 +IP_RECVIFINDEX = 15 +IP_MULTICAST_TTL = 16 +MRT_INIT = 17 +MRT_DONE = 18 +MRT_ADD_VIF = 19 +MRT_DEL_VIF = 20 +MRT_ADD_MFC = 21 +MRT_DEL_MFC = 22 +MRT_VERSION = 23 +IP_DEFAULT_MULTICAST_TTL = 1 +IP_DEFAULT_MULTICAST_LOOP = 1 +IP_MAX_MEMBERSHIPS = 20 +INADDR_UNSPEC_GROUP = 0xe0000000 +INADDR_ALLHOSTS_GROUP = 0xe0000001 +INADDR_ALLRTRS_GROUP = 0xe0000002 +INADDR_MAX_LOCAL_GROUP = 0xe00000ff + +# Included from netinet/in_mp.h + +# Included from netinet/in_mp_ddi.h + +# Included from sys/inline.h +IP_HIER_BASE = (20) +def ASSERT_LOCK(x): return + +def ASSERT_WRLOCK(x): return + +def ASSERT_UNLOCK(x): return + +def CANPUT(q): return canput((q)) + +def CANPUTNEXT(q): return canputnext((q)) + +INET_DEBUG = 1 diff --git a/Lib/plat-unixware7/SOCKET.py b/Lib/plat-unixware7/SOCKET.py new file mode 100644 index 0000000..fe093a1 --- /dev/null +++ b/Lib/plat-unixware7/SOCKET.py @@ -0,0 +1,267 @@ +# Generated by h2py from /usr/include/sys/socket.h + +# Included from sys/byteorder.h +LITTLE_ENDIAN = 1234 +BIG_ENDIAN = 4321 +PDP_ENDIAN = 3412 + +# Included from sys/byteorder_f.h +BYTE_ORDER = LITTLE_ENDIAN +def htonl(hl): return __htonl(hl) + +def ntohl(nl): return __ntohl(nl) + +def htons(hs): return __htons(hs) + +def ntohs(ns): return __ntohs(ns) + +def ntohl(x): return (x) + +def ntohs(x): return (x) + +def htonl(x): return (x) + +def htons(x): return (x) + + +# Included from sys/types.h +def quad_low(x): return x.val[0] + +ADT_EMASKSIZE = 8 +SHRT_MIN = -32768 +SHRT_MAX = 32767 +INT_MIN = (-2147483647-1) +INT_MAX = 2147483647 +LONG_MIN = (-2147483647-1) +LONG_MAX = 2147483647 +OFF32_MAX = LONG_MAX +ISTAT_ASSERTED = 0 +ISTAT_ASSUMED = 1 +ISTAT_NONE = 2 +OFF_MAX = OFF32_MAX +CLOCK_MAX = LONG_MAX +P_MYID = (-1) +P_MYHOSTID = (-1) + +# Included from sys/select.h +FD_SETSIZE = 4096 +NBBY = 8 +NULL = 0 + +# Included from sys/bitypes.h + +# Included from sys/convsa.h +__NETLIB_UW211_SVR4 = 1 +__NETLIB_UW211_XPG4 = 2 +__NETLIB_GEMINI_SVR4 = 3 +__NETLIB_GEMINI_XPG4 = 4 +__NETLIB_FP1_SVR4 = 5 +__NETLIB_FP1_XPG4 = 6 +__NETLIB_BASE_VERSION__ = __NETLIB_UW211_SVR4 +__NETLIB_VERSION__ = __NETLIB_FP1_SVR4 +__NETLIB_VERSION__ = __NETLIB_FP1_XPG4 +__NETLIB_VERSION__ = __NETLIB_GEMINI_SVR4 +__NETLIB_VERSION__ = __NETLIB_GEMINI_XPG4 +__NETLIB_VERSION__ = __NETLIB_UW211_SVR4 +__NETLIB_VERSION__ = __NETLIB_UW211_XPG4 +__NETLIB_VERSION__ = __NETLIB_FP1_XPG4 +def __NETLIB_VERSION_IS_XPG4(version): return (((version) % 2) == 0) + +def __NETLIB_VERSION_HAS_SALEN(version): return ((version) >= __NETLIB_GEMINI_SVR4) + +def __NETLIB_VERSION_IS_IKS(version): return ((version) >= __NETLIB_FP1_SVR4) + +def SA_FAMILY_GET(sa): return \ + + +# Included from sys/uio.h +SHUT_RD = 0 +SHUT_WR = 1 +SHUT_RDWR = 2 + +# Included from sys/netconfig.h + +# Included from sys/cdefs.h +def __P(protos): return protos + +def __STRING(x): return #x + +def __P(protos): return () + +def __STRING(x): return "x" + +NETCONFIG = "/etc/netconfig" +NETPATH = "NETPATH" +NC_TPI_CLTS = 1 +NC_TPI_COTS = 2 +NC_TPI_COTS_ORD = 3 +NC_TPI_RAW = 4 +NC_NOFLAG = 00 +NC_VISIBLE = 01 +NC_BROADCAST = 02 +NC_NOPROTOFMLY = "-" +NC_LOOPBACK = "loopback" +NC_INET = "inet" +NC_INET6 = "inet6" +NC_IMPLINK = "implink" +NC_PUP = "pup" +NC_CHAOS = "chaos" +NC_NS = "ns" +NC_NBS = "nbs" +NC_ECMA = "ecma" +NC_DATAKIT = "datakit" +NC_CCITT = "ccitt" +NC_SNA = "sna" +NC_DECNET = "decnet" +NC_DLI = "dli" +NC_LAT = "lat" +NC_HYLINK = "hylink" +NC_APPLETALK = "appletalk" +NC_NIT = "nit" +NC_IEEE802 = "ieee802" +NC_OSI = "osi" +NC_X25 = "x25" +NC_OSINET = "osinet" +NC_GOSIP = "gosip" +NC_NETWARE = "netware" +NC_NOPROTO = "-" +NC_TCP = "tcp" +NC_UDP = "udp" +NC_ICMP = "icmp" +NC_IPX = "ipx" +NC_SPX = "spx" +NC_TPI_CLTS = 1 +NC_TPI_COTS = 2 +NC_TPI_COTS_ORD = 3 +NC_TPI_RAW = 4 +SOCK_STREAM = 2 +SOCK_DGRAM = 1 +SOCK_RAW = 4 +SOCK_RDM = 5 +SOCK_SEQPACKET = 6 +SO_DEBUG = 0x0001 +SO_ACCEPTCONN = 0x0002 +SO_REUSEADDR = 0x0004 +SO_KEEPALIVE = 0x0008 +SO_DONTROUTE = 0x0010 +SO_BROADCAST = 0x0020 +SO_USELOOPBACK = 0x0040 +SO_LINGER = 0x0080 +SO_OOBINLINE = 0x0100 +SO_ORDREL = 0x0200 +SO_IMASOCKET = 0x0400 +SO_MGMT = 0x0800 +SO_REUSEPORT = 0x1000 +SO_LISTENING = 0x2000 +SO_RDWR = 0x4000 +SO_SEMA = 0x8000 +SO_DONTLINGER = (~SO_LINGER) +SO_SNDBUF = 0x1001 +SO_RCVBUF = 0x1002 +SO_SNDLOWAT = 0x1003 +SO_RCVLOWAT = 0x1004 +SO_SNDTIMEO = 0x1005 +SO_RCVTIMEO = 0x1006 +SO_ERROR = 0x1007 +SO_TYPE = 0x1008 +SO_PROTOTYPE = 0x1009 +SO_ALLRAW = 0x100a +SOL_SOCKET = 0xffff +AF_UNSPEC = 0 +AF_UNIX = 1 +AF_LOCAL = AF_UNIX +AF_INET = 2 +AF_IMPLINK = 3 +AF_PUP = 4 +AF_CHAOS = 5 +AF_NS = 6 +AF_NBS = 7 +AF_ECMA = 8 +AF_DATAKIT = 9 +AF_CCITT = 10 +AF_SNA = 11 +AF_DECnet = 12 +AF_DLI = 13 +AF_LAT = 14 +AF_HYLINK = 15 +AF_APPLETALK = 16 +AF_NIT = 17 +AF_802 = 18 +AF_OSI = 19 +AF_ISO = AF_OSI +AF_X25 = 20 +AF_OSINET = 21 +AF_GOSIP = 22 +AF_YNET = 23 +AF_ROUTE = 24 +AF_LINK = 25 +pseudo_AF_XTP = 26 +AF_INET6 = 27 +AF_MAX = 27 +AF_INET_BSWAP = 0x0200 +PF_UNSPEC = AF_UNSPEC +PF_UNIX = AF_UNIX +PF_LOCAL = AF_LOCAL +PF_INET = AF_INET +PF_IMPLINK = AF_IMPLINK +PF_PUP = AF_PUP +PF_CHAOS = AF_CHAOS +PF_NS = AF_NS +PF_NBS = AF_NBS +PF_ECMA = AF_ECMA +PF_DATAKIT = AF_DATAKIT +PF_CCITT = AF_CCITT +PF_SNA = AF_SNA +PF_DECnet = AF_DECnet +PF_DLI = AF_DLI +PF_LAT = AF_LAT +PF_HYLINK = AF_HYLINK +PF_APPLETALK = AF_APPLETALK +PF_NIT = AF_NIT +PF_802 = AF_802 +PF_OSI = AF_OSI +PF_ISO = PF_OSI +PF_X25 = AF_X25 +PF_OSINET = AF_OSINET +PF_GOSIP = AF_GOSIP +PF_YNET = AF_YNET +PF_ROUTE = AF_ROUTE +PF_LINK = AF_LINK +pseudo_PF_XTP = pseudo_AF_XTP +PF_INET6 = AF_INET6 +PF_MAX = AF_MAX +SOMAXCONN = 5 +SCM_RIGHTS = 1 +MSG_OOB = 0x1 +MSG_PEEK = 0x2 +MSG_DONTROUTE = 0x4 +MSG_CTRUNC = 0x8 +MSG_TRUNC = 0x10 +MSG_EOR = 0x30 +MSG_WAITALL = 0x20 +MSG_MAXIOVLEN = 16 +def OPTLEN(x): return ((((x) + sizeof(long) - 1) / sizeof(long)) * sizeof(long)) + +GIARG = 0x1 +CONTI = 0x2 +GITAB = 0x4 +SOCKETSYS = 88 +SOCKETSYS = 83 +SO_ACCEPT = 1 +SO_BIND = 2 +SO_CONNECT = 3 +SO_GETPEERNAME = 4 +SO_GETSOCKNAME = 5 +SO_GETSOCKOPT = 6 +SO_LISTEN = 7 +SO_RECV = 8 +SO_RECVFROM = 9 +SO_SEND = 10 +SO_SENDTO = 11 +SO_SETSOCKOPT = 12 +SO_SHUTDOWN = 13 +SO_SOCKET = 14 +SO_SOCKPOLL = 15 +SO_GETIPDOMAIN = 16 +SO_SETIPDOMAIN = 17 +SO_ADJTIME = 18 diff --git a/Lib/plat-unixware7/STROPTS.py b/Lib/plat-unixware7/STROPTS.py new file mode 100644 index 0000000..0f0cb25 --- /dev/null +++ b/Lib/plat-unixware7/STROPTS.py @@ -0,0 +1,328 @@ +# Generated by h2py from /usr/include/sys/stropts.h + +# Included from sys/types.h +def quad_low(x): return x.val[0] + +ADT_EMASKSIZE = 8 +SHRT_MIN = -32768 +SHRT_MAX = 32767 +INT_MIN = (-2147483647-1) +INT_MAX = 2147483647 +LONG_MIN = (-2147483647-1) +LONG_MAX = 2147483647 +OFF32_MAX = LONG_MAX +ISTAT_ASSERTED = 0 +ISTAT_ASSUMED = 1 +ISTAT_NONE = 2 +OFF_MAX = OFF32_MAX +CLOCK_MAX = LONG_MAX +P_MYID = (-1) +P_MYHOSTID = (-1) + +# Included from sys/select.h +FD_SETSIZE = 4096 +NBBY = 8 +NULL = 0 + +# Included from sys/conf.h +D_NEW = 0x00 +D_OLD = 0x01 +D_DMA = 0x02 +D_BLKOFF = 0x400 +D_LFS = 0x8000 +D_STR = 0x0800 +D_MOD = 0x1000 +D_PSEUDO = 0x2000 +D_RANDOM = 0x4000 +D_HOT = 0x10000 +D_SEEKNEG = 0x04 +D_TAPE = 0x08 +D_NOBRKUP = 0x10 +D_INITPUB = 0x20 +D_NOSPECMACDATA = 0x40 +D_RDWEQ = 0x80 +SECMASK = (D_INITPUB|D_NOSPECMACDATA|D_RDWEQ) +DAF_REQDMA = 0x1 +DAF_PHYSREQ = 0x2 +DAF_PRE8 = 0x4 +DAF_STATIC = 0x8 +DAF_STR = 0x10 +D_MP = 0x100 +D_UPF = 0x200 +ROOTFS_NAMESZ = 7 +FMNAMESZ = 8 +MCD_VERSION = 1 +DI_BCBP = 0 +DI_MEDIA = 1 + +# Included from sys/secsys.h +ES_MACOPENLID = 1 +ES_MACSYSLID = 2 +ES_MACROOTLID = 3 +ES_PRVINFO = 4 +ES_PRVSETCNT = 5 +ES_PRVSETS = 6 +ES_MACADTLID = 7 +ES_PRVID = 8 +ES_TPGETMAJOR = 9 +SA_EXEC = 001 +SA_WRITE = 002 +SA_READ = 004 +SA_SUBSIZE = 010 + +# Included from sys/stropts_f.h +X_STR = (ord('S')<<8) +X_I_BASE = (X_STR|0200) +X_I_NREAD = (X_STR|0201) +X_I_PUSH = (X_STR|0202) +X_I_POP = (X_STR|0203) +X_I_LOOK = (X_STR|0204) +X_I_FLUSH = (X_STR|0205) +X_I_SRDOPT = (X_STR|0206) +X_I_GRDOPT = (X_STR|0207) +X_I_STR = (X_STR|0210) +X_I_SETSIG = (X_STR|0211) +X_I_GETSIG = (X_STR|0212) +X_I_FIND = (X_STR|0213) +X_I_LINK = (X_STR|0214) +X_I_UNLINK = (X_STR|0215) +X_I_PEEK = (X_STR|0217) +X_I_FDINSERT = (X_STR|0220) +X_I_SENDFD = (X_STR|0221) +X_I_RECVFD = (X_STR|0222) + +# Included from unistd.h + +# Included from sys/unistd.h +R_OK = 004 +W_OK = 002 +X_OK = 001 +F_OK = 000 +EFF_ONLY_OK = 010 +EX_OK = 020 +SEEK_SET = 0 +SEEK_CUR = 1 +SEEK_END = 2 +_SC_ARG_MAX = 1 +_SC_CHILD_MAX = 2 +_SC_CLK_TCK = 3 +_SC_NGROUPS_MAX = 4 +_SC_OPEN_MAX = 5 +_SC_JOB_CONTROL = 6 +_SC_SAVED_IDS = 7 +_SC_VERSION = 8 +_SC_PASS_MAX = 9 +_SC_LOGNAME_MAX = 10 +_SC_PAGESIZE = 11 +_SC_PAGE_SIZE = _SC_PAGESIZE +_SC_XOPEN_VERSION = 12 +_SC_NACLS_MAX = 13 +_SC_NPROCESSORS_CONF = 14 +_SC_NPROCESSORS_ONLN = 15 +_SC_NPROCESSES = 39 +_SC_TOTAL_MEMORY = 40 +_SC_USEABLE_MEMORY = 41 +_SC_GENERAL_MEMORY = 42 +_SC_DEDICATED_MEMORY = 43 +_SC_NCGS_CONF = 44 +_SC_NCGS_ONLN = 45 +_SC_MAX_CPUS_PER_CG = 46 +_SC_CG_SIMPLE_IMPL = 47 +_SC_CACHE_LINE = 48 +_SC_SYSTEM_ID = 49 +_SC_THREADS = 51 +_SC_THREAD_ATTR_STACKADDR = 52 +_SC_THREAD_ATTR_STACKSIZE = 53 +_SC_THREAD_DESTRUCTOR_ITERATIONS = 54 +_SC_THREAD_KEYS_MAX = 55 +_SC_THREAD_PRIORITY_SCHEDULING = 56 +_SC_THREAD_PRIO_INHERIT = 57 +_SC_THREAD_PRIO_PROTECT = 58 +_SC_THREAD_STACK_MIN = 59 +_SC_THREAD_PROCESS_SHARED = 60 +_SC_THREAD_SAFE_FUNCTIONS = 61 +_SC_THREAD_THREADS_MAX = 62 +_SC_KERNEL_VM = 63 +_SC_TZNAME_MAX = 320 +_SC_STREAM_MAX = 321 +_SC_XOPEN_CRYPT = 323 +_SC_XOPEN_ENH_I18N = 324 +_SC_XOPEN_SHM = 325 +_SC_XOPEN_XCU_VERSION = 327 +_SC_AES_OS_VERSION = 330 +_SC_ATEXIT_MAX = 331 +_SC_2_C_BIND = 350 +_SC_2_C_DEV = 351 +_SC_2_C_VERSION = 352 +_SC_2_CHAR_TERM = 353 +_SC_2_FORT_DEV = 354 +_SC_2_FORT_RUN = 355 +_SC_2_LOCALEDEF = 356 +_SC_2_SW_DEV = 357 +_SC_2_UPE = 358 +_SC_2_VERSION = 359 +_SC_BC_BASE_MAX = 370 +_SC_BC_DIM_MAX = 371 +_SC_BC_SCALE_MAX = 372 +_SC_BC_STRING_MAX = 373 +_SC_COLL_WEIGHTS_MAX = 380 +_SC_EXPR_NEST_MAX = 381 +_SC_LINE_MAX = 382 +_SC_RE_DUP_MAX = 383 +_SC_IOV_MAX = 390 +_SC_NPROC_CONF = 391 +_SC_NPROC_ONLN = 392 +_SC_XOPEN_UNIX = 400 +_SC_SEMAPHORES = 440 +_CS_PATH = 1 +__O_CS_HOSTNAME = 2 +_CS_RELEASE = 3 +_CS_VERSION = 4 +__O_CS_MACHINE = 5 +__O_CS_ARCHITECTURE = 6 +_CS_HW_SERIAL = 7 +__O_CS_HW_PROVIDER = 8 +_CS_SRPC_DOMAIN = 9 +_CS_INITTAB_NAME = 10 +__O_CS_SYSNAME = 11 +_CS_LFS_CFLAGS = 20 +_CS_LFS_LDFLAGS = 21 +_CS_LFS_LIBS = 22 +_CS_LFS_LINTFLAGS = 23 +_CS_LFS64_CFLAGS = 24 +_CS_LFS64_LDFLAGS = 25 +_CS_LFS64_LIBS = 26 +_CS_LFS64_LINTFLAGS = 27 +_CS_ARCHITECTURE = 100 +_CS_BUSTYPES = 101 +_CS_HOSTNAME = 102 +_CS_HW_PROVIDER = 103 +_CS_KERNEL_STAMP = 104 +_CS_MACHINE = 105 +_CS_OS_BASE = 106 +_CS_OS_PROVIDER = 107 +_CS_SYSNAME = 108 +_CS_USER_LIMIT = 109 +_PC_LINK_MAX = 1 +_PC_MAX_CANON = 2 +_PC_MAX_INPUT = 3 +_PC_NAME_MAX = 4 +_PC_PATH_MAX = 5 +_PC_PIPE_BUF = 6 +_PC_NO_TRUNC = 7 +_PC_VDISABLE = 8 +_PC_CHOWN_RESTRICTED = 9 +_PC_FILESIZEBITS = 10 +_POSIX_VERSION = 199009L +_XOPEN_VERSION = 4 +GF_PATH = "/etc/group" +PF_PATH = "/etc/passwd" +F_ULOCK = 0 +F_LOCK = 1 +F_TLOCK = 2 +F_TEST = 3 +_POSIX_JOB_CONTROL = 1 +_POSIX_SAVED_IDS = 1 +_POSIX_VDISABLE = 0 +NULL = 0 +STDIN_FILENO = 0 +STDOUT_FILENO = 1 +STDERR_FILENO = 2 +_XOPEN_UNIX = 1 +_XOPEN_ENH_I18N = 1 +_XOPEN_XPG4 = 1 +_POSIX2_C_VERSION = 199209L +_POSIX2_VERSION = 199209L +_XOPEN_XCU_VERSION = 4 +_POSIX_SEMAPHORES = 1 +_POSIX_THREADS = 1 +_POSIX_THREAD_ATTR_STACKADDR = 1 +_POSIX_THREAD_ATTR_STACKSIZE = 1 +_POSIX_THREAD_PRIORITY_SCHEDULING = 1 +_POSIX_THREAD_PROCESS_SHARED = 1 +_POSIX_THREAD_SAFE_FUNCTIONS = 1 +_POSIX2_C_BIND = 1 +_POSIX2_CHAR_TERM = 1 +_POSIX2_FORT_RUN = 1 +_POSIX2_LOCALEDEF = 1 +_POSIX2_UPE = 1 +_LFS_ASYNCHRONOUS_IO = 1 +_LFS_LARGEFILE = 1 +_LFS64_ASYNCHRONOUS_IO = 1 +_LFS64_LARGEFILE = 1 +_LFS64_STDIO = 1 +FMNAMESZ = 8 +SNDZERO = 0x001 +SNDPIPE = 0x002 +RNORM = 0x000 +RMSGD = 0x001 +RMSGN = 0x002 +RMODEMASK = 0x003 +RPROTDAT = 0x004 +RPROTDIS = 0x008 +RPROTNORM = 0x010 +RPROTMASK = 0x01c +FLUSHR = 0x01 +FLUSHW = 0x02 +FLUSHRW = 0x03 +FLUSHBAND = 0x04 +S_INPUT = 0x0001 +S_HIPRI = 0x0002 +S_OUTPUT = 0x0004 +S_MSG = 0x0008 +S_ERROR = 0x0010 +S_HANGUP = 0x0020 +S_RDNORM = 0x0040 +S_WRNORM = S_OUTPUT +S_RDBAND = 0x0080 +S_WRBAND = 0x0100 +S_BANDURG = 0x0200 +RS_HIPRI = 0x01 +MSG_HIPRI = 0x01 +MSG_ANY = 0x02 +MSG_BAND = 0x04 +MSG_DISCARD = 0x08 +MSG_PEEKIOCTL = 0x10 +MORECTL = 1 +MOREDATA = 2 +MUXID_ALL = (-1) +ANYMARK = 0x01 +LASTMARK = 0x02 +STR = (ord('S')<<8) +I_NREAD = (STR|01) +I_PUSH = (STR|02) +I_POP = (STR|03) +I_LOOK = (STR|04) +I_FLUSH = (STR|05) +I_SRDOPT = (STR|06) +I_GRDOPT = (STR|07) +I_STR = (STR|010) +I_SETSIG = (STR|011) +I_GETSIG = (STR|012) +I_FIND = (STR|013) +I_LINK = (STR|014) +I_UNLINK = (STR|015) +I_PEEK = (STR|017) +I_FDINSERT = (STR|020) +I_SENDFD = (STR|021) +I_RECVFD = (STR|022) +I_E_RECVFD = (STR|016) +I_RECVFD = (STR|016) +I_RECVFD = (STR|022) +I_SWROPT = (STR|023) +I_GWROPT = (STR|024) +I_LIST = (STR|025) +I_PLINK = (STR|026) +I_PUNLINK = (STR|027) +I_FLUSHBAND = (STR|034) +I_CKBAND = (STR|035) +I_GETBAND = (STR|036) +I_ATMARK = (STR|037) +I_SETCLTIME = (STR|040) +I_GETCLTIME = (STR|041) +I_CANPUT = (STR|042) +I_S_RECVFD = (STR|043) +I_STATS = (STR|044) +I_BIGPIPE = (STR|045) +I_GETTP = (STR|046) +INFTIM = -1 diff --git a/Lib/plat-unixware7/TERMIOS.py b/Lib/plat-unixware7/TERMIOS.py new file mode 100644 index 0000000..38a962b --- /dev/null +++ b/Lib/plat-unixware7/TERMIOS.py @@ -0,0 +1,270 @@ +# Generated by h2py from /usr/include/termios.h + +# Included from sys/termios.h + +# Included from sys/types.h +def quad_low(x): return x.val[0] + +ADT_EMASKSIZE = 8 +SHRT_MIN = -32768 +SHRT_MAX = 32767 +INT_MIN = (-2147483647-1) +INT_MAX = 2147483647 +LONG_MIN = (-2147483647-1) +LONG_MAX = 2147483647 +OFF32_MAX = LONG_MAX +ISTAT_ASSERTED = 0 +ISTAT_ASSUMED = 1 +ISTAT_NONE = 2 +OFF_MAX = OFF32_MAX +CLOCK_MAX = LONG_MAX +P_MYID = (-1) +P_MYHOSTID = (-1) + +# Included from sys/select.h +FD_SETSIZE = 4096 +NBBY = 8 +NULL = 0 +NCC = 8 +NCCS = 19 +VINTR = 0 +VQUIT = 1 +VERASE = 2 +VKILL = 3 +VEOF = 4 +VEOL = 5 +VEOL2 = 6 +VMIN = 4 +VTIME = 5 +VSWTCH = 7 +VSTART = 8 +VSTOP = 9 +VSUSP = 10 +VDSUSP = 11 +VREPRINT = 12 +VDISCARD = 13 +VWERASE = 14 +VLNEXT = 15 +VCEOF = NCC +VCEOL = (NCC + 1) +_POSIX_VDISABLE = 0 +def CTRL(c): return ((c)&037) + +CINTR = ord('\177') +CQUIT = CTRL(ord('\\')) +CERASE = CTRL(ord('H')) +CKILL = CTRL(ord('U')) +CEOF = CTRL(ord('D')) +CEOL = _POSIX_VDISABLE +CEOL2 = _POSIX_VDISABLE +CNSWTCH = _POSIX_VDISABLE +CSTART = CTRL(ord('Q')) +CSTOP = CTRL(ord('S')) +CSUSP = CTRL(ord('Z')) +CDSUSP = CTRL(ord('Y')) +CREPRINT = CTRL(ord('R')) +CDISCARD = CTRL(ord('O')) +CWERASE = CTRL(ord('W')) +CLNEXT = CTRL(ord('V')) +CNUL = _POSIX_VDISABLE +CBRK = ord('\377') +CDEL = ord('\377') +CESC = ord('\\') +CEOT = CTRL(ord('D')) +CSWTCH = CTRL(ord('Z')) +CRPRNT = CREPRINT +CFLUSH = CDISCARD +IGNBRK = 0x00000001 +BRKINT = 0x00000002 +IGNPAR = 0x00000004 +PARMRK = 0x00000008 +INPCK = 0x00000010 +ISTRIP = 0x00000020 +INLCR = 0x00000040 +IGNCR = 0x00000080 +ICRNL = 0x00000100 +IUCLC = 0x00000200 +IXON = 0x00000400 +IXANY = 0x00000800 +IXOFF = 0x00001000 +IMAXBEL = 0x00002000 +DOSMODE = 0x00008000 +OPOST = 0x00000001 +OLCUC = 0x00000002 +ONLCR = 0x00000004 +OCRNL = 0x00000008 +ONOCR = 0x00000010 +ONLRET = 0x00000020 +OFILL = 0x00000040 +OFDEL = 0x00000080 +NLDLY = 0x00000100 +NL0 = 0 +NL1 = 0x00000100 +CRDLY = 0x00000600 +CR0 = 0 +CR1 = 0x00000200 +CR2 = 0x00000400 +CR3 = 0x00000600 +TABDLY = 0x00001800 +TAB0 = 0 +TAB1 = 0x00000800 +TAB2 = 0x00001000 +TAB3 = 0x00001800 +BSDLY = 0x00002000 +BS0 = 0 +BS1 = 0x00002000 +VTDLY = 0x00004000 +VT0 = 0 +VT1 = 0x00004000 +FFDLY = 0x00008000 +FF0 = 0 +FF1 = 0x00008000 +XTABS = TAB3 +PAGEOUT = 0x00010000 +WRAP = 0x00020000 +CBAUD = 0x0000000F +CSIZE = 0x00000030 +CS5 = 0 +CS6 = 0x00000010 +CS7 = 0x00000020 +CS8 = 0x00000030 +CSTOPB = 0x00000040 +CREAD = 0x00000080 +PARENB = 0x00000100 +PARODD = 0x00000200 +HUPCL = 0x00000400 +CLOCAL = 0x00000800 +RCV1EN = 0x00001000 +XMT1EN = 0x00002000 +LOBLK = 0x00004000 +XCLUDE = 0x00008000 +CIBAUD = 0x000F0000 +IBSHIFT = 16 +PAREXT = 0x00100000 +B0 = 0 +B50 = 1 +B75 = 2 +B110 = 3 +B134 = 4 +B150 = 5 +B200 = 6 +B300 = 7 +B600 = 8 +B1200 = 9 +B1800 = 10 +B2400 = 11 +B4800 = 12 +B9600 = 13 +B19200 = 14 +B38400 = 15 +EXTA = B19200 +EXTB = B38400 +ISIG = 0x00000001 +ICANON = 0x00000002 +XCASE = 0x00000004 +ECHO = 0x00000008 +ECHOE = 0x00000010 +ECHOK = 0x00000020 +ECHONL = 0x00000040 +NOFLSH = 0x00000080 +TOSTOP = 0x00000100 +ECHOCTL = 0x00000200 +ECHOPRT = 0x00000400 +ECHOKE = 0x00000800 +DEFECHO = 0x00001000 +FLUSHO = 0x00002000 +PENDIN = 0x00004000 +IEXTEN = 0x00008000 +IOCTYPE = 0xff00 +TIOC = (ord('T')<<8) +TCGETA = (TIOC|1) +TCSETA = (TIOC|2) +TCSETAW = (TIOC|3) +TCSETAF = (TIOC|4) +TCSBRK = (TIOC|5) +TCXONC = (TIOC|6) +TCFLSH = (TIOC|7) +TIOCKBON = (TIOC|8) +TIOCKBOF = (TIOC|9) +KBENABLED = (TIOC|10) +KB_XSCANCODE = 4 +KB_ISSCANCODE = 8 +TCDSET = (TIOC|32) +RTS_TOG = (TIOC|33) +TIOCGWINSZ = (TIOC|104) +TIOCSWINSZ = (TIOC|103) +TCGETS = (TIOC|13) +TCSETS = (TIOC|14) +TCSANOW = ((ord('T')<<8)|14) +TCSETSW = (TIOC|15) +TCSADRAIN = ((ord('T')<<8)|15) +TCSETSF = (TIOC|16) +TCSAFLUSH = ((ord('T')<<8)|16) +TCIFLUSH = 0 +TCOFLUSH = 1 +TCIOFLUSH = 2 +TCOOFF = 0 +TCOON = 1 +TCIOFF = 2 +TCION = 3 +tIOC = (ord('t')<<8) +TIOCGETD = (tIOC|0) +TIOCSETD = (tIOC|1) +TIOCHPCL = (tIOC|2) +TIOCGETP = (tIOC|8) +TIOCSETP = (tIOC|9) +TIOCSETN = (tIOC|10) +TIOCEXCL = (tIOC|13) +TIOCNXCL = (tIOC|14) +TIOCFLUSH = (tIOC|16) +TIOCSETC = (tIOC|17) +TIOCGETC = (tIOC|18) +TIOCLBIS = (tIOC|127) +TIOCLBIC = (tIOC|126) +TIOCLSET = (tIOC|125) +TIOCLGET = (tIOC|124) +TIOCSBRK = (tIOC|123) +TIOCCBRK = (tIOC|122) +TIOCSDTR = (tIOC|121) +TIOCCDTR = (tIOC|120) +TIOCSLTC = (tIOC|117) +TIOCGLTC = (tIOC|116) +TIOCOUTQ = (tIOC|115) +TIOCNOTTY = (tIOC|113) +TIOCSTOP = (tIOC|111) +TIOCSTART = (tIOC|110) +TIOCGPGRP = (tIOC|20) +TIOCSPGRP = (tIOC|21) +TIOCGSID = (tIOC|22) +TIOCSSID = (tIOC|24) +TIOCSTI = (tIOC|23) +TIOCMSET = (tIOC|26) +TIOCMBIS = (tIOC|27) +TIOCMBIC = (tIOC|28) +TIOCMGET = (tIOC|29) +TIOCM_LE = 0x0001 +TIOCM_DTR = 0x0002 +TIOCM_RTS = 0x0004 +TIOCM_ST = 0x0008 +TIOCM_SR = 0x0010 +TIOCM_CTS = 0x0020 +TIOCM_CAR = 0x0040 +TIOCM_CD = TIOCM_CAR +TIOCM_RNG = 0x0080 +TIOCM_RI = TIOCM_RNG +TIOCM_DSR = 0x0100 +TIOCREMOTE = (tIOC|30) +TIOCSIGNAL = (tIOC|31) +LDIOC = (ord('D')<<8) +LDOPEN = (LDIOC|0) +LDCLOSE = (LDIOC|1) +LDCHG = (LDIOC|2) +LDGETT = (LDIOC|8) +LDSETT = (LDIOC|9) +LDSMAP = (LDIOC|10) +LDGMAP = (LDIOC|11) +LDNMAP = (LDIOC|12) +DIOC = (ord('d')<<8) +DIOCGETP = (DIOC|8) +DIOCSETP = (DIOC|9) +FIORDCHK = ((ord('f')<<8)|3) diff --git a/Lib/plat-unixware7/regen b/Lib/plat-unixware7/regen new file mode 100755 index 0000000..725b230 --- /dev/null +++ b/Lib/plat-unixware7/regen @@ -0,0 +1,12 @@ +#! /bin/sh +case `uname -sr` in +UnixWare*) ;; +*) echo Probably not on a UnixWare system 1>&2 + exit 1;; +esac +set -v +h2py /usr/include/sys/fcntl.h +h2py /usr/include/sys/socket.h +h2py -i '(u_long)' /usr/include/netinet/in.h +h2py /usr/include/termios.h +h2py /usr/include/sys/stropts.h diff --git a/Lib/test/test_fcntl.py b/Lib/test/test_fcntl.py index 3da079d..1fa0aa2 100755 --- a/Lib/test/test_fcntl.py +++ b/Lib/test/test_fcntl.py @@ -21,7 +21,7 @@ if sys.platform in ('netbsd1', 'Darwin1.2', 'darwin1', 'bsdos2', 'bsdos3', 'bsdos4', 'openbsd', 'openbsd2'): lockdata = struct.pack('lxxxxlxxxxlhh', 0, 0, 0, FCNTL.F_WRLCK, 0) -elif sys.platform in ['aix3', 'aix4', 'hp-uxB']: +elif sys.platform in ['aix3', 'aix4', 'hp-uxB', 'unixware7']: lockdata = struct.pack('hhlllii', FCNTL.F_WRLCK, 0, 0, 0, 0, 0, 0) else: lockdata = struct.pack('hhllhh', FCNTL.F_WRLCK, 0, 0, 0, 0, 0) diff --git a/Lib/test/test_fork1.py b/Lib/test/test_fork1.py index de9f7a9..51e6c58 100644 --- a/Lib/test/test_fork1.py +++ b/Lib/test/test_fork1.py @@ -48,7 +48,10 @@ def main(): prefork_lives = alive.copy() - cpid = os.fork() + if sys.platform in ['unixware7']: + cpid = os.fork1() + else: + cpid = os.fork() if cpid == 0: # Child diff --git a/Lib/test/test_math.py b/Lib/test/test_math.py index 8419a1f..6f742bf 100644 --- a/Lib/test/test_math.py +++ b/Lib/test/test_math.py @@ -1,6 +1,7 @@ # Python test set -- math module # XXXX Should not do tests around zero only +import sys from test_support import * seps='1e-05' @@ -35,7 +36,10 @@ testit('atan(1)', math.atan(1), math.pi/4) print 'atan2' testit('atan2(-1, 0)', math.atan2(-1, 0), -math.pi/2) testit('atan2(-1, 1)', math.atan2(-1, 1), -math.pi/4) -testit('atan2(0, 1)', math.atan2(0, 1), 0) +if sys.platform in ['unixware7']: + testit('atan2(0, 1)', math.atan2(0, 1), math.pi) +else: + testit('atan2(0, 1)', math.atan2(0, 1), 0) testit('atan2(1, 1)', math.atan2(1, 1), math.pi/4) testit('atan2(1, 0)', math.atan2(1, 0), math.pi/2) |