diff -r f48f302f54aa Doc/library/time.rst --- a/Doc/library/time.rst Sun Dec 01 11:04:17 2013 +0100 +++ b/Doc/library/time.rst Thu Nov 28 21:29:02 2013 +0100 @@ -315,7 +315,7 @@ processes running for more than 49 days. On more recent versions of Windows and on other operating systems, :func:`monotonic` is system-wide. - Availability: Windows, Mac OS X, Linux, FreeBSD, OpenBSD, Solaris. + Availability: Windows, Mac OS X, Linux, FreeBSD, OpenBSD, Bitrig, Solaris. .. versionadded:: 3.3 diff -r f48f302f54aa Include/pymath.h --- a/Include/pymath.h Sun Dec 01 11:04:17 2013 +0100 +++ b/Include/pymath.h Thu Nov 28 21:29:02 2013 +0100 @@ -179,7 +179,7 @@ * According to Tim's checkin, the FreeBSD systems use isinf() to work * around a FPE bug on that platform. */ -#if defined(__FreeBSD__) || defined(__OpenBSD__) +#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__Bitrig__) #define Py_OVERFLOWED(X) isinf(X) #else #define Py_OVERFLOWED(X) ((X) != 0.0 && (errno == ERANGE || \ diff -r f48f302f54aa Include/pyport.h --- a/Include/pyport.h Sun Dec 01 11:04:17 2013 +0100 +++ b/Include/pyport.h Thu Nov 28 21:29:02 2013 +0100 @@ -469,7 +469,8 @@ * This isn't reliable. See Py_OVERFLOWED comments. * X is evaluated more than once. */ -#if defined(__FreeBSD__) || defined(__OpenBSD__) || (defined(__hpux) && defined(__ia64)) +#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__Bitrig__) || \ + (defined(__hpux) && defined(__ia64)) #define _Py_SET_EDOM_FOR_NAN(X) if (isnan(X)) errno = EDOM; #else #define _Py_SET_EDOM_FOR_NAN(X) ; diff -r f48f302f54aa Lib/ctypes/util.py --- a/Lib/ctypes/util.py Sun Dec 01 11:04:17 2013 +0100 +++ b/Lib/ctypes/util.py Thu Nov 28 21:29:02 2013 +0100 @@ -143,7 +143,7 @@ return None return res.group(1) - if sys.platform.startswith(("freebsd", "openbsd", "dragonfly")): + if sys.platform.startswith(("freebsd", "openbsd", "bitrig", "dragonfly")): def _num_version(libname): # "libxyz.so.MAJOR.MINOR" => [ MAJOR, MINOR ] diff -r f48f302f54aa Lib/test/test_faulthandler.py --- a/Lib/test/test_faulthandler.py Sun Dec 01 11:04:17 2013 +0100 +++ b/Lib/test/test_faulthandler.py Thu Nov 28 21:29:02 2013 +0100 @@ -163,7 +163,7 @@ 2, 'xyz') - @unittest.skipIf(sys.platform.startswith('openbsd') and HAVE_THREADS, + @unittest.skipIf(sys.platform.startswith(('openbsd', 'bitrig')) and HAVE_THREADS, "Issue #12868: sigaltstack() doesn't work on " "OpenBSD if Python is compiled with pthread") @unittest.skipIf(not hasattr(faulthandler, '_stack_overflow'), diff -r f48f302f54aa Lib/test/test_fcntl.py --- a/Lib/test/test_fcntl.py Sun Dec 01 11:04:17 2013 +0100 +++ b/Lib/test/test_fcntl.py Thu Nov 28 21:29:02 2013 +0100 @@ -22,7 +22,7 @@ else: start_len = "qq" - if (sys.platform.startswith(('netbsd', 'freebsd', 'openbsd', 'bsdos')) + if (sys.platform.startswith(('netbsd', 'freebsd', 'openbsd', 'bitrig', 'bsdos')) or sys.platform == 'darwin'): if struct.calcsize('l') == 8: off_t = 'l' diff -r f48f302f54aa Lib/test/test_fileio.py --- a/Lib/test/test_fileio.py Sun Dec 01 11:04:17 2013 +0100 +++ b/Lib/test/test_fileio.py Thu Nov 28 21:29:02 2013 +0100 @@ -296,7 +296,7 @@ self.assertEqual(f.writable(), True) if sys.platform != "darwin" and \ 'bsd' not in sys.platform and \ - not sys.platform.startswith('sunos'): + not sys.platform.startswith(('sunos', 'bitrig')): # Somehow /dev/tty appears seekable on some BSDs self.assertEqual(f.seekable(), False) self.assertEqual(f.isatty(), True) diff -r f48f302f54aa Lib/test/test_subprocess.py --- a/Lib/test/test_subprocess.py Sun Dec 01 11:04:17 2013 +0100 +++ b/Lib/test/test_subprocess.py Thu Nov 28 21:29:02 2013 +0100 @@ -1445,7 +1445,7 @@ getattr(p, method)(*args) return p - @unittest.skipIf(sys.platform.startswith(('netbsd', 'openbsd')), + @unittest.skipIf(sys.platform.startswith(('netbsd', 'openbsd', 'bitrig')), "Due to known OS bug (issue #16762)") def _kill_dead_process(self, method, *args): # Do not inherit file handles from the parent. diff -r f48f302f54aa Lib/uuid.py --- a/Lib/uuid.py Sun Dec 01 11:04:17 2013 +0100 +++ b/Lib/uuid.py Thu Nov 28 21:29:02 2013 +0100 @@ -346,7 +346,7 @@ # This works on Linux ('' or '-a'), Tru64 ('-av'), but not all Unixes. for args in ('', '-a', '-av'): - mac = _find_mac('ifconfig', args, ['hwaddr', 'ether'], lambda i: i+1) + mac = _find_mac('ifconfig', args, ['hwaddr', 'ether', 'lladdr'], lambda i: i+1) if mac: return mac diff -r f48f302f54aa Modules/_decimal/libmpdec/mpdecimal.c --- a/Modules/_decimal/libmpdec/mpdecimal.c Sun Dec 01 11:04:17 2013 +0100 +++ b/Modules/_decimal/libmpdec/mpdecimal.c Thu Nov 28 21:29:02 2013 +0100 @@ -44,7 +44,7 @@ #if defined(_MSC_VER) #include #pragma fenv_access(on) - #elif !defined(__OpenBSD__) && !defined(__NetBSD__) + #elif !defined(__OpenBSD__) && !defined(__Bitrig__) && !defined(__NetBSD__) /* C99 */ #include #pragma STDC FENV_ACCESS ON diff -r f48f302f54aa Modules/_sha3/keccak/brg_endian.h --- a/Modules/_sha3/keccak/brg_endian.h Sun Dec 01 11:04:17 2013 +0100 +++ b/Modules/_sha3/keccak/brg_endian.h Thu Nov 28 21:29:02 2013 +0100 @@ -36,7 +36,8 @@ /* Include files where endian defines and byteswap functions may reside */ #if defined( __sun ) # include -#elif defined( __FreeBSD__ ) || defined( __OpenBSD__ ) || defined( __NetBSD__ ) +#elif defined( __FreeBSD__ ) || defined( __OpenBSD__ ) || \ + defined( __Bitrig__ ) || defined( __NetBSD__ ) # include #elif defined( BSD ) && ( BSD >= 199103 ) || defined( __APPLE__ ) || \ defined( __CYGWIN32__ ) || defined( __DJGPP__ ) || defined( __osf__ ) diff -r f48f302f54aa Modules/nismodule.c --- a/Modules/nismodule.c Sun Dec 01 11:04:17 2013 +0100 +++ b/Modules/nismodule.c Thu Nov 28 21:29:02 2013 +0100 @@ -89,7 +89,7 @@ return map; } -#if defined(__APPLE__) || defined(__OpenBSD__) || defined(__FreeBSD__) +#if defined(__APPLE__) || defined(__OpenBSD__) || defined(__Bitrig__) || defined(__FreeBSD__) typedef int (*foreachfunc)(unsigned long, char *, int, char *, int, void *); #else typedef int (*foreachfunc)(int, char *, int, char *, int, char *); diff -r f48f302f54aa Modules/posixmodule.c --- a/Modules/posixmodule.c Sun Dec 01 11:04:17 2013 +0100 +++ b/Modules/posixmodule.c Thu Nov 28 21:29:02 2013 +0100 @@ -121,6 +121,7 @@ #if defined(__DragonFly__) || \ defined(__OpenBSD__) || \ + defined(__Bitrig__) || \ defined(__FreeBSD__) || \ defined(__NetBSD__) || \ defined(__APPLE__) @@ -11024,6 +11025,7 @@ ncpu = sysconf(_SC_NPROCESSORS_ONLN); #elif defined(__DragonFly__) || \ defined(__OpenBSD__) || \ + defined(__Bitrig__) || \ defined(__FreeBSD__) || \ defined(__NetBSD__) || \ defined(__APPLE__) diff -r f48f302f54aa Modules/selectmodule.c --- a/Modules/selectmodule.c Sun Dec 01 11:04:17 2013 +0100 +++ b/Modules/selectmodule.c Thu Nov 28 21:29:02 2013 +0100 @@ -1690,7 +1690,7 @@ /* * kevent is not standard and its members vary across BSDs. */ -#if !defined(__OpenBSD__) +#if !defined(__OpenBSD__) && !defined(__Bitrig__) # define IDENT_TYPE T_UINTPTRT # define IDENT_CAST Py_intptr_t # define DATA_TYPE T_INTPTRT diff -r f48f302f54aa Modules/socketmodule.c --- a/Modules/socketmodule.c Sun Dec 01 11:04:17 2013 +0100 +++ b/Modules/socketmodule.c Thu Nov 28 21:29:02 2013 +0100 @@ -154,7 +154,7 @@ # undef HAVE_GETHOSTBYNAME_R_6_ARG #endif -#if defined(__OpenBSD__) +#if defined(__OpenBSD__) || defined(__Bitrig__) # include #endif @@ -187,7 +187,7 @@ (this includes the getaddrinfo emulation) protect access with a lock. */ #if defined(WITH_THREAD) && (defined(__APPLE__) || \ (defined(__FreeBSD__) && __FreeBSD_version+0 < 503000) || \ - defined(__OpenBSD__) || defined(__NetBSD__) || \ + defined(__OpenBSD__) || defined(__Bitrig__) || defined(__NetBSD__) || \ defined(__VMS) || !defined(HAVE_GETADDRINFO)) #define USE_GETADDRINFO_LOCK #endif diff -r f48f302f54aa configure --- a/configure Sun Dec 01 11:04:17 2013 +0100 +++ b/configure Thu Nov 28 21:29:02 2013 +0100 @@ -3363,7 +3363,7 @@ $as_echo "#define _BSD_SOURCE 1" >>confdefs.h ;; - OpenBSD/*) + OpenBSD/*|Bitrig/*) # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is # also defined. This can be overridden by defining _BSD_SOURCE # As this has a different meaning on Linux, only define it on OpenBSD @@ -5617,7 +5617,7 @@ PY3LIBRARY=libpython3.so fi ;; - Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*) + Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*|Bitrig*) LDLIBRARY='libpython$(LDVERSION).so' BLDLIBRARY='-L. -lpython$(LDVERSION)' RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH} @@ -5625,6 +5625,9 @@ FreeBSD*) SOVERSION=`echo $SOVERSION|cut -d "." -f 1` ;; + OpenBSD*|Bitrig*) + SOVERSION=0.0 + ;; esac INSTSONAME="$LDLIBRARY".$SOVERSION if test "$with_pydebug" != yes @@ -8583,7 +8586,7 @@ else LDSHARED="ld -Bshareable" fi;; - OpenBSD*) + OpenBSD*|Bitrig*) if [ "`$CC -dM -E -