Mailing List Archive

posix module
Ok, I think I'm done with the posix module updates, modulo bugs and
additional symbols for the *conf*() tables. That leaves us with the
following status for interfaces that Andrew brought up in the message
that started this spate of additions:

Worth adding?
=============
opendir(), readdir(), closedir() -- not added
The only thing these give us that os.listdir() doesn't is
the inode numbers. Unless someone actually wants those,
it's not worth having.

Worth adding:
=============

abort() -- added

ctermid(), ctermid_r() -- added

fpathconf(fd, name) -- added

getlogin() -- added

getgroups(gidsetsize, grouplist) -- added

pathconf(path, name) -- added

sysconf(int name) -- added; also added confstr(int name)

Not worth adding:
=================
clearerr() -- not added

cuserid() -- not added

difftime -- not added

tmpfile(), tmpnam() -- added, also tempnam()

mblen(), mbstowcs(), mbtowc(), wcstombs(), wctomb() -- not added



-Fred

--
Fred L. Drake, Jr. <fdrake@acm.org>
Corporation for National Research Initiatives
Re: posix module [ In reply to ]
> Ok, I think I'm done with the posix module updates, modulo bugs and
> additional symbols for the *conf*() tables.

gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c ./posixmodule.c
./posixmodule.c:3789: `_SC_AIO_LIST_MAX' undeclared here (not in a function)
./posixmodule.c:3789: initializer element for `posix_constants_sysconf[10].value' is not constant
make[1]: *** [posixmodule.o] Error 1
make[1]: Leaving directory `/data/repository/BleedingEdge/python/dist/src/Modules'

(current CVS stuff, on Red Hat 5.2)

</F>
Re: posix module [ In reply to ]
Fredrik Lundh writes:
> (current CVS stuff, on Red Hat 5.2)

Ok, Guido figured it out; this is a typo in the header
/usr/include/confname.h; the enum and the #define don't have the same
name.
Do you know a way to detect the Linux kernel version using
pre-preprocessor macros? (Seems very fragile.) Would it be
reasonable to only add that table entry for kernel versions >= 2.2?


-Fred

--
Fred L. Drake, Jr. <fdrake@acm.org>
Corporation for National Research Initiatives