New submission from Masayuki Yamamoto: Platform that appeared warning is Vista Cygwin x86. Interpreter execution doesn't crash because _setmode function is supplied from cygwin1.dll that always linked. Warning reason is header io.h [*] doesn't include to source file. Therefore I wrote two patches for 3.7 and 2.7.
[*] https://msdn.microsoft.com/en-us/library/tw4k6df8.aspx (Cygwin also avaliable) build log on 3.7: gcc -c -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -I. -I./Include -DPy_BUILD_CORE -o Modules/main.o Modules/main.c Modules/main.c: In function 'Py_Main': Modules/main.c:599:5: warning: implicit declaration of function '_setmode' [-Wimplicit-function-declaration] _setmode(fileno(stdin), O_BINARY); ^ gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -I. -I./Include -DPy_BUILD_CORE -I./Modules/_io -c ./Modules/_io/fileio.c -o Modules/fileio.o ./Modules/_io/fileio.c: In function '_io_FileIO___init___impl': ./Modules/_io/fileio.c:478:5: warning: implicit declaration of function '_setmode' [-Wimplicit-function-declaration] _setmode(self->fd, O_BINARY); ^ ---------- components: Build files: include-io.h.patch keywords: patch messages: 281389 nosy: benjamin.peterson, masamoto, stutzbach priority: normal severity: normal status: open title: Warning: implicit declaration of function '_setmode' type: compile error versions: Python 2.7, Python 3.6, Python 3.7 Added file: http://bugs.python.org/file45592/include-io.h.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28768> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com