*** Modules/getpath.c.orig 2011-07-15 11:28:38.710922850 -0400 --- Modules/getpath.c 2011-07-15 11:31:44.690922745 -0400 *************** *** 1,5 **** --- 1,13 ---- /* Return the initial module search path. */ + #ifdef __hpux + /* Workaround for HP/UX compiler bug */ + #define HPUX_STRING_PASTE_KLUDGE_INNER(x) L ## x + #define CONV_WCHAR_T_STRING(y) HPUX_STRING_PASTE_KLUDGE_INNER(y) + #else + #define CONV_WCHAR_T_STRING(y) y + #endif + #include "Python.h" #include "osdefs.h" *************** *** 100,106 **** extern "C" { #endif - #ifndef VERSION #define VERSION "2.1" #endif --- 108,113 ---- *************** *** 135,141 **** static wchar_t progpath[MAXPATHLEN+1]; static wchar_t *module_search_path = NULL; static int module_search_path_malloced = 0; ! static wchar_t *lib_python = L"lib/python" VERSION; static void reduce(wchar_t *dir) --- 142,148 ---- static wchar_t progpath[MAXPATHLEN+1]; static wchar_t *module_search_path = NULL; static int module_search_path_malloced = 0; ! static wchar_t *lib_python = L"lib/python" CONV_WCHAR_T_STRING(VERSION); static void reduce(wchar_t *dir) *************** *** 641,647 **** /* We can't exit, so print a warning and limp along */ fprintf(stderr, "Not enough memory for dynamic PYTHONPATH.\n"); fprintf(stderr, "Using default static PYTHONPATH.\n"); ! module_search_path = L"" PYTHONPATH; } else { /* Run-time value of $PYTHONPATH goes first */ --- 648,654 ---- /* We can't exit, so print a warning and limp along */ fprintf(stderr, "Not enough memory for dynamic PYTHONPATH.\n"); fprintf(stderr, "Using default static PYTHONPATH.\n"); ! module_search_path = L"" CONV_WCHAR_T_STRING(PYTHONPATH); } else { /* Run-time value of $PYTHONPATH goes first */