[issue22524] PEP 471 implementation: os.scandir() directory scanning function

STINNER Victor report at bugs.python.org
Sun Mar 8 03:02:15 CET 2015


STINNER Victor added the comment:

Oh oh, OpenIndiana doesn't support d_type: the dirent structure has no d_type field and DT_xxx constants like DT_UNKNOWN are not defined.

gcc -Wsign-compare -g -O0 -Wall -Wstrict-prototypes -I/usr/local/include/ncursesw -m64   -Werror=declaration-after-statement   -I. -IInclude -I./Include    -DPy_BUILD_CORE  -c ./Modules/_collectionsmodule.c -o Modules/_collectionsmodule.o
./Modules/posixmodule.c: In function 'DirEntry_is_symlink':
./Modules/posixmodule.c:16393: error: 'DT_UNKNOWN' undeclared (first use in this function)
./Modules/posixmodule.c:16393: error: (Each undeclared identifier is reported only once
./Modules/posixmodule.c:16393: error: for each function it appears in.)
./Modules/posixmodule.c:16394: error: 'DT_LNK' undeclared (first use in this function)
./Modules/posixmodule.c:16398: warning: control reaches end of non-void function
./Modules/posixmodule.c: In function 'DirEntry_test_mode':
./Modules/posixmodule.c:16519: error: 'DT_LNK' undeclared (first use in this function)
./Modules/posixmodule.c:16520: error: 'DT_UNKNOWN' undeclared (first use in this function)
./Modules/posixmodule.c:16559: error: 'DT_DIR' undeclared (first use in this function)
./Modules/posixmodule.c:16561: error: 'DT_REG' undeclared (first use in this function)
./Modules/posixmodule.c: In function 'ScandirIterator_iternext':
./Modules/posixmodule.c:16973: error: 'struct dirent' has no member named 'd_type'
make: *** [Modules/posixmodule.o] Error 1
make: *** Waiting for unfinished jobs....

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22524>
_______________________________________


More information about the Python-bugs-list mailing list