| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
building the dicts used to inform the user about the defined
constants when using the *conf*() APIs.
Thanks to Mark Hammond <mhammond@skippinet.com.au>.
|
|
|
|
|
|
|
|
|
|
|
|
| |
strings to integers for the *conf*() functions.
Added code to sort the tables at module initialization. Three
dictionaries, confstr_names, sysconf_names, and pathconf_names, are
added to the module as well. These map known configuration setting
names to the numeric value which is used to represent the setting in
the system call. This code is always called.
Updated related comments.
|
|
|
|
|
|
|
|
| |
pathconf() names, from Sjoerd.
Added code to verify that these tables are properly ordered, only
included and used when CHECK_CONFNAME_TABLES is defined. This is only
needed to test the tables, so I haven't enabled this by default.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
available since the interface is poorly defined on at least one major
platform (Solaris).
Moved table of constant names for fpathconf() & pathconf() into the
conditional that defines the conv_path_confname() helper; Mark Hammond
reported that defining the table when none of the constants were
defined causes the compiler to complain (won't allow 0-length array,
imagine that!).
In posix_fpathconf(), use conv_path_confname() as the O& conversion
function, instead of the conv_confname() helper, which has the wrong
signature (posix_pathconf() already used the right thing).
|
| |
|
|
|
|
|
|
|
| |
and sysconf().
*Lots* of tables to define names used by *conf*(); explanation to go
in message to python-dev list.
|
|
|
|
|
|
|
|
|
| |
and TMP_MAX.
Converted all functions that used PyArg_Parse() or PyArg_NoArgs() to
use PyArg_ParseTuple() and specified all function names using the
:name syntax in the format strings, to allow better error messages
when TypeError is raised for parameter type mismatches.
|
|
|
|
| |
before it reveals the needed definitions in sys/statvfs.h.
|
|
|
|
|
|
| |
environment variable repeatedly. I posted this to the list
some time ago, but only now got around to asking g--d- what he
thought about it.
|
|
|
|
|
|
| |
Treat them as read-only, and make a copy as appropriately. This was
first reported by Bill Janssend and later by Craig Rowland and Ron
Sedlmeyer. This fix is mine.
|
|
|
|
|
|
|
|
| |
different values in the environ dict with the same key (although he
couldn't explain exactly how this came to be). Since getenv() uses
the first one, Python should do too. (Some doubts about case
sensitivity, but for now this at least seems the right thing to do
regardless of platform.)
|
|
|
|
|
|
| |
posix_error_with_filename() instead of posix_error(), passing in the
name argument, so you get information on which directory was being
listed.
|
| |
|
| |
|
|
|
|
| |
actual code does not allow such an argument. (Finn Bock.)
|
|
|
|
| |
underscore after all, for consistency with the O_* symnbols.
|
|
|
|
| |
os.times().
|
|
|
|
|
|
| |
was just an alias for PyExc_OSError and the way we were doing it was
causing a (small) memory leak anyway. Just use PyExc_OSError
everywhere.
|
|
|
|
|
|
| |
f_fsid field, since it's not a scalar on all systems supporting this
call (in particular, it's a tuple of two longs on AIX). Since it's
not particularly useful, just nuke it. Adapted the doc strings too.
|
|
|
|
| |
a process exit status as a parameter.
|
| |
|
| |
|
|
|
|
| |
this doesn't exist everywhere, so go back to using #ifdef NeXT.
|
| |
|
| |
|
|
|
|
| |
Also define F_OK etc. when not already defined, when doing access().
|
|
|
|
|
| |
anywhere (or, more likely, the declaration requires a magical
combination of _POSIX defines).
|
|
|
|
| |
HAVE_* macros set by configure script.
|
|
|
|
| |
Patch (again) by Sean Reifschneider.
|
|
|
|
| |
Also added access() and ttyname() by Sean Reifschneider.
|
|
|
|
| |
on BeOS or Windows.
|
| |
|
|
|
|
| |
Patch by Jeff Rush.
|
|
|
|
|
| |
ERROR_FILE_NOT_FOUND, return an empty list instead of raising an
exception.
|
| |
|
|
|
|
|
| |
status inspection" macros as functions: WEXITSTATUS(), WIFEXITED(),
WIFSIGNALED(), WIFSTOPPED(), WSTOPSIG(), WTERMSIG().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
exceptions:
posix_error_with_filename(): New function which calls
PyErr_SetFromErrnoWithFilename()
The following methods have been changed to call
posix_error_with_filename():
posix_1str()
posix_strint()
posix_strintint()
posix_do_stat()
posix_mkdir()
posix_utime()
posix_readlink()
posix_open()
INITFUNC(): os.error (nee PosixError) is PyExc_OSError
|
|
|
|
|
| |
of Windows file handles. Now it is at least compatible with itself on
Unix!
|
|
|
|
| |
latest OS/2 patch set.
|
|
|
|
| |
I hope this time I've taken out all // comments and indended #ifdefs.
|
|
|
|
| |
directives and changed C++ comments to C comments.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
signal handlers in a fork()ed child process when Python is compiled with
thread support. The bug was reported by Scott <scott@chronis.icgroup.com>.
What happens is that after a fork(), the variables used by the signal
module to determine whether this is the main thread or not are bogus,
and it decides that no thread is the main thread, so no signals will
be delivered.
The solution is the addition of PyOS_AfterFork(), which fixes the signal
module's variables. A dummy version of the function is present in the
intrcheck.c source file which is linked when the signal module is not
used.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(1) Use PyErr_NewException("module.class", NULL, NULL) to create the
exception object.
(2) Remove all calls to Py_FatalError(); instead, return or
ignore the errors -- the import code now checks PyErr_Occurred()
after calling a module's init function, so it's no longer a
fatal error for the initialization to fail.
Also did some small cleanups, e.g. removed unnecessary test for
"already initialized" from initfpectl(), and unified
initposix()/initnt().
I haven't checked this very thoroughly, so while the changes are
pretty trivial -- beware of untested code!
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
so that MSVC 4.2 doesn't complain under NT.
|
| |
|