Index: sysmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/sysmodule.c,v retrieving revision 2.112 diff -c -r2.112 sysmodule.c *** sysmodule.c 8 Jan 2003 14:33:48 -0000 2.112 --- sysmodule.c 10 Jan 2003 14:13:11 -0000 *************** *** 969,977 **** void PySys_SetArgv(int argc, char **argv) { ! #ifdef MS_WINDOWS ! char fullpath[MAX_PATH]; ! #endif PyObject *av = makeargvobject(argc, argv); PyObject *path = PySys_GetObject("path"); if (av == NULL) --- 969,975 ---- void PySys_SetArgv(int argc, char **argv) { ! char fullpath[MAXPATHLEN+1]; PyObject *av = makeargvobject(argc, argv); PyObject *path = PySys_GetObject("path"); if (av == NULL) *************** *** 1035,1040 **** --- 1033,1044 ---- } } #else /* All other filename syntaxes */ + #if SEP == '/' + /* What's the correct define to check here? */ + /* How can we be sure 'realpath' is available? */ + if (argc > 0 && argv0 != NULL && realpath(argv0, fullpath)) + argv0 = fullpath; + #endif if (argc > 0 && argv0 != NULL) p = strrchr(argv0, SEP); if (p != NULL) {