diff -up Python-2.6.5/configure.in.orig Python-2.6.5/configure.in --- Python-2.6.5/configure.in.orig 2010-03-09 14:47:28.011272192 -0700 +++ Python-2.6.5/configure.in 2010-04-26 15:46:56.072613888 -0600 @@ -747,7 +747,7 @@ if test $enable_shared = "yes"; then RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH} INSTSONAME="$LDLIBRARY".$SOVERSION ;; - Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*) + Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|Haiku*) LDLIBRARY='libpython$(VERSION).so' BLDLIBRARY='-L. -lpython$(VERSION)' RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH} @@ -825,7 +825,7 @@ AC_PROG_INSTALL AC_SUBST(LN) if test -z "$LN" ; then case $ac_sys_system in - BeOS*) LN="ln -s";; + BeOS*|Haiku*) LN="ln -s";; CYGWIN*) LN="ln -s";; atheos*) LN="ln -s";; *) LN=ln;; @@ -1813,7 +1813,7 @@ then fi fi ;; - Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';; + Linux*|GNU*|QNX*|Haiku*) LDSHARED='$(CC) -shared';; BSD/OS*/4*) LDSHARED="gcc -shared";; FreeBSD*) if [[ "`$CC -dM -E - #include diff -up Python-2.6.5/Modules/spwdmodule.c.orig Python-2.6.5/Modules/spwdmodule.c --- Python-2.6.5/Modules/spwdmodule.c.orig 2008-06-08 22:58:54.041418752 -0600 +++ Python-2.6.5/Modules/spwdmodule.c 2010-04-26 15:46:55.977534976 -0600 @@ -79,7 +79,9 @@ static PyObject *mkspent(struct spwd *p) SETS(setIndex++, p->sp_namp); SETS(setIndex++, p->sp_pwdp); +#ifndef __HAIKU__ SETI(setIndex++, p->sp_lstchg); +#endif SETI(setIndex++, p->sp_min); SETI(setIndex++, p->sp_max); SETI(setIndex++, p->sp_warn); diff -up Python-2.6.5/Modules/timemodule.c.orig Python-2.6.5/Modules/timemodule.c --- Python-2.6.5/Modules/timemodule.c.orig 2008-07-05 13:19:50.026214400 -0600 +++ Python-2.6.5/Modules/timemodule.c 2010-04-26 15:46:56.001048576 -0600 @@ -968,11 +968,11 @@ floatsleep(double secs) return -1; } Py_END_ALLOW_THREADS -#elif defined(__BEOS__) +#elif defined(__BEOS__) || defined(__HAIKU__) /* This sleep *CAN BE* interrupted. */ { if( secs <= 0.0 ) { - return; + return 0; } Py_BEGIN_ALLOW_THREADS diff -up Python-2.6.5/Parser/asdl_c.py.orig Python-2.6.5/Parser/asdl_c.py --- Python-2.6.5/Parser/asdl_c.py.orig 2009-12-12 17:59:01.002621440 -0700 +++ Python-2.6.5/Parser/asdl_c.py 2010-04-26 15:46:56.004456448 -0600 @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /bin/env python """Generate C code from an ASDL description.""" # TO DO diff -up Python-2.6.5/Python/bltinmodule.c.orig Python-2.6.5/Python/bltinmodule.c --- Python-2.6.5/Python/bltinmodule.c.orig 2010-04-26 15:47:08.138936320 -0600 +++ Python-2.6.5/Python/bltinmodule.c 2010-04-26 15:47:23.016777216 -0600 @@ -18,7 +18,7 @@ */ #if defined(MS_WINDOWS) && defined(HAVE_USABLE_WCHAR_T) const char *Py_FileSystemDefaultEncoding = "mbcs"; -#elif defined(__APPLE__) +#elif defined(__APPLE__) || defined(__HAIKU__) const char *Py_FileSystemDefaultEncoding = "utf-8"; #else const char *Py_FileSystemDefaultEncoding = NULL; /* use default */ diff -up Python-2.6.5/Tools/scripts/h2py.py.orig Python-2.6.5/Tools/scripts/h2py.py --- Python-2.6.5/Tools/scripts/h2py.py.orig 2004-08-09 11:27:55.006815744 -0600 +++ Python-2.6.5/Tools/scripts/h2py.py 2010-04-26 15:46:56.047710208 -0600 @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /bin/env python # Read #define's and translate to Python code. # Handle #include statements. @@ -50,7 +50,7 @@ except KeyError: searchdirs=os.environ['INCLUDE'].split(';') except KeyError: try: - if sys.platform.find("beos") == 0: + if sys.platform.find("beos") == 0 or sys.platform.find("haiku1") == 0: searchdirs=os.environ['BEINCLUDES'].split(';') elif sys.platform.startswith("atheos"): searchdirs=os.environ['C_INCLUDE_PATH'].split(':')