summaryrefslogtreecommitdiff
path: root/Modules/getpath.c
AgeCommit message (Collapse)AuthorLines
2002-09-13SF # 602108 ensure string is null terminated after strncpyNeal Norwitz-0/+1
2002-01-12Include <unistd.h> in Python.h. Fixes #500924.Martin v. Löwis-4/+0
2001-12-02Changed logic for finding python home in Mac OS X framework Pythons.Jack Jansen-47/+45
Now sys.executable points to the executable again, in stead of to the shared library. The latter is used only for locating the python home.
2001-09-28Be more rigorous about making pathnames absolute, to address SF bugGuido van Rossum-53/+58
#424002. Refactor init_path_from_argv0() and rename to copy_absolute(); add absolutize() which does the same in-place. Clean up whitespace (leading tabs -> spaces, delete trailing spaces/tabs).
2001-08-15With WITH_NEXT_FRAMEWORK defined we now also expect a normal PythonJack Jansen-6/+20
installation. If there is no LANDMARK we assume we're a bare framework in the install directory (again WITH_NEXT_FRAMEWORK only).
2001-08-08Put conditional S_ISDIR definition(s) into pyport.h.Martin v. Löwis-9/+0
2001-07-23Add -E command line switch (ignore environment variables like PYTHONHOMENeil Schemenauer-1/+1
and PYTHONPATH).
2001-01-24Build now happens in toplevel directory, not Modules. Don't monkey withNeil Schemenauer-12/+1
VPATH.
2001-01-23Clean up some comments and the default VERSION.Guido van Rossum-3/+2
2000-09-28Minor ANSIfication: lib_python no longer needs to be initializedFred Drake-4/+1
dynamically to support K&R C since we are requiring an ANSI compiler.
2000-09-27Fix buffer overflow vulnerabilities in calculate_path(). Code usedJeremy Hylton-16/+41
copied strings from environment variables and argv[0] into fixed-length buffers without checking their length. Reported by Stan Bubrouski; advice on fix from John Viega.
2000-09-25fix bug #114290: when interpreter's argv[0] has a relative path makeJeremy Hylton-2/+19
it absolute by joining it with getcwd result. avoid including unnecessary ./ in path but do not test for ../ (more complicated)
2000-09-01REMOVED all CWI, CNRI and BeOpen copyright markings.Guido van Rossum-9/+0
This should match the situation in the 1.6b1 tree.
2000-07-22Even more ANSIfication: fix as many function pointers and declarations asThomas Wouters-1/+1
possible.
2000-07-21Bunch of minor ANSIfications: 'void initfunc()' -> 'void initfunc(void)',Thomas Wouters-5/+5
and a couple of functions that were missed in the previous batches. Not terribly tested, but very carefully scrutinized, three times. All these were found by the little findkrc.py that I posted to python-dev, which means there might be more lurking. Cases such as this: long func(a, b) long a; long b; /* flagword */ { and other cases where the last ; in the argument list isn't followed by a newline and an opening curly bracket. Regexps to catch all are welcome, of course ;)
2000-07-16Spelling fixes supplied by Rob W. W. Hooft. All these are fixes in eitherThomas Wouters-1/+1
comments, docstrings or error messages. I fixed two minor things in test_winreg.py ("didn't" -> "Didn't" and "Didnt" -> "Didn't"). There is a minor style issue involved: Guido seems to have preferred English grammar (behaviour, honour) in a couple places. This patch changes that to American, which is the more prominent style in the source. I prefer English myself, so if English is preferred, I'd be happy to supply a patch myself ;)
2000-07-08ANSI-fied sources, converted to four-space indentation.Fred Drake-338/+329
2000-06-30Change copyright notice - 2nd try.Guido van Rossum-6/+0
2000-06-30Change copyright notice.Guido van Rossum-21/+6
2000-06-28Trent Mick: use size_t instead of int where appropriate (various spots).Guido van Rossum-9/+9
2000-05-26Patch from M.-A. Lemburg:Jeremy Hylton-25/+23
Python on UNIX now trusts PYTHONHOME unconditionally Modules/getpath.c: Landmark changed to os.py. Setting PYTHONHOME now unconditionally sets sys.prefix (and sys.exec_prefix). No further checks are done whether the standard lib can be found in that location or not. This is in sync with the PC subdir getpath implementations. PC/getpathp.c: Landmark changed to os.py. PC/os2vacpp/getpathp.c: Landmark changed to os.py. Note: BAW's checkin on exceptions.c eliminates earlier concerns about a bogus PYTHONHOME value leading to a core dump. Instead it causes a useless sys.path and prevents imports.
2000-05-03Vladimir Marangozov's long-awaited malloc restructuring.Guido van Rossum-1/+1
For more comments, read the patches@python.org archives. For documentation read the comments in mymalloc.h and objimpl.h. (This is not exactly what Vladimir posted to the patches list; I've made a few changes, and Vladimir sent me a fix in private email for a problem that only occurs in debug mode. I'm also holding back on his change to main.c, which seems unnecessary to me.)
1999-01-27Patches by William Lewis for Nextstep descendants.Guido van Rossum-0/+24
1998-04-29When following symlinks to the real executable, use a loop so aGuido van Rossum-1/+2
symlink to a symlink can work. (Jack)
1998-02-06- Use Py_GetPythonHome() instead of getenv("PYTHONHOME").Guido van Rossum-2/+4
- Don't print error messages when Py_FrozenFlag is set.
1998-01-19Instead of a single exists(), differentiate between files, modules,Guido van Rossum-13/+70
executable files, and directories. When expecting a module, we also look for the .pyc or .pyo file.
1997-12-10Remove "Lib/test" from the default path; this is now a package!Guido van Rossum-1/+0
1997-10-20Change sharedmodules to lib-dynload.Guido van Rossum-6/+6
### If you still have sharedmodules in your Modules/Setup file, remove it! ###
1997-08-20Globally renamed join() to joinpath() to avoid compilation error on Cray.Guido van Rossum-22/+22
1997-06-02Use string.h, not strings.hGuido van Rossum-1/+1
1997-05-20Make delimiter and separator static for K&R C.Guido van Rossum-3/+11
1997-05-13Keep gcc -Wall happy.Guido van Rossum-2/+2
1997-05-12Another change suggested by Donn Cave -- forget "step 5", whichGuido van Rossum-21/+2
searches /usr/local, /usr and /.
1997-05-12Fix problem reported by Donn Cave: if VPATH is an absolute path, itGuido van Rossum-18/+25
would always be a hit. Prevent this by only using VPATH if we know we are in the build directory.
1997-04-11Removed two unused static function: string_addsep() andBarry Warsaw-98/+61
string_append(). These must be artifacts of GvR's rewrite. Fixed some typos in the leading comment (and re-filled the paragraphs). Hope you don't mind, Guido.
1997-04-11Completely revamped the way the default path is constructed.Guido van Rossum-32/+529
Idea and first three implementation rounds due to Barry -- after that I spent another day on it, hopefully it's enough for now :-) (Wait for the checkin to Setup.in.)
1996-10-25New permission notice, includes CNRI.Guido van Rossum-12/+19
1996-07-30Don't have "." in the default path.Guido van Rossum-2/+2
1996-06-12provide access to $(exec_)prefixGuido van Rossum-0/+23
1996-05-28grand renaming; added copyright to some filesGuido van Rossum-12/+32
1996-02-25Include stdlib.h or declare getenvGuido van Rossum-0/+6
1995-08-04Initial revisionGuido van Rossum-0/+41