9245N/A--- Python-2.4.4/Python/import.c.patch05 2006-10-05 14:08:58.000000000 -0400
9245N/A+++ Python-2.4.4/Python/import.c 2006-11-04 20:49:28.497670000 -0500
9672N/A@@ -708,7 +707,8 @@
8904N/A pyc_mtime = PyMarshal_ReadLongFromFile(fp);
8904N/A if (pyc_mtime != mtime) {
9672N/A if (Py_VerboseFlag)
8904N/A- PySys_WriteStderr("# %s has bad mtime\n", cpathname);
8904N/A+ PySys_WriteStderr("# %s has bad mtime %lu vs %lu\n",
8904N/A+cpathname, mtime, pyc_mtime);
8904N/A fclose(fp);
8904N/A return NULL;
8904N/A }
9245N/A@@ -1068,6 +1069,57 @@
8904N/A static int find_init_module(char *); /* Forward */
8904N/A static struct filedescr importhookdescr = {"", "", IMP_HOOK};
8904N/A
8904N/A+#ifdef HAVE_STAT
8904N/A+static char *
8904N/A+insert_64dir(char *buf, size_t buflen)
8904N/A+{
8904N/A+ char *base;
8904N/A+ char *cp;
8904N/A+ size_t blen;
8904N/A+
8904N/A+ if ((blen = strlen(buf)) == 0)
8904N/A+ return (NULL);
8904N/A+
8904N/A+ cp = &buf[blen - 1];
8904N/A+ while (cp != buf && *cp != SEP)
8904N/A+ cp--;
8904N/A+
8904N/A+ if (cp != buf)
8904N/A+ cp++;
8904N/A+
8904N/A+ if (blen + strlen("64/") + 1 >= buflen)
8904N/A+ return NULL;
8904N/A+
8904N/A+ base = strdup(cp);
8904N/A+ sprintf(cp, "64%c%s", SEP, base);
8904N/A+ free(base);
8904N/A+
8904N/A+ return buf;
8904N/A+}
8904N/A+
8904N/A+/*
8904N/A+ * If we're on a 64-bit platform, modify lookups for shared object files.
8904N/A+ */
8904N/A+static size_t modify_path(struct filedescr *fdp, char *buf, size_t buflen)
8904N/A+{
8904N/A+ struct stat statbuf;
8904N/A+
8904N/A+ if (sizeof(void *) != 8)
8904N/A+ return 0;
8904N/A+
8904N/A+ if (stat(buf, &statbuf) == 0 && S_ISDIR(statbuf.st_mode))
8904N/A+ return 0;
8904N/A+
8904N/A+ if (fdp->type != C_EXTENSION)
8904N/A+ return 0;
8904N/A+
8904N/A+ if (insert_64dir(buf, buflen) == NULL)
8904N/A+ return 0;
8904N/A+
8904N/A+ return strlen("64/");
8904N/A+}
8904N/A+#endif
8904N/A+
8904N/A static struct filedescr *
8904N/A find_module(char *fullname, char *subname, PyObject *path, char *buf,
8904N/A size_t buflen, FILE **p_fp, PyObject **p_loader)
9245N/A@@ -1085,11 +1137,10 @@
8904N/A static struct filedescr fd_builtin = {"", "", C_BUILTIN};
8904N/A static struct filedescr fd_package = {"", "", PKG_DIRECTORY};
8904N/A char name[MAXPATHLEN+1];
8904N/A-#if defined(PYOS_OS2)
8904N/A size_t saved_len;
8904N/A size_t saved_namelen;
8904N/A char *saved_buf = NULL;
8904N/A-#endif
8904N/A+
8904N/A if (p_loader != NULL)
8904N/A *p_loader = NULL;
8904N/A
9245N/A@@ -1281,15 +1332,19 @@
8904N/A }
8904N/A #endif
8904N/A #endif
8904N/A-#if defined(PYOS_OS2)
8904N/A+
8904N/A /* take a snapshot of the module spec for restoration
8904N/A * after the 8 character DLL hackery
8904N/A */
8904N/A saved_buf = strdup(buf);
8904N/A saved_len = len;
8904N/A saved_namelen = namelen;
8904N/A-#endif /* PYOS_OS2 */
8904N/A+
8904N/A for (fdp = _PyImport_Filetab; fdp->suffix != NULL; fdp++) {
8904N/A+#ifdef HAVE_STAT
8904N/A+ len += modify_path(fdp, buf, buflen);
8904N/A+#endif
8904N/A+
8904N/A #if defined(PYOS_OS2)
8904N/A /* OS/2 limits DLLs to 8 character names (w/o
8904N/A extension)
9245N/A@@ -1330,21 +1385,18 @@
8904N/A fp = NULL;
8904N/A }
8904N/A }
8904N/A-#if defined(PYOS_OS2)
8904N/A+
8904N/A /* restore the saved snapshot */
8904N/A strcpy(buf, saved_buf);
8904N/A len = saved_len;
8904N/A namelen = saved_namelen;
8904N/A-#endif
8904N/A }
8904N/A-#if defined(PYOS_OS2)
8904N/A /* don't need/want the module name snapshot anymore */
8904N/A if (saved_buf)
8904N/A {
8904N/A free(saved_buf);
8904N/A saved_buf = NULL;
8904N/A }
8904N/A-#endif
8904N/A Py_XDECREF(copy);
8904N/A if (fp != NULL)
8904N/A break;
9245N/A--- Python-2.4.4/Python/importdl.h.patch05 2002-12-30 17:08:05.000000000 -0500
9245N/A+++ Python-2.4.4/Python/importdl.h 2006-11-04 20:49:28.500505000 -0500
9245N/A@@ -31,8 +31,9 @@
9245N/A extern PyObject *_PyImport_LoadDynamicModule(char *name, char *pathname,
9245N/A FILE *);
9245N/A
9245N/A-/* Max length of module suffix searched for -- accommodates "module.slb" */
9245N/A-#define MAXSUFFIXSIZE 12
9245N/A+/* Max length of module suffix searched for -- accommodates "module.slb"
9245N/A+ and "64/" */
9245N/A+#define MAXSUFFIXSIZE 15
9245N/A
9245N/A #ifdef MS_WINDOWS
9245N/A #include <windows.h>
9245N/A--- Python-2.4.4/Lib/distutils/command/build_ext.py.patch05 2004-11-10 17:23:15.000000000 -0500
9245N/A+++ Python-2.4.4/Lib/distutils/command/build_ext.py 2006-11-04 20:49:28.499417000 -0500
8904N/A@@ -614,7 +614,13 @@
8904N/A so_ext = get_config_var('SO')
8904N/A if os.name == 'nt' and self.debug:
8904N/A return apply(os.path.join, ext_path) + '_d' + so_ext
8904N/A- return apply(os.path.join, ext_path) + so_ext
8904N/A+ # .so extensions are word-size specific
8904N/A+ path = apply(os.path.join, ext_path)
8904N/A+ if sys.maxint == 2147483647L:
8904N/A+ return path + so_ext
8904N/A+ dirname = os.path.dirname(path);
8904N/A+ basename = os.path.basename(path);
8904N/A+ return os.path.join(dirname, "64", basename + so_ext)
8904N/A
8904N/A def get_export_symbols (self, ext):
8904N/A """Return the list of symbols that a shared extension has to
9245N/A--- Python-2.4.4/configure.in.patch05 2006-10-17 12:03:36.000000000 -0400
9245N/A+++ Python-2.4.4/configure.in 2006-11-04 21:00:54.845972000 -0500
8904N/A@@ -14,8 +14,36 @@
8904N/A AH_TOP([
8904N/A #ifndef Py_PYCONFIG_H
8904N/A #define Py_PYCONFIG_H
8904N/A+
8904N/A ])
8904N/A AH_BOTTOM([
8904N/A+
8904N/A+#include <sys/isa_defs.h>
8904N/A+
8904N/A+/*
8904N/A+ * Python originally defined these statically, which prevents a 32-64 python
8904N/A+ * from working at all.
8904N/A+ */
8904N/A+
8904N/A+#define SIZEOF_SHORT 2
8904N/A+#define SIZEOF_INT 4
8904N/A+#define SIZEOF_LONG_LONG 8
8904N/A+#define SIZEOF_FPOS_T 8
8904N/A+#define SIZEOF_OFF_T 8
8904N/A+#define SIZEOF_PTHREAD_T 4
8904N/A+
8904N/A+#ifdef _LP64
8904N/A+#define SIZEOF_LONG 8
8904N/A+#define SIZEOF_UINTPTR_T 8
8904N/A+#define SIZEOF_VOID_P 8
8904N/A+#define SIZEOF_TIME_T 8
8904N/A+#else
8904N/A+#define SIZEOF_LONG 4
8904N/A+#define SIZEOF_UINTPTR_T 4
8904N/A+#define SIZEOF_VOID_P 4
8904N/A+#define SIZEOF_TIME_T 4
8904N/A+#endif
8904N/A+
8904N/A /* Define the macros needed if on a UnixWare 7.x system. */
8904N/A #if defined(__USLC__) && defined(__SCO_VERSION__)
8904N/A #define STRICT_SYSV_CURSES /* Don't use ncurses extensions */
8904N/A@@ -56,6 +84,26 @@
8904N/A
8904N/A define_xopen_source=yes
8904N/A
8904N/A+# AC_CHECK_SIZEOF without the AC_DEFINE_UNQUOTED
8904N/A+AC_DEFUN([PY_CHECK_SIZEOF],
8904N/A+[AS_LITERAL_IF([$1], [],
8904N/A+ [AC_FATAL([$0: requires literal arguments])])dnl
8904N/A+AC_CHECK_TYPE([$1], [], [], [$3])
8904N/A+AC_CACHE_CHECK([size of $1], AS_TR_SH([ac_cv_sizeof_$1]),
8904N/A+[if test "$AS_TR_SH([ac_cv_type_$1])" = yes; then
8904N/A+ # The cast to unsigned long works around a bug in the HP C Compiler
8904N/A+ # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8904N/A+ # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8904N/A+ # This bug is HP SR number 8606223364.
8904N/A+ _AC_COMPUTE_INT([(long) (sizeof ($1))],
8904N/A+ [AS_TR_SH([ac_cv_sizeof_$1])],
8904N/A+ [AC_INCLUDES_DEFAULT([$3])],
8904N/A+ [AC_MSG_FAILURE([cannot compute sizeof ($1), 77])])
8904N/A+else
8904N/A+ AS_TR_SH([ac_cv_sizeof_$1])=0
8904N/A+fi])dnl
8904N/A+])# PY_CHECK_SIZEOF
8904N/A+
8904N/A # Arguments passed to configure.
8904N/A AC_SUBST(CONFIG_ARGS)
8904N/A CONFIG_ARGS="$ac_configure_args"
9245N/A@@ -1142,15 +1190,8 @@
8904N/A AC_TYPE_SIZE_T
8904N/A AC_TYPE_UID_T
8904N/A
8904N/A-# Sizes of various common basic types
8904N/A-# ANSI C requires sizeof(char) == 1, so no need to check it
8904N/A-AC_CHECK_SIZEOF(int, 4)
8904N/A-AC_CHECK_SIZEOF(long, 4)
8904N/A-AC_CHECK_SIZEOF(void *, 4)
8904N/A-AC_CHECK_SIZEOF(short, 2)
8904N/A-AC_CHECK_SIZEOF(float, 4)
8904N/A-AC_CHECK_SIZEOF(double, 8)
8904N/A-AC_CHECK_SIZEOF(fpos_t, 4)
8904N/A+PY_CHECK_SIZEOF(short)
8904N/A+PY_CHECK_SIZEOF(long)
8904N/A
8904N/A AC_MSG_CHECKING(for long long support)
8904N/A have_long_long=no
9245N/A@@ -1159,107 +1200,28 @@
8904N/A have_long_long=yes
8904N/A ])
8904N/A AC_MSG_RESULT($have_long_long)
8904N/A-if test "$have_long_long" = yes ; then
8904N/A-AC_CHECK_SIZEOF(long long, 8)
8904N/A-fi
8904N/A
9245N/A AC_CHECK_TYPES(uintptr_t,
9245N/A- [AC_CHECK_SIZEOF(uintptr_t, 4)],
9245N/A+ [],
9245N/A [], [#ifdef HAVE_STDINT_H
9245N/A #include <stdint.h>
9245N/A #endif])
9245N/A
8904N/A
8904N/A-# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
8904N/A-AC_MSG_CHECKING(size of off_t)
8904N/A-AC_CACHE_VAL(ac_cv_sizeof_off_t,
8904N/A-[AC_TRY_RUN([#include <stdio.h>
8904N/A+PY_CHECK_SIZEOF(off_t,4,[
8904N/A+#include <stdio.h>
8904N/A+#include <stdlib.h>
8904N/A #include <sys/types.h>
8904N/A-main()
8904N/A-{
8904N/A- FILE *f=fopen("conftestval", "w");
8904N/A- if (!f) exit(1);
8904N/A- fprintf(f, "%d\n", sizeof(off_t));
8904N/A- exit(0);
8904N/A-}],
8904N/A-ac_cv_sizeof_off_t=`cat conftestval`,
8904N/A-ac_cv_sizeof_off_t=0,
8904N/A-ac_cv_sizeof_off_t=4)
9245N/A-])
8904N/A-AC_MSG_RESULT($ac_cv_sizeof_off_t)
8904N/A-AC_DEFINE_UNQUOTED(SIZEOF_OFF_T, $ac_cv_sizeof_off_t,
8904N/A-[The number of bytes in an off_t.])
9245N/A+])
8904N/A
8904N/A AC_MSG_CHECKING(whether to enable large file support)
8904N/A-if test "$have_long_long" = yes -a \
8904N/A- "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
8904N/A- "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
8904N/A- AC_DEFINE(HAVE_LARGEFILE_SUPPORT, 1,
8904N/A- [Defined to enable large file support when an off_t is bigger than a long
8904N/A- and long long is available and at least as big as an off_t. You may need
8904N/A- to add some flags for configuration and compilation to enable this mode.
8904N/A- (For Solaris and Linux, the necessary defines are already defined.)])
8904N/A- AC_MSG_RESULT(yes)
8904N/A-else
8904N/A- AC_MSG_RESULT(no)
8904N/A-fi
9245N/A-
8904N/A-# AC_CHECK_SIZEOF() doesn't include <time.h>.
8904N/A-AC_MSG_CHECKING(size of time_t)
8904N/A-AC_CACHE_VAL(ac_cv_sizeof_time_t,
8904N/A-[AC_TRY_RUN([#include <stdio.h>
8904N/A-#include <time.h>
8904N/A-main()
8904N/A-{
8904N/A- FILE *f=fopen("conftestval", "w");
8904N/A- if (!f) exit(1);
8904N/A- fprintf(f, "%d\n", sizeof(time_t));
8904N/A- exit(0);
8904N/A-}],
8904N/A-ac_cv_sizeof_time_t=`cat conftestval`,
8904N/A-ac_cv_sizeof_time_t=0,
8904N/A-ac_cv_sizeof_time_t=4)
8904N/A-])
8904N/A-AC_MSG_RESULT($ac_cv_sizeof_time_t)
8904N/A-AC_DEFINE_UNQUOTED(SIZEOF_TIME_T, $ac_cv_sizeof_time_t,
8904N/A-[The number of bytes in a time_t.])
8904N/A-
9245N/A
8904N/A-# if have pthread_t then define SIZEOF_PTHREAD_T
8904N/A-ac_save_cc="$CC"
8904N/A-if test "$ac_cv_kpthread" = "yes"
8904N/A-then CC="$CC -Kpthread"
8904N/A-elif test "$ac_cv_kthread" = "yes"
8904N/A-then CC="$CC -Kthread"
8904N/A-elif test "$ac_cv_pthread" = "yes"
8904N/A-then CC="$CC -pthread"
8904N/A-fi
8904N/A-AC_MSG_CHECKING(for pthread_t)
8904N/A-have_pthread_t=no
8904N/A-AC_TRY_COMPILE([#include <pthread.h>], [pthread_t x; x = *(pthread_t*)0;], have_pthread_t=yes)
8904N/A-AC_MSG_RESULT($have_pthread_t)
8904N/A-if test "$have_pthread_t" = yes ; then
8904N/A- # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
8904N/A- AC_MSG_CHECKING(size of pthread_t)
8904N/A- AC_CACHE_VAL(ac_cv_sizeof_pthread_t,
8904N/A- [AC_TRY_RUN([#include <stdio.h>
8904N/A-#include <pthread.h>
8904N/A- main()
8904N/A- {
8904N/A- FILE *f=fopen("conftestval", "w");
8904N/A- if (!f) exit(1);
8904N/A- fprintf(f, "%d\n", sizeof(pthread_t));
8904N/A- exit(0);
8904N/A- }],
8904N/A- ac_cv_sizeof_pthread_t=`cat conftestval`,
8904N/A- ac_cv_sizeof_pthread_t=0,
8904N/A- ac_cv_sizeof_pthread_t=4)
8904N/A- ])
8904N/A- AC_MSG_RESULT($ac_cv_sizeof_pthread_t)
8904N/A- AC_DEFINE_UNQUOTED(SIZEOF_PTHREAD_T, $ac_cv_sizeof_pthread_t,
8904N/A- [The number of bytes in a pthread_t.])
8904N/A-fi
8904N/A-CC="$ac_save_cc"
9245N/A+AC_DEFINE(HAVE_LARGEFILE_SUPPORT, 1,
9245N/A+[Defined to enable large file support when an off_t is bigger than a long
9245N/A+ and long long is available and at least as big as an off_t. You may need
9245N/A+ to add some flags for configuration and compilation to enable this mode.
9245N/A+ (For Solaris and Linux, the necessary defines are already defined.)])
9245N/A+AC_MSG_RESULT(yes)
9245N/A
8904N/A AC_MSG_CHECKING(for --enable-toolbox-glue)
8904N/A AC_ARG_ENABLE(toolbox-glue,
9245N/A@@ -1496,10 +1458,6 @@
8904N/A if test -z "$CCSHARED"
8904N/A then
8904N/A case $ac_sys_system/$ac_sys_release in
8904N/A- SunOS*) if test "$GCC" = yes;
8904N/A- then CCSHARED="-fPIC";
8904N/A- else CCSHARED="-xcode=pic32";
8904N/A- fi;;
8904N/A hp*|HP*) if test "$GCC" = yes;
8904N/A then CCSHARED="-fPIC";
8904N/A else CCSHARED="+z";
9245N/A@@ -2815,12 +2773,6 @@
8904N/A wchar_h="no"
8904N/A )
8904N/A
8904N/A-# determine wchar_t size
8904N/A-if test "$wchar_h" = yes
8904N/A-then
8904N/A- AC_CHECK_SIZEOF(wchar_t, 4, [#include <wchar.h>])
8904N/A-fi
8904N/A-
8904N/A AC_MSG_CHECKING(for UCS-4 tcl)
8904N/A have_ucs4_tcl=no
8904N/A AC_TRY_COMPILE([
9245N/A@@ -2850,6 +2802,11 @@
8904N/A ac_cv_wchar_t_signed=no,
8904N/A ac_cv_wchar_t_signed=yes)])
8904N/A AC_MSG_RESULT($ac_cv_wchar_t_signed)
8904N/A+
8904N/A+ PY_CHECK_SIZEOF(wchar_t, 4, [
8904N/A+ #include <wchar.h>
8904N/A+ #include <stdlib.h
8904N/A+ ])
8904N/A fi
8904N/A
8904N/A AC_MSG_CHECKING(what type to use for unicode)
9245N/A--- Python-2.4.4/Makefile.pre.in.patch05 2006-10-08 13:41:25.000000000 -0400
9245N/A+++ Python-2.4.4/Makefile.pre.in 2006-11-04 20:49:28.627191000 -0500
9245N/A@@ -79,18 +79,18 @@
8904N/A
8904N/A # Expanded directories
8904N/A BINDIR= $(exec_prefix)/bin
8904N/A-LIBDIR= $(exec_prefix)/lib
8904N/A+LIBDIR= @libdir@
8904N/A MANDIR= @mandir@
8904N/A INCLUDEDIR= @includedir@
8904N/A CONFINCLUDEDIR= $(exec_prefix)/include
8904N/A SCRIPTDIR= $(prefix)/lib
8904N/A
8904N/A # Detailed destination directories
8904N/A-BINLIBDEST= $(LIBDIR)/python$(VERSION)
8904N/A-LIBDEST= $(SCRIPTDIR)/python$(VERSION)
8904N/A-INCLUDEPY= $(INCLUDEDIR)/python$(VERSION)
8904N/A-CONFINCLUDEPY= $(CONFINCLUDEDIR)/python$(VERSION)
8904N/A-LIBP= $(LIBDIR)/python$(VERSION)
8904N/A+BINLIBDEST= $(exec_prefix)/lib/python$(VERSION)
8904N/A+LIBDEST= $(SCRIPTDIR)/python$(VERSION)
8904N/A+INCLUDEPY= $(INCLUDEDIR)/python$(VERSION)
8904N/A+CONFINCLUDEPY= $(CONFINCLUDEDIR)/python$(VERSION)
8904N/A+LIBP= $(exec_prefix)/lib/python$(VERSION)
8904N/A
8904N/A # Symbols used for using shared libraries
8904N/A SO= @SO@
9245N/A@@ -777,6 +777,7 @@
8904N/A
8904N/A # Install the include files
8904N/A INCLDIRSTOMAKE=$(INCLUDEDIR) $(CONFINCLUDEDIR) $(INCLUDEPY) $(CONFINCLUDEPY)
8904N/A+
8904N/A inclinstall:
8904N/A @for i in $(INCLDIRSTOMAKE); \
8904N/A do \