diff -urN /boot/home/devel/python/Python-2.3.4.org/GNUmakefile python/GNUmakefile --- /boot/home/devel/python/Python-2.3.4.org/GNUmakefile Thu Jan 1 01:00:00 1970 +++ python/GNUmakefile Sat Dec 4 17:39:13 2004 @@ -0,0 +1,62 @@ +#!/bin/false +# Zeta Makefile for python + +# Name of the app/lib, just for OBJ_DIR +NAME=python + +# version info +APP_VERSION := -app 2 3 4 -short '2.3.4' -long 'Python 2.3.4' + +# The install dir without the /boot/ part, ie: apps/Office/Staxer +BOOTREL_INSTALL_DIR := beos +#BOOTREL_INSTALL_DIR := testing-py + +# Specify a directory for the 'install' target. +INSTALL_DIR := /boot/$(BOOTREL_INSTALL_DIR) + +# The name to your zipped package, ie: Staxer +APP_ZIPNAME := python-2.3.4 + +# The install category, ie: Office, Media, Graphics etc. +CATEGORY := BaseInstallation + +# A description of the items that goes in a message to the terminal +# ie: documentation +ITEMS_NAME :=Python Interpreter + +# A list of the files relative BOOTREL_INSTALL_DIR +#FILES := + +# files relative to BOOTREL_INSTALL_DIR/[etc|(system/)lib|bin|man] +# those are added to FILES but separated for convenience +#FILES_ETC:= +FILES_LIB:=libpython2.3.so python2.3/*/*/*/* python2.3/*/*/* python2.3/*/* python2.3/* +FILES_BIN:=idle pydoc python python2.3 +#FILES_MAN:= + +# Those files are put to $(BUILD_OUTPUT)/$(ZETA_FLAVOR)/lib/ for use to build subsequent apps +BUILD_INSTALL_LIB:=libpython2.3.so + +# ./configure command and options +CONFIGURE_OPTIONS=--prefix=$(INSTALL_DIR)/system --bindir=$(INSTALL_DIR)/bin \ +--libdir=$(INSTALL_DIR)/system/lib --includedir=/boot/develop/headers --enable-shared + + +# Targets to call for make [zeta]install +# don't include maninstall, not inclinstall for zetainstall +ZETAINSTALL_TARGETS:=altbininstall libinstall libainstall sharedinstall oldsharedinstall bininstall +INSTALL_TARGETS:=inclinstall $(ZETAINSTALL_TARGETS) + +# What Makefile depends on to be done by configure +MAKEFILE_DOT_IN:=Makefile.pre.in + +# If the files need to stay on the CD, set this variable to 'true' +LEAVE_ON_CD :=false + +# If you want to add the calculated size, please put 'true' here. +# This is useful for files that have thier own zip, and are not part of +# another zip. +DO_SIZE :=true + +include $(BUILD_SCRIPT_DIR)/makefile-engine.zeta.autotools + diff -urN /boot/home/devel/python/Python-2.3.4.org/Lib/plat-beos5/IN.py python/Lib/plat-beos5/IN.py --- /boot/home/devel/python/Python-2.3.4.org/Lib/plat-beos5/IN.py Sat Oct 7 14:25:17 2000 +++ python/Lib/plat-beos5/IN.py Wed Dec 1 10:11:32 2004 @@ -1,27 +1,74 @@ -# Generated by h2py from /boot/develop/headers/be/net/netinet/in.h +# Generated by h2py from /boot/develop/headers/be/bone/netinet/in.h -# Included from socket.h +# Included from OS.h # Included from BeBuild.h + +# Included from ProductFeatures.h +_INCLUDES_CLASS_COLUMN_LIST_VIEW = 1 +_INCLUDES_CLASS_CURSOR = 1 +_INCLUDES_CLASS_DEVICE_MAP = 1 +_SUPPORTS_FEATURE_SCREEN_DUMP = 1 +_SUPPORTS_FEATURE_SCRIPTING = 1 +_SUPPORTS_LARGE_STACKS = 1 +_SUPPORTS_MALLOC_DEBUG = 1 +_SUPPORTS_OLD_MIDI_SYNTH = 1 +_SUPPORTS_READ_WRITE_TRANSLATORS = 1 +_SUPPORTS_RESOURCES = 1 +_SUPPORTS_EXCEPTION_HANDLING = 1 +_SUPPORTS_SOFT_KEYBOARD = 0 +_SUPPORTS_MEDIA_NODES = 1 +_SUPPORTS_LEAK_CHECKING = 1 +ROTATE_DISPLAY = 0 +_PROCESSOR_3DNOW_ = 0 +_PROCESSOR_MMX_ = 1 +_PROCESSOR_MMX_CYRIX_ = 0 +_PROCESSOR_KNI_ = 0 +_PROCESSOR_CMOV_ = 0 +_SUPPORTS_FEATURE_BACKGROUND_MIME_SNIFFING = 1 +_SUPPORTS_SMP = 1 +_SUPPORTS_MIDI = 1 +_R5_COMPATIBLE_ = 1 B_BEOS_VERSION_4 = 0x0400 B_BEOS_VERSION_4_5 = 0x0450 B_BEOS_VERSION_5 = 0x0500 -B_BEOS_VERSION = B_BEOS_VERSION_5 +B_BEOS_VERSION_5_0_4 = 0x0504 +B_BEOS_VERSION_5_1_0 = 0x0510 +B_ZETA_VERSION_0_2_0 = 0x0520 +B_ZETA_VERSION_0_3_0 = 0x0530 +B_ZETA_VERSION_0_4_0 = 0x0540 B_BEOS_VERSION_MAUI = B_BEOS_VERSION_5 +B_BEOS_VERSION_DANO = B_BEOS_VERSION_5_1_0 +B_ZETA_VERSION_BETA = B_ZETA_VERSION_0_2_0 +B_ZETA_VERSION_GESTALT = B_ZETA_VERSION_0_3_0 +B_ZETA_VERSION_BELLA = B_ZETA_VERSION_0_4_0 +B_ZETA_VERSION = B_ZETA_VERSION_BELLA +B_BEOS_VERSION = B_ZETA_VERSION +_R5_COMPATIBLE_ = 1 _PR2_COMPATIBLE_ = 1 _PR3_COMPATIBLE_ = 1 _R4_COMPATIBLE_ = 1 _R4_5_COMPATIBLE_ = 1 +_R5_COMPATIBLE_ = 1 +_R5_0_4_COMPATIBLE_ = 1 _PR2_COMPATIBLE_ = 0 _PR3_COMPATIBLE_ = 0 _R4_COMPATIBLE_ = 1 _R4_5_COMPATIBLE_ = 1 +_R5_COMPATIBLE_ = 1 +_R5_0_4_COMPATIBLE_ = 1 +_PR2_COMPATIBLE_ = 0 +_PR3_COMPATIBLE_ = 0 +_R4_COMPATIBLE_ = 0 +_R4_5_COMPATIBLE_ = 0 +_R5_COMPATIBLE_ = 0 +_R5_0_4_COMPATIBLE_ = 0 def _UNUSED(x): return x -# Included from sys/types.h +# Included from be_prim.h -# Included from time.h +# Included from fcntl.h # Included from be_setup.h def __std(ref): return ref @@ -29,9 +76,13 @@ __be_os = 2 __dest_os = __be_os __MSL__ = 0x4011 -__GLIBC__ = -2 +__GLIBC__ = 2 __GLIBC_MINOR__ = 1 +# Included from sys/types.h + +# Included from time.h + # Included from null.h NULL = (0) NULL = 0L @@ -45,29 +96,92 @@ CLK_TCK = CLOCKS_PER_SEC MAX_TIMESTR = 70 -# Included from sys/time.h +# Included from sys/select.h -# Included from ByteOrder.h - -# Included from endian.h -__LITTLE_ENDIAN = 1234 -LITTLE_ENDIAN = __LITTLE_ENDIAN -__BYTE_ORDER = __LITTLE_ENDIAN -BYTE_ORDER = __BYTE_ORDER -__BIG_ENDIAN = 0 -BIG_ENDIAN = 0 -__BIG_ENDIAN = 4321 -BIG_ENDIAN = __BIG_ENDIAN -__BYTE_ORDER = __BIG_ENDIAN -BYTE_ORDER = __BYTE_ORDER -__LITTLE_ENDIAN = 0 -LITTLE_ENDIAN = 0 -__PDP_ENDIAN = 3412 -PDP_ENDIAN = __PDP_ENDIAN +# Included from sys/time.h +FD_SETSIZE = 1024 +def FD_ZERO(p): return memset(p, 0, sizeof(*(p))) -# Included from SupportDefs.h -# Included from Errors.h +# Included from sys/stat.h +S_ATTR_DIR = 01000000000 +S_ATTR = 02000000000 +S_INDEX_DIR = 04000000000 +S_STR_INDEX = 00100000000 +S_INT_INDEX = 00200000000 +S_UINT_INDEX = 00400000000 +S_LONG_LONG_INDEX = 00010000000 +S_ULONG_LONG_INDEX = 00020000000 +S_FLOAT_INDEX = 00040000000 +S_DOUBLE_INDEX = 00001000000 +S_ALLOW_DUPS = 00002000000 +S_IFMT = 00000170000 +S_IFLNK = 00000120000 +S_IFREG = 00000100000 +S_IFBLK = 00000060000 +S_IFDIR = 00000040000 +S_IFCHR = 00000020000 +S_IFIFO = 00000010000 +def S_ISREG(m): return (((m) & S_IFMT) == S_IFREG) + +def S_ISLNK(m): return (((m) & S_IFMT) == S_IFLNK) + +def S_ISBLK(m): return (((m) & S_IFMT) == S_IFBLK) + +def S_ISDIR(m): return (((m) & S_IFMT) == S_IFDIR) + +def S_ISCHR(m): return (((m) & S_IFMT) == S_IFCHR) + +def S_ISFIFO(m): return (((m) & S_IFMT) == S_IFIFO) + +def S_ISINDEX(m): return (((m) & S_INDEX_DIR) == S_INDEX_DIR) + +S_IUMSK = 07777 +S_ISUID = 04000 +S_ISGID = 02000 +S_ISVTX = 01000 +S_IRWXU = 00700 +S_IRUSR = 00400 +S_IWUSR = 00200 +S_IXUSR = 00100 +S_IRWXG = 00070 +S_IRGRP = 00040 +S_IWGRP = 00020 +S_IXGRP = 00010 +S_IRWXO = 00007 +S_IROTH = 00004 +S_IWOTH = 00002 +S_IXOTH = 00001 +F_DUPFD = 0x0001 +F_GETFD = 0x0002 +F_SETFD = 0x0004 +F_GETFL = 0x0008 +F_SETFL = 0x0010 +F_GETLK = 0x0020 +F_RDLCK = 0x0040 +F_SETLK = 0x0080 +F_SETLKW = 0x0100 +F_UNLCK = 0x0200 +F_WRLCK = 0x0400 +FD_CLOEXEC = 1 +FD_CLOEXEC = 0x0800 +O_RDONLY = 0 +O_WRONLY = 1 +O_RDWR = 2 +O_RWMASK = 3 +O_CLOEXEC = 0x0040 +O_NONBLOCK = 0x0080 +O_EXCL = 0x0100 +O_CREAT = 0x0200 +O_TRUNC = 0x0400 +O_APPEND = 0x0800 +O_NOCTTY = 0x1000 +O_NOTRAVERSE = 0x2000 +O_ACCMODE = 0x0003 +O_TEXT = 0x4000 +O_BINARY = 0x8000 +S_IREAD = 0x0100 +S_IWRITE = 0x0080 # Included from limits.h @@ -83,7 +197,7 @@ DBL_MANT_DIG = 53 DBL_DIG = 15 DBL_MIN_EXP = (-1021) -DBL_MIN_10_EXP = (-308) +DBL_MIN_10_EXP = (-307) DBL_MAX_EXP = 1024 DBL_MAX_10_EXP = 308 LDBL_MANT_DIG = DBL_MANT_DIG @@ -95,15 +209,15 @@ CHAR_BIT = (8) SCHAR_MIN = (-127-1) SCHAR_MAX = (127) +CHAR_MIN = (0) +CHAR_MAX = (255) CHAR_MIN = SCHAR_MIN CHAR_MAX = SCHAR_MAX MB_LEN_MAX = (1) SHRT_MIN = (-32767-1) SHRT_MAX = (32767) -LONG_MIN = (-2147483647L-1) LONG_MAX = (2147483647L) -INT_MIN = LONG_MIN -INT_MAX = LONG_MAX +INT_MAX = (2147483647) ARG_MAX = (32768) ATEXIT_MAX = (32) CHILD_MAX = (1024) @@ -116,6 +230,7 @@ NAME_MAX = (256) NGROUPS_MAX = (32) OPEN_MAX = (128) +PATH_MAX = (512) PATH_MAX = (1024) PIPE_MAX = (512) SSIZE_MAX = (2147483647L) @@ -131,76 +246,100 @@ _POSIX_NAME_MAX = (255) _POSIX_NGROUPS_MAX = (0) _POSIX_OPEN_MAX = (128) +_POSIX_PATH_MAX = (512) _POSIX_PATH_MAX = (1024) _POSIX_PIPE_BUF = (512) _POSIX_SSIZE_MAX = (2147483647L) _POSIX_STREAM_MAX = (8) _POSIX_TTY_NAME_MAX = (256) _POSIX_TZNAME_MAX = (3) -B_GENERAL_ERROR_BASE = LONG_MIN -B_OS_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x1000 -B_APP_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x2000 -B_INTERFACE_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x3000 -B_MEDIA_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x4000 -B_TRANSLATION_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x4800 -B_MIDI_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x5000 -B_STORAGE_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x6000 -B_POSIX_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x7000 -B_MAIL_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x8000 -B_PRINT_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x9000 -B_DEVICE_ERROR_BASE = B_GENERAL_ERROR_BASE + 0xa000 -B_ERRORS_END = (B_GENERAL_ERROR_BASE + 0xffff) -E2BIG = (B_POSIX_ERROR_BASE + 1) -ECHILD = (B_POSIX_ERROR_BASE + 2) -EDEADLK = (B_POSIX_ERROR_BASE + 3) -EFBIG = (B_POSIX_ERROR_BASE + 4) -EMLINK = (B_POSIX_ERROR_BASE + 5) -ENFILE = (B_POSIX_ERROR_BASE + 6) -ENODEV = (B_POSIX_ERROR_BASE + 7) -ENOLCK = (B_POSIX_ERROR_BASE + 8) -ENOSYS = (B_POSIX_ERROR_BASE + 9) -ENOTTY = (B_POSIX_ERROR_BASE + 10) -ENXIO = (B_POSIX_ERROR_BASE + 11) -ESPIPE = (B_POSIX_ERROR_BASE + 12) -ESRCH = (B_POSIX_ERROR_BASE + 13) -EFPOS = (B_POSIX_ERROR_BASE + 14) -ESIGPARM = (B_POSIX_ERROR_BASE + 15) -EDOM = (B_POSIX_ERROR_BASE + 16) -ERANGE = (B_POSIX_ERROR_BASE + 17) -EPROTOTYPE = (B_POSIX_ERROR_BASE + 18) -EPROTONOSUPPORT = (B_POSIX_ERROR_BASE + 19) -EPFNOSUPPORT = (B_POSIX_ERROR_BASE + 20) -EAFNOSUPPORT = (B_POSIX_ERROR_BASE + 21) -EADDRINUSE = (B_POSIX_ERROR_BASE + 22) -EADDRNOTAVAIL = (B_POSIX_ERROR_BASE + 23) -ENETDOWN = (B_POSIX_ERROR_BASE + 24) -ENETUNREACH = (B_POSIX_ERROR_BASE + 25) -ENETRESET = (B_POSIX_ERROR_BASE + 26) -ECONNABORTED = (B_POSIX_ERROR_BASE + 27) -ECONNRESET = (B_POSIX_ERROR_BASE + 28) -EISCONN = (B_POSIX_ERROR_BASE + 29) -ENOTCONN = (B_POSIX_ERROR_BASE + 30) -ESHUTDOWN = (B_POSIX_ERROR_BASE + 31) -ECONNREFUSED = (B_POSIX_ERROR_BASE + 32) -EHOSTUNREACH = (B_POSIX_ERROR_BASE + 33) -ENOPROTOOPT = (B_POSIX_ERROR_BASE + 34) -ENOBUFS = (B_POSIX_ERROR_BASE + 35) -EINPROGRESS = (B_POSIX_ERROR_BASE + 36) -EALREADY = (B_POSIX_ERROR_BASE + 37) -EILSEQ = (B_POSIX_ERROR_BASE + 38) -ENOMSG = (B_POSIX_ERROR_BASE + 39) -ESTALE = (B_POSIX_ERROR_BASE + 40) -EOVERFLOW = (B_POSIX_ERROR_BASE + 41) -EMSGSIZE = (B_POSIX_ERROR_BASE + 42) -EOPNOTSUPP = (B_POSIX_ERROR_BASE + 43) -ENOTSOCK = (B_POSIX_ERROR_BASE + 44) false = 0 true = 1 NULL = (0) +B_FILE_NAME_LENGTH = NAME_MAX +B_ATTR_NAME_LENGTH = (B_FILE_NAME_LENGTH-1) +B_MIME_TYPE_LENGTH = (B_ATTR_NAME_LENGTH - 15) +B_READ_ONLY = O_RDONLY +B_WRITE_ONLY = O_WRONLY +B_READ_WRITE = O_RDWR +B_FAIL_IF_EXISTS = O_EXCL +B_CREATE_FILE = O_CREAT +B_ERASE_FILE = O_TRUNC +B_OPEN_AT_END = O_APPEND + +# Included from errno.h + +# Included from be_errors.h +ENOERR = 0 +EOK = ENOERR + +# Included from sys/param.h +MAXPATHLEN = PATH_MAX +NOFILE = OPEN_MAX +MAXHOSTNAMELEN = 256 +B_OS_NAME_LENGTH = 32 +B_PAGE_SIZE = 4096 +B_NO_LOCK = 0 +B_LAZY_LOCK = 1 +B_FULL_LOCK = 2 +B_CONTIGUOUS = 3 +B_LOMEM = 4 +B_ANY_ADDRESS = 0 +B_EXACT_ADDRESS = 1 +B_BASE_ADDRESS = 2 +B_CLONE_ADDRESS = 3 +B_ANY_KERNEL_ADDRESS = 4 +B_READ_AREA = 1 +B_WRITE_AREA = 2 +B_LOW_PRIORITY = 5 +B_NORMAL_PRIORITY = 10 +B_DISPLAY_PRIORITY = 15 +B_URGENT_DISPLAY_PRIORITY = 20 +B_REAL_TIME_DISPLAY_PRIORITY = 100 +B_URGENT_PRIORITY = 110 +B_REAL_TIME_PRIORITY = 120 +B_SYSTEM_TIMEBASE = (0) +B_SYSTEM_TEAM = 2 +B_MAX_CPU_COUNT = 8 +B_MAX_CPU_COUNT = 8 +B_MAX_CPU_COUNT = 1 +B_CPU_X86_VENDOR_MASK = 0x1F00 +def get_system_info(info): return _get_system_info((info), sizeof(*(info))) + + +# Included from ByteOrder.h + +# Included from endian.h +__LITTLE_ENDIAN = 1234 +LITTLE_ENDIAN = __LITTLE_ENDIAN +__BYTE_ORDER = __LITTLE_ENDIAN +BYTE_ORDER = __BYTE_ORDER +__BIG_ENDIAN = 0 +BIG_ENDIAN = 0 +__BIG_ENDIAN = 4321 +BIG_ENDIAN = __BIG_ENDIAN +__BYTE_ORDER = __BIG_ENDIAN +BYTE_ORDER = __BYTE_ORDER +__LITTLE_ENDIAN = 0 +LITTLE_ENDIAN = 0 +__PDP_ENDIAN = 3412 +PDP_ENDIAN = __PDP_ENDIAN + +# Included from SupportDefs.h FALSE = 0 TRUE = 1 # Included from TypeConstants.h +def B_BYTE_SWAP_DOUBLE(arg): return __swap_double(arg) + +def B_BYTE_SWAP_FLOAT(arg): return __swap_float(arg) + +def B_BYTE_SWAP_INT64(arg): return __swap_int64(arg) + +def B_BYTE_SWAP_INT32(arg): return __swap_int32(arg) + +def B_BYTE_SWAP_INT16(arg): return __swap_int16(arg) + B_HOST_IS_LENDIAN = 1 B_HOST_IS_BENDIAN = 0 def B_HOST_TO_LENDIAN_DOUBLE(arg): return (double)(arg) @@ -303,25 +442,83 @@ def ntohs(x): return B_BENDIAN_TO_HOST_INT16(x) -AF_INET = 1 -INADDR_ANY = 0x00000000 -INADDR_BROADCAST = 0xffffffff -INADDR_LOOPBACK = 0x7f000001 -SOL_SOCKET = 1 -SO_DEBUG = 1 -SO_REUSEADDR = 2 -SO_NONBLOCK = 3 -SO_REUSEPORT = 4 -MSG_OOB = 0x1 -SOCK_DGRAM = 1 -SOCK_STREAM = 2 -IPPROTO_UDP = 1 -IPPROTO_TCP = 2 -IPPROTO_ICMP = 3 -B_UDP_MAX_SIZE = (65536 - 1024) -FD_SETSIZE = 256 -FDSETSIZE = FD_SETSIZE -NFDBITS = 32 -def _FDMSKNO(fd): return ((fd) / NFDBITS) - -def _FDBITNO(fd): return ((fd) % NFDBITS) \ No newline at end of file +IPPROTO_IP = 0 +IPPROTO_ICMP = 1 +IPPROTO_IGMP = 2 +IPPROTO_TCP = 6 +IPPROTO_EGP = 8 +IPPROTO_UDP = 17 +IPPROTO_IPV6 = 41 +IPPROTO_ICMPV6 = 58 +IPPROTO_DIVERT = 254 +IPPROTO_RAW = 255 +IPPROTO_MAX = 256 +IPPORT_RESERVED = 1024 +IPPORT_USERRESERVED = 5000 +IPPORT_HIFIRSTAUTO = 40000 +IPPORT_HILASTAUTO = 44999 +IPPORT_RESERVEDSTART = 600 +def IN_CLASSA(i): return (((in_addr_t)(i) & (-2147483648)) == 0) + +IN_CLASSA_NET = (-16777216) +IN_CLASSA_NSHIFT = 24 +IN_CLASSA_HOST = 0x00ffffff +IN_CLASSA_MAX = 128 +def IN_CLASSB(i): return (((in_addr_t)(i) & (-1073741824)) == (-2147483648)) + +IN_CLASSB_NET = (-65536) +IN_CLASSB_NSHIFT = 16 +IN_CLASSB_HOST = 0x0000ffff +IN_CLASSB_MAX = 65536 +def IN_CLASSC(i): return (((in_addr_t)(i) & (-536870912)) == (-1073741824)) + +IN_CLASSC_NET = (-256) +IN_CLASSC_NSHIFT = 8 +IN_CLASSC_HOST = 0x000000ff +def IN_CLASSD(i): return (((in_addr_t)(i) & (-268435456)) == (-536870912)) + +IN_CLASSD_NET = (-268435456) +IN_CLASSD_NSHIFT = 28 +IN_CLASSD_HOST = 0x0fffffff +def IN_MULTICAST(i): return IN_CLASSD(i) + +def IN_EXPERIMENTAL(i): return (((in_addr_t)(i) & (-268435456)) == (-268435456)) + +def IN_BADCLASS(i): return (((in_addr_t)(i) & (-268435456)) == (-268435456)) + +INADDR_NONE = (-1) +IN_LOOPBACKNET = 127 +IP_HDRINCL = 0x00000001 +IP_RECVIF = 0x00000002 +IP_RECVOPTS = 0x00000004 +IP_RECVRETOPTS = 0x00000008 +IP_RECVDSTADDR = 0x00000010 +IP_ONESBCAST = 0x00000020 +IP_OPTIONS = 0x40000001 +IP_TOS = 0x40000002 +IP_TTL = 0x40000003 +IP_RETOPTS = 0x40000004 +IP_MULTICAST_IF = 0x40000005 +IP_MULTICAST_TTL = 0x40000006 +IP_MULTICAST_LOOP = 0x40000007 +IP_ADD_MEMBERSHIP = 0x40000008 +IP_DROP_MEMBERSHIP = 0x40000009 +IP_MULTICAST_VIF = 0x4000000a +IP_RSVP_ON = 0x4000000b +IP_RSVP_OFF = 0x4000000c +IP_RSVP_VIF_ON = 0x4000000d +IP_RSVP_VIF_OFF = 0x4000000e +IP_PORTRANGE = 0x4000000f +IP_FW_ADD = 0x40000010 +IP_FW_DEL = 0x40000020 +IP_FW_FLUSH = 0x40000030 +IP_FW_ZERO = 0x40000040 +IP_FW_GET = 0x40000050 +IP_NAT = 0x40000060 +IP_DEFAULT_MULTICAST_TTL = 1 +IP_DEFAULT_MULTICAST_LOOP = 1 +IP_MAX_MEMBERSHIPS = 20 +INET_ADDRSTRLEN = 16 +IP_PORTRANGE_DEFAULT = 0 +IP_PORTRANGE_HIGH = 1 +IP_PORTRANGE_LOW = 2 diff -urN /boot/home/devel/python/Python-2.3.4.org/Lib/plat-beos5/regen python/Lib/plat-beos5/regen --- /boot/home/devel/python/Python-2.3.4.org/Lib/plat-beos5/regen Tue Jul 31 10:47:54 2001 +++ python/Lib/plat-beos5/regen Wed Dec 1 10:11:32 2004 @@ -2,6 +2,7 @@ H2PY=../../Tools/scripts/h2py.py HEADERS=/boot/develop/headers +#in.h is in be/net/netinet/ in R5, but be/bone/netinet/ in BONE... set -v -python $H2PY -i '(u_long)' $HEADERS/be/net/netinet/in.h +python $H2PY -i '(u_long)' $HEADERS/be/*/netinet/in.h diff -urN /boot/home/devel/python/Python-2.3.4.org/Lib/plat-zeta/IN.py python/Lib/plat-zeta/IN.py --- /boot/home/devel/python/Python-2.3.4.org/Lib/plat-zeta/IN.py Thu Jan 1 01:00:00 1970 +++ python/Lib/plat-zeta/IN.py Wed Dec 1 10:11:54 2004 @@ -0,0 +1,526 @@ +# Generated by h2py from /boot/develop/headers/be/bone/netinet/in.h + +# Included from OS.h + +# Included from BeBuild.h + +# Included from ProductFeatures.h +_INCLUDES_CLASS_COLUMN_LIST_VIEW = 1 +_INCLUDES_CLASS_CURSOR = 1 +_INCLUDES_CLASS_DEVICE_MAP = 1 +_SUPPORTS_FEATURE_SCREEN_DUMP = 1 +_SUPPORTS_FEATURE_SCRIPTING = 1 +_SUPPORTS_LARGE_STACKS = 1 +_SUPPORTS_MALLOC_DEBUG = 1 +_SUPPORTS_OLD_MIDI_SYNTH = 1 +_SUPPORTS_READ_WRITE_TRANSLATORS = 1 +_SUPPORTS_RESOURCES = 1 +_SUPPORTS_EXCEPTION_HANDLING = 1 +_SUPPORTS_SOFT_KEYBOARD = 0 +_SUPPORTS_MEDIA_NODES = 1 +_SUPPORTS_LEAK_CHECKING = 1 +ROTATE_DISPLAY = 0 +_PROCESSOR_3DNOW_ = 0 +_PROCESSOR_MMX_ = 1 +_PROCESSOR_MMX_CYRIX_ = 0 +_PROCESSOR_KNI_ = 0 +_PROCESSOR_CMOV_ = 0 +_SUPPORTS_FEATURE_BACKGROUND_MIME_SNIFFING = 1 +_SUPPORTS_SMP = 1 +_SUPPORTS_MIDI = 1 +_R5_COMPATIBLE_ = 1 +B_BEOS_VERSION_4 = 0x0400 +B_BEOS_VERSION_4_5 = 0x0450 +B_BEOS_VERSION_5 = 0x0500 +B_BEOS_VERSION_5_0_4 = 0x0504 +B_BEOS_VERSION_5_1_0 = 0x0510 +B_ZETA_VERSION_0_2_0 = 0x0520 +B_ZETA_VERSION_0_3_0 = 0x0530 +B_ZETA_VERSION_0_4_0 = 0x0540 +B_ZETA_VERSION_0_4_1 = 0x0541 +B_BEOS_VERSION_MAUI = B_BEOS_VERSION_5 +B_BEOS_VERSION_DANO = B_BEOS_VERSION_5_1_0 +B_ZETA_VERSION_BETA = B_ZETA_VERSION_0_2_0 +B_ZETA_VERSION_GESTALT = B_ZETA_VERSION_0_3_0 +B_ZETA_VERSION_BELLA = B_ZETA_VERSION_0_4_0 +B_ZETA_VERSION_NEO = B_ZETA_VERSION_0_4_1 +B_ZETA_VERSION = B_ZETA_VERSION_NEO +B_BEOS_VERSION = B_ZETA_VERSION +_R5_COMPATIBLE_ = 1 +_PR2_COMPATIBLE_ = 1 +_PR3_COMPATIBLE_ = 1 +_R4_COMPATIBLE_ = 1 +_R4_5_COMPATIBLE_ = 1 +_R5_COMPATIBLE_ = 1 +_R5_0_4_COMPATIBLE_ = 1 +_PR2_COMPATIBLE_ = 0 +_PR3_COMPATIBLE_ = 0 +_R4_COMPATIBLE_ = 1 +_R4_5_COMPATIBLE_ = 1 +_R5_COMPATIBLE_ = 1 +_R5_0_4_COMPATIBLE_ = 1 +_PR2_COMPATIBLE_ = 0 +_PR3_COMPATIBLE_ = 0 +_R4_COMPATIBLE_ = 0 +_R4_5_COMPATIBLE_ = 0 +_R5_COMPATIBLE_ = 0 +_R5_0_4_COMPATIBLE_ = 0 +def _UNUSED(x): return x + + +# Included from be_prim.h + +# Included from fcntl.h + +# Included from be_setup.h +def __std(ref): return ref + +__be_os = 2 +__dest_os = __be_os +__MSL__ = 0x4011 +__GLIBC__ = 2 +__GLIBC_MINOR__ = 1 + +# Included from sys/types.h + +# Included from time.h + +# Included from null.h +NULL = (0) +NULL = 0L + +# Included from size_t.h + +# Included from stddef.h + +# Included from wchar_t.h +CLOCKS_PER_SEC = 1000 +CLK_TCK = CLOCKS_PER_SEC +MAX_TIMESTR = 70 + +# Included from sys/select.h + +# Included from sys/time.h +FD_SETSIZE = 1024 +def FD_ZERO(p): return memset(p, 0, sizeof(*(p))) + + +# Included from sys/stat.h +S_ATTR_DIR = 01000000000 +S_ATTR = 02000000000 +S_INDEX_DIR = 04000000000 +S_STR_INDEX = 00100000000 +S_INT_INDEX = 00200000000 +S_UINT_INDEX = 00400000000 +S_LONG_LONG_INDEX = 00010000000 +S_ULONG_LONG_INDEX = 00020000000 +S_FLOAT_INDEX = 00040000000 +S_DOUBLE_INDEX = 00001000000 +S_ALLOW_DUPS = 00002000000 +S_IFMT = 00000170000 +S_IFLNK = 00000120000 +S_IFREG = 00000100000 +S_IFBLK = 00000060000 +S_IFDIR = 00000040000 +S_IFCHR = 00000020000 +S_IFIFO = 00000010000 +def S_ISREG(m): return (((m) & S_IFMT) == S_IFREG) + +def S_ISLNK(m): return (((m) & S_IFMT) == S_IFLNK) + +def S_ISBLK(m): return (((m) & S_IFMT) == S_IFBLK) + +def S_ISDIR(m): return (((m) & S_IFMT) == S_IFDIR) + +def S_ISCHR(m): return (((m) & S_IFMT) == S_IFCHR) + +def S_ISFIFO(m): return (((m) & S_IFMT) == S_IFIFO) + +def S_ISINDEX(m): return (((m) & S_INDEX_DIR) == S_INDEX_DIR) + +S_IUMSK = 07777 +S_ISUID = 04000 +S_ISGID = 02000 +S_ISVTX = 01000 +S_IRWXU = 00700 +S_IRUSR = 00400 +S_IWUSR = 00200 +S_IXUSR = 00100 +S_IRWXG = 00070 +S_IRGRP = 00040 +S_IWGRP = 00020 +S_IXGRP = 00010 +S_IRWXO = 00007 +S_IROTH = 00004 +S_IWOTH = 00002 +S_IXOTH = 00001 +F_DUPFD = 0x0001 +F_GETFD = 0x0002 +F_SETFD = 0x0004 +F_GETFL = 0x0008 +F_SETFL = 0x0010 +F_GETLK = 0x0020 +F_RDLCK = 0x0040 +F_SETLK = 0x0080 +F_SETLKW = 0x0100 +F_UNLCK = 0x0200 +F_WRLCK = 0x0400 +FD_CLOEXEC = 1 +FD_CLOEXEC = 0x0800 +O_RDONLY = 0 +O_WRONLY = 1 +O_RDWR = 2 +O_RWMASK = 3 +O_CLOEXEC = 0x0040 +O_NONBLOCK = 0x0080 +O_EXCL = 0x0100 +O_CREAT = 0x0200 +O_TRUNC = 0x0400 +O_APPEND = 0x0800 +O_NOCTTY = 0x1000 +O_NOTRAVERSE = 0x2000 +O_ACCMODE = 0x0003 +O_TEXT = 0x4000 +O_BINARY = 0x8000 +S_IREAD = 0x0100 +S_IWRITE = 0x0080 + +# Included from limits.h + +# Included from float.h +FLT_ROUNDS = 1 +FLT_RADIX = 2 +FLT_MANT_DIG = 24 +FLT_DIG = 6 +FLT_MIN_EXP = (-125) +FLT_MIN_10_EXP = (-37) +FLT_MAX_EXP = 128 +FLT_MAX_10_EXP = 38 +DBL_MANT_DIG = 53 +DBL_DIG = 15 +DBL_MIN_EXP = (-1021) +DBL_MIN_10_EXP = (-307) +DBL_MAX_EXP = 1024 +DBL_MAX_10_EXP = 308 +LDBL_MANT_DIG = DBL_MANT_DIG +LDBL_DIG = DBL_DIG +LDBL_MIN_EXP = DBL_MIN_EXP +LDBL_MIN_10_EXP = DBL_MIN_10_EXP +LDBL_MAX_EXP = DBL_MAX_EXP +LDBL_MAX_10_EXP = DBL_MAX_10_EXP +CHAR_BIT = (8) +SCHAR_MIN = (-127-1) +SCHAR_MAX = (127) +CHAR_MIN = (0) +CHAR_MAX = (255) +CHAR_MIN = SCHAR_MIN +CHAR_MAX = SCHAR_MAX +MB_LEN_MAX = (1) +SHRT_MIN = (-32767-1) +SHRT_MAX = (32767) +LONG_MAX = (2147483647L) +INT_MAX = (2147483647) +ARG_MAX = (32768) +ATEXIT_MAX = (32) +CHILD_MAX = (1024) +IOV_MAX = (256) +FILESIZEBITS = (64) +LINK_MAX = (1) +LOGIN_NAME_MAX = (32) +MAX_CANON = (255) +MAX_INPUT = (255) +NAME_MAX = (256) +NGROUPS_MAX = (32) +OPEN_MAX = (128) +PATH_MAX = (512) +PATH_MAX = (1024) +PIPE_MAX = (512) +SSIZE_MAX = (2147483647L) +TTY_NAME_MAX = (256) +TZNAME_MAX = (32) +SYMLINKS_MAX = (16) +_POSIX_ARG_MAX = (32768) +_POSIX_CHILD_MAX = (1024) +_POSIX_LINK_MAX = (1) +_POSIX_LOGIN_NAME_MAX = (9) +_POSIX_MAX_CANON = (255) +_POSIX_MAX_INPUT = (255) +_POSIX_NAME_MAX = (255) +_POSIX_NGROUPS_MAX = (0) +_POSIX_OPEN_MAX = (128) +_POSIX_PATH_MAX = (512) +_POSIX_PATH_MAX = (1024) +_POSIX_PIPE_BUF = (512) +_POSIX_SSIZE_MAX = (2147483647L) +_POSIX_STREAM_MAX = (8) +_POSIX_TTY_NAME_MAX = (256) +_POSIX_TZNAME_MAX = (3) +false = 0 +true = 1 +NULL = (0) +B_FILE_NAME_LENGTH = NAME_MAX +B_ATTR_NAME_LENGTH = (B_FILE_NAME_LENGTH-1) +B_MIME_TYPE_LENGTH = (B_ATTR_NAME_LENGTH - 15) +B_READ_ONLY = O_RDONLY +B_WRITE_ONLY = O_WRONLY +B_READ_WRITE = O_RDWR +B_FAIL_IF_EXISTS = O_EXCL +B_CREATE_FILE = O_CREAT +B_ERASE_FILE = O_TRUNC +B_OPEN_AT_END = O_APPEND + +# Included from errno.h + +# Included from be_errors.h +ENOERR = 0 +EOK = ENOERR + +# Included from sys/param.h +MAXPATHLEN = PATH_MAX +NOFILE = OPEN_MAX +MAXHOSTNAMELEN = 256 +B_OS_NAME_LENGTH = 32 +B_PAGE_SIZE = 4096 +B_NO_LOCK = 0 +B_LAZY_LOCK = 1 +B_FULL_LOCK = 2 +B_CONTIGUOUS = 3 +B_LOMEM = 4 +B_ANY_ADDRESS = 0 +B_EXACT_ADDRESS = 1 +B_BASE_ADDRESS = 2 +B_CLONE_ADDRESS = 3 +B_ANY_KERNEL_ADDRESS = 4 +B_READ_AREA = 1 +B_WRITE_AREA = 2 +B_LOW_PRIORITY = 5 +B_NORMAL_PRIORITY = 10 +B_DISPLAY_PRIORITY = 15 +B_URGENT_DISPLAY_PRIORITY = 20 +B_REAL_TIME_DISPLAY_PRIORITY = 100 +B_URGENT_PRIORITY = 110 +B_REAL_TIME_PRIORITY = 120 +B_SYSTEM_TIMEBASE = (0) +B_SYSTEM_TEAM = 2 +B_MAX_CPU_COUNT = 8 +B_MAX_CPU_COUNT = 8 +B_MAX_CPU_COUNT = 1 +B_CPU_X86_VENDOR_MASK = 0x1F00 +def get_system_info(info): return _get_system_info((info), sizeof(*(info))) + + +# Included from ByteOrder.h + +# Included from endian.h +__LITTLE_ENDIAN = 1234 +LITTLE_ENDIAN = __LITTLE_ENDIAN +__BYTE_ORDER = __LITTLE_ENDIAN +BYTE_ORDER = __BYTE_ORDER +__BIG_ENDIAN = 0 +BIG_ENDIAN = 0 +__BIG_ENDIAN = 4321 +BIG_ENDIAN = __BIG_ENDIAN +__BYTE_ORDER = __BIG_ENDIAN +BYTE_ORDER = __BYTE_ORDER +__LITTLE_ENDIAN = 0 +LITTLE_ENDIAN = 0 +__PDP_ENDIAN = 3412 +PDP_ENDIAN = __PDP_ENDIAN + +# Included from SupportDefs.h +FALSE = 0 +TRUE = 1 + +# Included from TypeConstants.h +def B_BYTE_SWAP_DOUBLE(arg): return __swap_double(arg) + +def B_BYTE_SWAP_FLOAT(arg): return __swap_float(arg) + +def B_BYTE_SWAP_INT64(arg): return __swap_int64(arg) + +def B_BYTE_SWAP_INT32(arg): return __swap_int32(arg) + +def B_BYTE_SWAP_INT16(arg): return __swap_int16(arg) + +B_HOST_IS_LENDIAN = 1 +B_HOST_IS_BENDIAN = 0 +def B_HOST_TO_LENDIAN_DOUBLE(arg): return (double)(arg) + +def B_HOST_TO_LENDIAN_FLOAT(arg): return (float)(arg) + +def B_HOST_TO_LENDIAN_INT64(arg): return (uint64)(arg) + +def B_HOST_TO_LENDIAN_INT32(arg): return (uint32)(arg) + +def B_HOST_TO_LENDIAN_INT16(arg): return (uint16)(arg) + +def B_HOST_TO_BENDIAN_DOUBLE(arg): return __swap_double(arg) + +def B_HOST_TO_BENDIAN_FLOAT(arg): return __swap_float(arg) + +def B_HOST_TO_BENDIAN_INT64(arg): return __swap_int64(arg) + +def B_HOST_TO_BENDIAN_INT32(arg): return __swap_int32(arg) + +def B_HOST_TO_BENDIAN_INT16(arg): return __swap_int16(arg) + +def B_LENDIAN_TO_HOST_DOUBLE(arg): return (double)(arg) + +def B_LENDIAN_TO_HOST_FLOAT(arg): return (float)(arg) + +def B_LENDIAN_TO_HOST_INT64(arg): return (uint64)(arg) + +def B_LENDIAN_TO_HOST_INT32(arg): return (uint32)(arg) + +def B_LENDIAN_TO_HOST_INT16(arg): return (uint16)(arg) + +def B_BENDIAN_TO_HOST_DOUBLE(arg): return __swap_double(arg) + +def B_BENDIAN_TO_HOST_FLOAT(arg): return __swap_float(arg) + +def B_BENDIAN_TO_HOST_INT64(arg): return __swap_int64(arg) + +def B_BENDIAN_TO_HOST_INT32(arg): return __swap_int32(arg) + +def B_BENDIAN_TO_HOST_INT16(arg): return __swap_int16(arg) + +B_HOST_IS_LENDIAN = 0 +B_HOST_IS_BENDIAN = 1 +def B_HOST_TO_LENDIAN_DOUBLE(arg): return __swap_double(arg) + +def B_HOST_TO_LENDIAN_FLOAT(arg): return __swap_float(arg) + +def B_HOST_TO_LENDIAN_INT64(arg): return __swap_int64(arg) + +def B_HOST_TO_LENDIAN_INT32(arg): return __swap_int32(arg) + +def B_HOST_TO_LENDIAN_INT16(arg): return __swap_int16(arg) + +def B_HOST_TO_BENDIAN_DOUBLE(arg): return (double)(arg) + +def B_HOST_TO_BENDIAN_FLOAT(arg): return (float)(arg) + +def B_HOST_TO_BENDIAN_INT64(arg): return (uint64)(arg) + +def B_HOST_TO_BENDIAN_INT32(arg): return (uint32)(arg) + +def B_HOST_TO_BENDIAN_INT16(arg): return (uint16)(arg) + +def B_LENDIAN_TO_HOST_DOUBLE(arg): return __swap_double(arg) + +def B_LENDIAN_TO_HOST_FLOAT(arg): return __swap_float(arg) + +def B_LENDIAN_TO_HOST_INT64(arg): return __swap_int64(arg) + +def B_LENDIAN_TO_HOST_INT32(arg): return __swap_int32(arg) + +def B_LENDIAN_TO_HOST_INT16(arg): return __swap_int16(arg) + +def B_BENDIAN_TO_HOST_DOUBLE(arg): return (double)(arg) + +def B_BENDIAN_TO_HOST_FLOAT(arg): return (float)(arg) + +def B_BENDIAN_TO_HOST_INT64(arg): return (uint64)(arg) + +def B_BENDIAN_TO_HOST_INT32(arg): return (uint32)(arg) + +def B_BENDIAN_TO_HOST_INT16(arg): return (uint16)(arg) + +def B_SWAP_DOUBLE(arg): return __swap_double(arg) + +def B_SWAP_FLOAT(arg): return __swap_float(arg) + +def B_SWAP_INT64(arg): return __swap_int64(arg) + +def B_SWAP_INT32(arg): return __swap_int32(arg) + +def B_SWAP_INT16(arg): return __swap_int16(arg) + +def htonl(x): return B_HOST_TO_BENDIAN_INT32(x) + +def ntohl(x): return B_BENDIAN_TO_HOST_INT32(x) + +def htons(x): return B_HOST_TO_BENDIAN_INT16(x) + +def ntohs(x): return B_BENDIAN_TO_HOST_INT16(x) + +IPPROTO_IP = 0 +IPPROTO_ICMP = 1 +IPPROTO_IGMP = 2 +IPPROTO_TCP = 6 +IPPROTO_EGP = 8 +IPPROTO_UDP = 17 +IPPROTO_IPV6 = 41 +IPPROTO_ICMPV6 = 58 +IPPROTO_DIVERT = 254 +IPPROTO_RAW = 255 +IPPROTO_MAX = 256 +IPPORT_RESERVED = 1024 +IPPORT_USERRESERVED = 5000 +IPPORT_HIFIRSTAUTO = 40000 +IPPORT_HILASTAUTO = 44999 +IPPORT_RESERVEDSTART = 600 +def IN_CLASSA(i): return (((in_addr_t)(i) & (-2147483648)) == 0) + +IN_CLASSA_NET = (-16777216) +IN_CLASSA_NSHIFT = 24 +IN_CLASSA_HOST = 0x00ffffff +IN_CLASSA_MAX = 128 +def IN_CLASSB(i): return (((in_addr_t)(i) & (-1073741824)) == (-2147483648)) + +IN_CLASSB_NET = (-65536) +IN_CLASSB_NSHIFT = 16 +IN_CLASSB_HOST = 0x0000ffff +IN_CLASSB_MAX = 65536 +def IN_CLASSC(i): return (((in_addr_t)(i) & (-536870912)) == (-1073741824)) + +IN_CLASSC_NET = (-256) +IN_CLASSC_NSHIFT = 8 +IN_CLASSC_HOST = 0x000000ff +def IN_CLASSD(i): return (((in_addr_t)(i) & (-268435456)) == (-536870912)) + +IN_CLASSD_NET = (-268435456) +IN_CLASSD_NSHIFT = 28 +IN_CLASSD_HOST = 0x0fffffff +def IN_MULTICAST(i): return IN_CLASSD(i) + +def IN_EXPERIMENTAL(i): return (((in_addr_t)(i) & (-268435456)) == (-268435456)) + +def IN_BADCLASS(i): return (((in_addr_t)(i) & (-268435456)) == (-268435456)) + +INADDR_NONE = (-1) +IN_LOOPBACKNET = 127 +IP_HDRINCL = 0x00000001 +IP_RECVIF = 0x00000002 +IP_RECVOPTS = 0x00000004 +IP_RECVRETOPTS = 0x00000008 +IP_RECVDSTADDR = 0x00000010 +IP_ONESBCAST = 0x00000020 +IP_OPTIONS = 0x40000001 +IP_TOS = 0x40000002 +IP_TTL = 0x40000003 +IP_RETOPTS = 0x40000004 +IP_MULTICAST_IF = 0x40000005 +IP_MULTICAST_TTL = 0x40000006 +IP_MULTICAST_LOOP = 0x40000007 +IP_ADD_MEMBERSHIP = 0x40000008 +IP_DROP_MEMBERSHIP = 0x40000009 +IP_MULTICAST_VIF = 0x4000000a +IP_RSVP_ON = 0x4000000b +IP_RSVP_OFF = 0x4000000c +IP_RSVP_VIF_ON = 0x4000000d +IP_RSVP_VIF_OFF = 0x4000000e +IP_PORTRANGE = 0x4000000f +IP_FW_ADD = 0x40000010 +IP_FW_DEL = 0x40000020 +IP_FW_FLUSH = 0x40000030 +IP_FW_ZERO = 0x40000040 +IP_FW_GET = 0x40000050 +IP_NAT = 0x40000060 +IP_DEFAULT_MULTICAST_TTL = 1 +IP_DEFAULT_MULTICAST_LOOP = 1 +IP_MAX_MEMBERSHIPS = 20 +INET_ADDRSTRLEN = 16 +IP_PORTRANGE_DEFAULT = 0 +IP_PORTRANGE_HIGH = 1 +IP_PORTRANGE_LOW = 2 diff -urN /boot/home/devel/python/Python-2.3.4.org/Lib/plat-zeta/regen python/Lib/plat-zeta/regen --- /boot/home/devel/python/Python-2.3.4.org/Lib/plat-zeta/regen Thu Jan 1 01:00:00 1970 +++ python/Lib/plat-zeta/regen Wed Dec 1 10:11:54 2004 @@ -0,0 +1,8 @@ +#! /bin/sh + +H2PY=../../Tools/scripts/h2py.py +HEADERS=/boot/develop/headers +#in.h is in be/net/netinet/ in R5, but be/bone/netinet/ in BONE... + +set -v +python $H2PY -i '(u_long)' $HEADERS/be/*/netinet/in.h diff -urN /boot/home/devel/python/Python-2.3.4.org/Lib/site.py python/Lib/site.py --- /boot/home/devel/python/Python-2.3.4.org/Lib/site.py Sat Mar 20 22:14:25 2004 +++ python/Lib/site.py Wed Dec 1 10:11:59 2004 @@ -332,6 +332,10 @@ encoding = "ascii" # Default value set by _PyUnicode_Init() +# BeOS uses UTF-8 by default, so go ahead. +#if sys.platform[:4] in ['beos','zeta']: +# encoding = "utf-8" + if 0: # Enable to support locale aware default string encodings. import locale diff -urN /boot/home/devel/python/Python-2.3.4.org/Lib/test/regrtest.py python/Lib/test/regrtest.py --- /boot/home/devel/python/Python-2.3.4.org/Lib/test/regrtest.py Wed Jul 23 02:30:39 2003 +++ python/Lib/test/regrtest.py Wed Dec 1 10:12:10 2004 @@ -934,6 +934,29 @@ test_winreg test_winsound """, + 'beos5' or 'zeta': + """ + test_al + test_bsddb185 + test_cd + test_cl + test_email_codecs + test_gdbm + test_gl + test_imgfile + test_linuxaudiodev + test_locale + test_mailbox + test_mhlib + test_mimetools + test_mmap + test_mpz + test_nis + test_poll + test_popen2 + test_resource + test_sunaudiodev + """, } class _ExpectedSkips: diff -urN /boot/home/devel/python/Python-2.3.4.org/Lib/test/test_dl.py python/Lib/test/test_dl.py --- /boot/home/devel/python/Python-2.3.4.org/Lib/test/test_dl.py Tue Jul 23 21:03:50 2002 +++ python/Lib/test/test_dl.py Wed Dec 1 10:12:19 2004 @@ -10,6 +10,11 @@ ('/usr/lib/libc.so', 'getpid'), ('/lib/libc.so.6', 'getpid'), ('/usr/bin/cygwin1.dll', 'getpid'), + # dlopening libroot is bad (doubles heap, then 1st heap can't grow) + #('/boot/beos/system/lib/libroot.so', 'getpid'), + # not easy to find a lib with a no-arg nilpotent func to call... + # wtf is getpagesize in that one anyway ? + ('/boot/beos/system/lib/libstdc++.r4.so', 'getpagesize'), ] for s, func in sharedlibs: diff -urN /boot/home/devel/python/Python-2.3.4.org/Lib/test/test_fcntl.py python/Lib/test/test_fcntl.py --- /boot/home/devel/python/Python-2.3.4.org/Lib/test/test_fcntl.py Tue Jul 23 21:03:51 2002 +++ python/Lib/test/test_fcntl.py Wed Dec 1 10:12:19 2004 @@ -27,7 +27,7 @@ lockdata = struct.pack('lxxxxlxxxxlhh', 0, 0, 0, fcntl.F_WRLCK, 0) elif sys.platform in ['aix3', 'aix4', 'hp-uxB', 'unixware7']: lockdata = struct.pack('hhlllii', fcntl.F_WRLCK, 0, 0, 0, 0, 0, 0) -elif sys.platform in ['os2emx']: +elif sys.platform in ['os2emx', 'beos5', 'zeta']: lockdata = None else: lockdata = struct.pack('hh'+start_len+'hh', fcntl.F_WRLCK, 0, 0, 0, 0, 0) @@ -41,7 +41,7 @@ if verbose: print 'Status from fnctl with O_NONBLOCK: ', rv -if sys.platform not in ['os2emx']: +if sys.platform not in ['os2emx', 'beos5', 'zeta']: rv = fcntl.fcntl(f.fileno(), fcntl.F_SETLKW, lockdata) if verbose: print 'String from fcntl with F_SETLKW: ', `rv` @@ -54,7 +54,7 @@ f = open(filename, 'w') rv = fcntl.fcntl(f, fcntl.F_SETFL, os.O_NONBLOCK) -if sys.platform not in ['os2emx']: +if sys.platform not in ['os2emx', 'beos5', 'zeta']: rv = fcntl.fcntl(f, fcntl.F_SETLKW, lockdata) f.close() diff -urN /boot/home/devel/python/Python-2.3.4.org/Lib/test/test_mailbox.py python/Lib/test/test_mailbox.py --- /boot/home/devel/python/Python-2.3.4.org/Lib/test/test_mailbox.py Tue Jul 23 21:03:56 2002 +++ python/Lib/test/test_mailbox.py Wed Dec 1 10:12:24 2004 @@ -49,7 +49,7 @@ self._msgfiles.append(tmpname) fp.write(DUMMY_MESSAGE) fp.close() - if hasattr(os, "link"): + if hasattr(os, "link") and sys.platform not in ['beos5','zeta']: os.link(tmpname, newname) else: fp = open(newname, "w") diff -urN /boot/home/devel/python/Python-2.3.4.org/Lib/test/test_mhlib.py python/Lib/test/test_mhlib.py --- /boot/home/devel/python/Python-2.3.4.org/Lib/test/test_mhlib.py Mon Aug 5 00:55:35 2002 +++ python/Lib/test/test_mhlib.py Wed Dec 1 10:12:25 2004 @@ -13,7 +13,8 @@ import mhlib if (sys.platform.startswith("win") or sys.platform=="riscos" or - sys.platform.startswith("atheos")): + sys.platform.startswith("atheos") or sys.platform.startswith("beos") or + sys.platform.startswith("zeta")): # mhlib.updateline() renames a file to the name of a file that already # exists. That causes a reasonable OS to complain in test_sequence # here, like the "OSError: [Errno 17] File exists" raised on Windows. diff -urN /boot/home/devel/python/Python-2.3.4.org/Lib/test/test_select.py python/Lib/test/test_select.py --- /boot/home/devel/python/Python-2.3.4.org/Lib/test/test_select.py Sat May 10 09:36:55 2003 +++ python/Lib/test/test_select.py Wed Dec 1 10:12:29 2004 @@ -46,6 +46,10 @@ if verbose: print "Can't test select easily on", sys.platform return + if sys.platform[:4] in ('beos','zeta'): + if verbose: + print "Pipes don't notify select correctly on", sys.platform + return cmd = 'for i in 0 1 2 3 4 5 6 7 8 9; do echo testing...; sleep 1; done' p = os.popen(cmd, 'r') for tout in (0, 1, 2, 4, 8, 16) + (None,)*10: diff -urN /boot/home/devel/python/Python-2.3.4.org/Makefile.pre.in python/Makefile.pre.in --- /boot/home/devel/python/Python-2.3.4.org/Makefile.pre.in Tue Nov 18 20:54:00 2003 +++ python/Makefile.pre.in Sat Dec 4 20:38:35 2004 @@ -65,7 +65,8 @@ # Extra C flags added for building the interpreter object files. CFLAGSFORSHARED=@CFLAGSFORSHARED@ # C flags used for building the interpreter object files -PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAGSFORSHARED) -DPy_BUILD_CORE +#PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAGSFORSHARED) -DPy_BUILD_CORE +PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) -DPy_BUILD_CORE # Machine-dependent subdirectories @@ -78,12 +79,14 @@ exec_prefix= @exec_prefix@ # Expanded directories -BINDIR= $(exec_prefix)/bin -LIBDIR= $(exec_prefix)/lib +BINDIR= @bindir@ +LIBDIR= @libdir@ MANDIR= @mandir@ INCLUDEDIR= @includedir@ -CONFINCLUDEDIR= $(exec_prefix)/include -SCRIPTDIR= $(prefix)/lib +#CONFINCLUDEDIR= $(exec_prefix)/include +CONFINCLUDEDIR= @includedir@ +#SCRIPTDIR= $(prefix)/lib +SCRIPTDIR= @libdir@ # Detailed destination directories BINLIBDEST= $(LIBDIR)/python$(VERSION) @@ -347,7 +350,9 @@ if test $(INSTSONAME) != $(LDLIBRARY); then \ $(LDSHARED) -Wl,-soname=$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM); \ $(LN) -f $(INSTSONAME) $@; \ - else\ + elif test "x$$OSTYPE" == 'xbeos' -o "x$$OSTYPE" == "xzeta"; then \ + $(AR) so $(LIBRARY) $@; \ + else \ $(LDSHARED) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM); \ fi diff -urN /boot/home/devel/python/Python-2.3.4.org/Misc/BeOS-NOTES python/Misc/BeOS-NOTES --- /boot/home/devel/python/Python-2.3.4.org/Misc/BeOS-NOTES Tue Apr 10 23:51:29 2001 +++ python/Misc/BeOS-NOTES Wed Dec 1 10:12:50 2004 @@ -1,3 +1,29 @@ +Notes from mmu_man - revol@free.fr: +* setup.py is fixed now, you do *not* need to use Misc/BeOS-setup.py +* Make sure you have the latest configure, if not run autoconf. +* Options I used to configure: +./configure --prefix=/boot/home/config --enable-shared +* test_select: though we do have select in BONE, it's skipped + because pipefs select support is broken. +* test_socket: should work in BONE, as it does have SOCK_RAW support. +* test_fcntl: the InvalidArg error is because POSIX advisory locking + support through fcntl is not supported in BeOS, so this part is skipped. +* test_largefile: it's not the test that was broken, but the file module, + which was using _ftell(), which is broken in BEOS, whereas ftello() is + working, but not exposed in headers. BeOS *does* support largefiles, + natively and much more simply than Unix! +* I'm becoming pissed off by apps/developpers who think Unicode + supports requires that ugly WCHAR idiom. BeOS is fundamentally Unicode + aware, through UTF-8, so why the hell is it so complicated to get an + app use UTF-8 instead of using convoluted things to support crappy UCS-2 + APIs like win32 ??? If you know the answer, please tell. + For now UTF-8 isn't enabled because it doesn't seem to do what it should, + and causes more tests to fail. +// mmu_man + + + +------------------------- Python for BeOS R5 In Python-2.1, the standard version of the new setup.py program diff -urN /boot/home/devel/python/Python-2.3.4.org/Modules/ld_so_beos python/Modules/ld_so_beos --- /boot/home/devel/python/Python-2.3.4.org/Modules/ld_so_beos Fri Feb 16 04:27:35 2001 +++ python/Modules/ld_so_beos Wed Dec 1 10:13:29 2004 @@ -46,7 +46,12 @@ # The shared libraries and glue objects we need to link against; these # libs are overkill for most of the standard modules, but it makes life # in this shell script easier. -LIBS="-lbe -lnet -lroot" +# check for BONE +if test -f /boot/develop/lib/x86/libbind.so ; then + LIBS="-nodefaultlibs -lroot -lsocket -lbind -lbe" +else + LIBS="-lnet -lbe" +fi case $BE_HOST_CPU in ppc) diff -urN /boot/home/devel/python/Python-2.3.4.org/Modules/posixmodule.c python/Modules/posixmodule.c --- /boot/home/devel/python/Python-2.3.4.org/Modules/posixmodule.c Tue May 4 10:07:49 2004 +++ python/Modules/posixmodule.c Wed Dec 1 10:13:33 2004 @@ -2054,6 +2054,7 @@ char *path; PyObject *argv; char **argvlist; + char *argv0 = NULL; /* BeOS' execv() clobers argv[0], so back it up */ int i, argc; PyObject *(*getitem)(PyObject *, int); @@ -2102,15 +2103,16 @@ } } argvlist[argc] = NULL; + argv0 = argvlist[0]; #ifdef BAD_EXEC_PROTOTYPES execv(path, (const char **) argvlist); #else /* BAD_EXEC_PROTOTYPES */ execv(path, argvlist); #endif /* BAD_EXEC_PROTOTYPES */ - /* If we get here it's definitely an error */ + argvlist[0] = argv0; /* BeOS: put it back in */ free_string_array(argvlist, argc); PyMem_Free(path); return posix_error(); @@ -2131,6 +2133,7 @@ char *path; PyObject *argv, *env; char **argvlist; + char *argv0 = NULL; /* BeOS' execv() clobers argv[0], so back it up */ char **envlist; PyObject *key, *val, *keys=NULL, *vals=NULL; int i, pos, argc, envc; @@ -2187,6 +2190,7 @@ } lastarg = argc; argvlist[argc] = NULL; + argv0 = argvlist[0]; i = PyMapping_Size(env); if (i < 0) @@ -2262,6 +2266,7 @@ PyMem_DEL(envlist[envc]); PyMem_DEL(envlist); fail_1: + argvlist[0] = argv0; /* BeOS: put it back in */ free_string_array(argvlist, lastarg); Py_XDECREF(vals); Py_XDECREF(keys); @@ -2783,6 +2788,30 @@ #else #define DEV_PTY_FILE "/dev/ptmx" #endif + +/* BeOS has ptys, but no pt mux, nor getpty/openpty, so fake the later */ +#ifdef __BEOS__ +#define HAVE_OPENPTY +static int openpty(int *master_fd, int *slave_fd, void *i, void *dont, void *care) +{ + char ptydev[11] = "/dev/pt/p0"; + char p, n; + for (p = 'p'; p <= 's'; p++) { + for (n = '0'; n <= 'f'; n++) { + ptydev[8] = p; + ptydev[9] = n; + *master_fd = open(ptydev, O_RDWR); + if (*master_fd < 0) + continue; + ptydev[5] = 't'; + *slave_fd = open(ptydev, O_RDWR); + return 0; + } + } + *master_fd = -1; + return ENODEV; +} +#endif /* __BEOS__ */ #if defined(HAVE_OPENPTY) || defined(HAVE_FORKPTY) || defined(HAVE_DEV_PTMX) #ifdef HAVE_PTY_H diff -urN /boot/home/devel/python/Python-2.3.4.org/Modules/selectmodule.c python/Modules/selectmodule.c --- /boot/home/devel/python/Python-2.3.4.org/Modules/selectmodule.c Mon Mar 22 21:20:33 2004 +++ python/Modules/selectmodule.c Wed Dec 1 10:13:37 2004 @@ -42,7 +42,7 @@ #include #else #ifdef __BEOS__ -#include +#include #define SOCKET int #else #define SOCKET int diff -urN /boot/home/devel/python/Python-2.3.4.org/Modules/socketmodule.c python/Modules/socketmodule.c --- /boot/home/devel/python/Python-2.3.4.org/Modules/socketmodule.c Sun Apr 11 14:10:03 2004 +++ python/Modules/socketmodule.c Wed Dec 1 10:13:38 2004 @@ -222,7 +222,12 @@ /* Headers needed for inet_ntoa() and inet_addr() */ # ifdef __BEOS__ -# include +# include /* for SOL_SOCKET */ +# include +# if SOL_SOCKET != 1 /* !net_server */ +# include /* for __inet_pton */ +# endif +# define INET_ADDRSTRLEN 16 # elif defined(PYOS_OS2) && defined(PYCC_VACPP) # include typedef size_t socklen_t; @@ -296,8 +301,9 @@ #include "getnameinfo.c" #endif -#if defined(MS_WINDOWS) || defined(__BEOS__) +#if defined(MS_WINDOWS) || defined(__BEOS__) && (SOL_SOCKET == 1) /* BeOS suffers from the same socket dichotomy as Win32... - [cjh] */ +/* BeOS BONE and Haiku don't! - mmu_man */ /* seem to be a few differences in the API */ #define SOCKETCLOSE closesocket #define NO_DUP /* Actually it exists on NT 3.5, but what the heck... */ @@ -839,9 +845,11 @@ } #ifdef __BEOS__ - /* XXX: BeOS version of accept() doesn't set family correctly */ +#if SOL_SOCKET == 1 /* net_server */ + /* XXX: BeOS net_server version of accept() doesn't set family correctly */ addr->sa_family = AF_INET; #endif +#endif switch (addr->sa_family) { @@ -1344,7 +1352,7 @@ PyObject *buf; socklen_t buflen = 0; -#ifdef __BEOS__ +#if defined(__BEOS__) && (SOL_SOCKET == 1) /* net_server */ /* We have incomplete socket support. */ PyErr_SetString(socket_error, "getsockopt not supported"); return NULL; @@ -2699,7 +2707,7 @@ { char *name; struct protoent *sp; -#ifdef __BEOS__ +#if defined(__BEOS__) && (SOL_SOCKET == 1) /* net_server */ /* Not available in BeOS yet. - [cjh] */ PyErr_SetString(socket_error, "getprotobyname not supported"); return NULL; @@ -3597,13 +3605,15 @@ /* Socket types */ PyModule_AddIntConstant(m, "SOCK_STREAM", SOCK_STREAM); PyModule_AddIntConstant(m, "SOCK_DGRAM", SOCK_DGRAM); -#ifndef __BEOS__ -/* We have incomplete socket support. */ +/* BeOS: We have incomplete socket support. */ +#if defined(SOCK_RAW) PyModule_AddIntConstant(m, "SOCK_RAW", SOCK_RAW); +#endif +#if defined(SOCK_SEQPACKET) PyModule_AddIntConstant(m, "SOCK_SEQPACKET", SOCK_SEQPACKET); +#endif #if defined(SOCK_RDM) PyModule_AddIntConstant(m, "SOCK_RDM", SOCK_RDM); -#endif #endif #ifdef SO_DEBUG diff -urN /boot/home/devel/python/Python-2.3.4.org/Modules/timemodule.c python/Modules/timemodule.c --- /boot/home/devel/python/Python-2.3.4.org/Modules/timemodule.c Tue Jul 1 07:16:08 2003 +++ python/Modules/timemodule.c Wed Dec 1 10:13:40 2004 @@ -891,7 +891,7 @@ /* This sleep *CAN BE* interrupted. */ { if( secs <= 0.0 ) { - return; + return 0; } Py_BEGIN_ALLOW_THREADS diff -urN /boot/home/devel/python/Python-2.3.4.org/Objects/fileobject.c python/Objects/fileobject.c --- /boot/home/devel/python/Python-2.3.4.org/Objects/fileobject.c Sun Apr 4 09:06:13 2004 +++ python/Objects/fileobject.c Wed Dec 1 10:13:55 2004 @@ -36,6 +36,13 @@ #include #endif +#ifdef __BEOS__ +/* _ftell is broken, and ftello isn't declared... + so declare ftello correctly to avoid int being + the return type */ +extern fpos_t ftello(FILE *); +#endif + #define BUF(v) PyString_AS_STRING((PyStringObject *)v) #ifndef DONT_HAVE_ERRNO_H diff -urN /boot/home/devel/python/Python-2.3.4.org/configure python/configure --- /boot/home/devel/python/Python-2.3.4.org/configure Fri May 7 21:13:40 2004 +++ python/configure Wed Dec 1 10:14:44 2004 @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 1.427.4.12 . +# From configure.in Revision: 1.427.4.13 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.57 for python 2.3. # @@ -1420,6 +1420,8 @@ cygwin*) MACHDEP="cygwin";; darwin*) MACHDEP="darwin";; atheos*) MACHDEP="atheos";; + beos5*) MACHDEP="beos5" test -f /system/lib/libzeta.so && MACHDEP="zeta";; + zeta*) MACHDEP="zeta";; irix646) MACHDEP="irix6";; '') MACHDEP="unknown";; esac @@ -1562,7 +1564,7 @@ case $ac_sys_system in AIX*) CC=cc_r without_gcc=;; - BeOS*) + BeOS*|Zeta*) case $BE_HOST_CPU in ppc) CC=mwcc @@ -1582,7 +1584,7 @@ { (exit 1); exit 1; }; } ;; esac - AR="\$(srcdir)/Modules/ar_beos" + AR="\$(srcdir)/Modules/ar_beos" RANLIB=: ;; Monterey*) @@ -3590,8 +3592,9 @@ _ACEOF case $ac_sys_system in - BeOS*) + BeOS*|Zeta*) LDLIBRARY='libpython$(VERSION).so' + RUNSHARED=LIBRARY_PATH=`pwd`:${LIBRARY_PATH} ;; CYGWIN*) LDLIBRARY='libpython$(VERSION).dll.a' @@ -3875,7 +3878,7 @@ if test -z "$LN" ; then case $ac_sys_system in - BeOS*) LN="ln -s";; + BeOS*|Zeta*) LN="ln -s";; CYGWIN*) LN="ln -s";; atheos*) LN="ln -s";; *) LN=ln;; @@ -10060,7 +10063,7 @@ BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp" LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp" ;; - BeOS*) + BeOS*|Zeta*) BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY" LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY" ;; @@ -10602,17 +10605,17 @@ # Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl. # However on SGI IRIX 4, these exist but are broken. -# BeOS' sockets are stashed in libnet. +# BeOS' sockets are stashed in libnet _except_ on BONE. case "$ac_sys_system" in IRIX*) ;; -*) -echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5 -echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6 -if test "${ac_cv_lib_nsl_t_open+set}" = set; then +BeOS*|Zeta*) +echo "$as_me:$LINENO: checking for socket in -lsocket" >&5 +echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6 +if test "${ac_cv_lib_socket_socket+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lnsl $LIBS" +LIBS="-lsocket $LIBS $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ @@ -10627,11 +10630,11 @@ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char t_open (); +char socket (); int main () { -t_open (); +socket (); ; return 0; } @@ -10648,29 +10651,29 @@ ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_nsl_t_open=yes + ac_cv_lib_socket_socket=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_nsl_t_open=no +ac_cv_lib_socket_socket=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5 -echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6 -if test $ac_cv_lib_nsl_t_open = yes; then - LIBS="-lnsl $LIBS" -fi - # SVR4 -echo "$as_me:$LINENO: checking for socket in -lsocket" >&5 -echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6 -if test "${ac_cv_lib_socket_socket+set}" = set; then +echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6 +if test $ac_cv_lib_socket_socket = yes; then + LIBS="-lsocket $LIBS" +else + + echo "$as_me:$LINENO: checking for socket in -lnet" >&5 +echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6 +if test "${ac_cv_lib_net_socket+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lsocket $LIBS $LIBS" +LIBS="-lnet $LIBS $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ @@ -10706,33 +10709,152 @@ ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_socket_socket=yes + ac_cv_lib_net_socket=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_socket_socket=no +ac_cv_lib_net_socket=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5 -echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6 -if test $ac_cv_lib_socket_socket = yes; then - LIBS="-lsocket $LIBS" +echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5 +echo "${ECHO_T}$ac_cv_lib_net_socket" >&6 +if test $ac_cv_lib_net_socket = yes; then + LIBS="-lnet $LIBS" fi - # SVR4 sockets + # BeOS net_server + +fi + # BONE +echo "$as_me:$LINENO: checking for gethostbyname in -lbind" >&5 +echo $ECHO_N "checking for gethostbyname in -lbind... $ECHO_C" >&6 +if test "${ac_cv_lib_bind_gethostbyname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lbind $LIBS $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char gethostbyname (); +int +main () +{ +gethostbyname (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_bind_gethostbyname=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_bind_gethostbyname=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_bind_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_lib_bind_gethostbyname" >&6 +if test $ac_cv_lib_bind_gethostbyname = yes; then + LIBS="-lbind $LIBS" +fi + # BONE +# its broken in BONE... +ac_cv_func_getnameinfo=no ;; -esac -case "$ac_sys_system" in -BeOS*) -echo "$as_me:$LINENO: checking for socket in -lnet" >&5 -echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6 -if test "${ac_cv_lib_net_socket+set}" = set; then +*) +echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5 +echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6 +if test "${ac_cv_lib_nsl_t_open+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lnet $LIBS $LIBS" +LIBS="-lnsl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char t_open (); +int +main () +{ +t_open (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_nsl_t_open=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_nsl_t_open=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5 +echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6 +if test $ac_cv_lib_nsl_t_open = yes; then + LIBS="-lnsl $LIBS" +fi + # SVR4 +echo "$as_me:$LINENO: checking for socket in -lsocket" >&5 +echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6 +if test "${ac_cv_lib_socket_socket+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsocket $LIBS $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ @@ -10768,22 +10890,22 @@ ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_net_socket=yes + ac_cv_lib_socket_socket=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_net_socket=no +ac_cv_lib_socket_socket=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5 -echo "${ECHO_T}$ac_cv_lib_net_socket" >&6 -if test $ac_cv_lib_net_socket = yes; then - LIBS="-lnet $LIBS" +echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6 +if test $ac_cv_lib_socket_socket = yes; then + LIBS="-lsocket $LIBS" fi - # BeOS + # SVR4 sockets ;; esac @@ -11711,6 +11833,7 @@ #define BEOS_THREADS 1 _ACEOF + posix_threads=no THREADOBJ="Python/thread.o" else @@ -12984,7 +13107,7 @@ else DYNLOADFILE="dynload_aix.o" fi ;; - BeOS*) DYNLOADFILE="dynload_beos.o";; + BeOS*|Zeta*) DYNLOADFILE="dynload_beos.o";; hp*|HP*) DYNLOADFILE="dynload_hpux.o";; Darwin/*) DYNLOADFILE="dynload_next.o";; atheos*) DYNLOADFILE="dynload_atheos.o";; @@ -17040,7 +17163,7 @@ case $ac_sys_system in Darwin) ;; -BeOS) ;; +BeOS|Zeta) ;; *) LIBM=-lm esac echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5 diff -urN /boot/home/devel/python/Python-2.3.4.org/configure.in python/configure.in --- /boot/home/devel/python/Python-2.3.4.org/configure.in Fri May 7 21:13:47 2004 +++ python/configure.in Wed Dec 1 10:14:45 2004 @@ -117,6 +117,9 @@ cygwin*) MACHDEP="cygwin";; darwin*) MACHDEP="darwin";; atheos*) MACHDEP="atheos";; + beos5*) MACHDEP="beos5" dnl prepare for the future... + test -f /system/lib/libzeta.so && MACHDEP="zeta";; + zeta*) MACHDEP="zeta";; irix646) MACHDEP="irix6";; '') MACHDEP="unknown";; esac @@ -241,7 +244,7 @@ case $ac_sys_system in AIX*) CC=cc_r without_gcc=;; - BeOS*) + BeOS*|Zeta*) case $BE_HOST_CPU in ppc) CC=mwcc @@ -259,6 +262,7 @@ AC_MSG_ERROR([Unknown BeOS platform "$BE_HOST_CPU"]) ;; esac + dnl WTF ??? AR="\$(srcdir)/Modules/ar_beos" RANLIB=: ;; @@ -510,8 +514,9 @@ if test $enable_shared = "yes"; then AC_DEFINE(Py_ENABLE_SHARED, 1, [Defined if Python is built as a shared library.]) case $ac_sys_system in - BeOS*) + BeOS*|Zeta*) LDLIBRARY='libpython$(VERSION).so' + RUNSHARED=LIBRARY_PATH=`pwd`:${LIBRARY_PATH} ;; CYGWIN*) LDLIBRARY='libpython$(VERSION).dll.a' @@ -574,7 +579,7 @@ AC_SUBST(LN) if test -z "$LN" ; then case $ac_sys_system in - BeOS*) LN="ln -s";; + BeOS*|Zeta*) LN="ln -s";; CYGWIN*) LN="ln -s";; atheos*) LN="ln -s";; *) LN=ln;; @@ -1243,7 +1248,7 @@ BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp" LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp" ;; - BeOS*) + BeOS*|Zeta*) BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY" LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY" ;; @@ -1449,19 +1454,22 @@ # Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl. # However on SGI IRIX 4, these exist but are broken. -# BeOS' sockets are stashed in libnet. +# BeOS' sockets are stashed in libnet _except_ on BONE. case "$ac_sys_system" in IRIX*) ;; +BeOS*|Zeta*) +AC_CHECK_LIB(socket, socket, [LIBS="-lsocket $LIBS"], [ + AC_CHECK_LIB(net, socket, [LIBS="-lnet $LIBS"], [], $LIBS) # BeOS net_server + ], $LIBS) # BONE +AC_CHECK_LIB(bind, gethostbyname, [LIBS="-lbind $LIBS"], [], $LIBS) # BONE +# its broken in BONE... +ac_cv_func_getnameinfo=no +;; *) AC_CHECK_LIB(nsl, t_open, [LIBS="-lnsl $LIBS"]) # SVR4 AC_CHECK_LIB(socket, socket, [LIBS="-lsocket $LIBS"], [], $LIBS) # SVR4 sockets ;; esac -case "$ac_sys_system" in -BeOS*) -AC_CHECK_LIB(net, socket, [LIBS="-lnet $LIBS"], [], $LIBS) # BeOS -;; -esac AC_MSG_CHECKING(for --with-libs) AC_ARG_WITH(libs, @@ -1638,6 +1646,7 @@ AC_CHECK_HEADER(kernel/OS.h, [AC_DEFINE(WITH_THREAD) AC_DEFINE(BEOS_THREADS, 1, [Define this if you have BeOS threads.]) + posix_threads=no THREADOBJ="Python/thread.o"],[ AC_CHECK_LIB(pthreads, pthread_create, [AC_DEFINE(WITH_THREAD) posix_threads=yes @@ -2036,7 +2045,7 @@ else DYNLOADFILE="dynload_aix.o" fi ;; - BeOS*) DYNLOADFILE="dynload_beos.o";; + BeOS*|Zeta*) DYNLOADFILE="dynload_beos.o";; hp*|HP*) DYNLOADFILE="dynload_hpux.o";; Darwin/*) DYNLOADFILE="dynload_next.o";; atheos*) DYNLOADFILE="dynload_atheos.o";; @@ -2630,7 +2639,7 @@ AC_SUBST(LIBM) case $ac_sys_system in Darwin) ;; -BeOS) ;; +BeOS|Zeta) ;; *) LIBM=-lm esac AC_MSG_CHECKING(for --with-libm=STRING) diff -urN /boot/home/devel/python/Python-2.3.4.org/setup.py python/setup.py --- /boot/home/devel/python/Python-2.3.4.org/setup.py Tue Oct 21 22:01:21 2003 +++ python/setup.py Wed Dec 1 10:14:46 2004 @@ -234,7 +234,7 @@ def get_platform(self): # Get value of sys.platform - for platform in ['cygwin', 'beos', 'darwin', 'atheos', 'osf1']: + for platform in ['cygwin', 'beos5', 'zeta', 'darwin', 'atheos', 'osf1']: if sys.platform.startswith(platform): return platform return sys.platform @@ -250,6 +250,13 @@ add_dir_to_list(self.compiler.library_dirs, '/sw/lib') add_dir_to_list(self.compiler.include_dirs, '/sw/include') + # BeOS specific + if sys.platform in ['beos5', 'zeta']: + add_dir_to_list(self.compiler.library_dirs, '/boot/beos/system/lib') + add_dir_to_list(self.compiler.library_dirs, '/boot/home/config/lib') + add_dir_to_list(self.compiler.include_dirs, '/boot/develop/headers') + add_dir_to_list(self.compiler.include_dirs, '/boot/home/config/include') + if os.path.normpath(sys.prefix) != '/usr': add_dir_to_list(self.compiler.library_dirs, sysconfig.get_config_var("LIBDIR")) @@ -278,13 +285,19 @@ inc_dirs += ['/system/include', '/atheos/autolnk/include'] inc_dirs += os.getenv('C_INCLUDE_PATH', '').split(os.pathsep) + # Check for BeOS which has libraries in non-standard locations + if platform in ['beos5', 'zeta']: + lib_dirs = ['/system/lib', '/boot/home/config/lib'] + lib_dirs += os.getenv('LIBRARY_PATH', '').split(':') + inc_dirs += os.getenv('BEINCLUDES', '').split(';') + # OSF/1 has some stuff in /usr/ccs/lib (like -ldb) if platform == 'osf1': lib_dirs += ['/usr/ccs/lib'] - # Check for MacOS X, which doesn't need libm.a at all + # Check for MacOS X and BeOS, which doesn't need libm.a at all math_libs = ['m'] - if platform in ['darwin', 'beos', 'mac']: + if platform in ['darwin', 'beos5', 'zeta', 'mac']: math_libs = [] # XXX Omitted modules: gl, pure, dl, SGI-specific modules @@ -373,7 +386,7 @@ exts.append( Extension('cPickle', ['cPickle.c']) ) # Memory-mapped files (also works on Win32). - if platform not in ['atheos', 'mac']: + if platform not in ['atheos', 'beos5', 'zeta', 'mac']: exts.append( Extension('mmap', ['mmapmodule.c']) ) # Lance Ellinghaus's modules: @@ -437,7 +450,9 @@ # Detect SSL support for the socket module (via _ssl) ssl_incs = find_file('openssl/ssl.h', inc_dirs, ['/usr/local/ssl/include', - '/usr/contrib/ssl/include/' + '/usr/contrib/ssl/include/', + '/boot/develop/headers/', + '/boot/home/config/include' ] ) if ssl_incs is not None: @@ -447,7 +462,9 @@ ssl_incs += krb5_h ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs, ['/usr/local/ssl/lib', - '/usr/contrib/ssl/lib/' + '/usr/contrib/ssl/lib/', + '/boot/beos/system/lib', + '/boot/home/config/lib' ] ) if (ssl_incs is not None and @@ -643,11 +660,11 @@ # Steen Lumholt's termios module exts.append( Extension('termios', ['termios.c']) ) # Jeremy Hylton's rlimit interface - if platform not in ['atheos']: + if platform not in ['atheos', 'beos5', 'zeta']: exts.append( Extension('resource', ['resource.c']) ) # Sun yellow pages. Some systems have the functions in libc. - if platform not in ['cygwin', 'atheos']: + if platform not in ['cygwin', 'atheos', 'beos5', 'zeta']: if (self.compiler.find_library_file(lib_dirs, 'nsl')): libs = ['nsl'] else: @@ -762,9 +779,12 @@ if sys.maxint == 0x7fffffff: # This requires sizeof(int) == sizeof(long) == sizeof(char*) dl_inc = find_file('dlfcn.h', [], inc_dirs) + dl_libs = [] if (dl_inc is not None) and (platform not in ['atheos', 'darwin']): - exts.append( Extension('dl', ['dlmodule.c']) ) - + if self.compiler.find_library_file(lib_dirs, 'dl'): + dl_libs = ['dl'] + exts.append( Extension('dl', ['dlmodule.c'], + libraries=dl_libs) ) # Platform-specific libraries if platform == 'linux2': # Linux-specific modules @@ -944,6 +964,10 @@ platform = self.get_platform() if platform == 'darwin' and \ self.detect_tkinter_darwin(inc_dirs, lib_dirs): + return + + # Dont bother playing with Tk in BeOS yet. + if platform in ['beos5', 'zeta']: return # Assume we haven't found any of the libraries or include files