This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients dilyan.palauzov, vstinner
Date 2017-10-10.21:14:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1507670064.36.0.213398074469.issue31748@psf.upfronthosting.co.za>
In-reply-to
Content
I can reproduce the issue on Fedora 26:

haypo@selma$ ./configure CFLAGS="-Werror -Wall" 2>&1|tee log
haypo@selma$ grep fchdir log
checking for fchdir... no

The problem is not posixmodule.c. The problem is configure which emits a compiler warning.

configure.ac contains:
---
AC_MSG_CHECKING(for fchdir)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>]], [[void *x=fchdir]])],
  [AC_DEFINE(HAVE_FCHDIR, 1, Define if you have the 'fchdir' function.)
   AC_MSG_RESULT(yes)],
  [AC_MSG_RESULT(no)
])
---

Extract of config.log, without the long confdefs.h part:
---
configure:11258: checking for fchdir
configure:11271: gcc -c -Werror -Wall -Wextra  conftest.c >&5
conftest.c: In function 'main':
conftest.c:256:7: error: unused variable 'x' [-Werror=unused-variable]
 void *x=fchdir
       ^
cc1: all warnings being treated as errors
configure:11271: $? = 1
configure: failed program was:
| /* confdefs.h */
| (...)
| /* end confdefs.h.  */
| #include <unistd.h>
| int
| main ()
| {
| void *x=fchdir
|   ;
|   return 0;
| }
configure:11278: result: no
---
History
Date User Action Args
2017-10-10 21:14:24vstinnersetrecipients: + vstinner, dilyan.palauzov
2017-10-10 21:14:24vstinnersetmessageid: <1507670064.36.0.213398074469.issue31748@psf.upfronthosting.co.za>
2017-10-10 21:14:24vstinnerlinkissue31748 messages
2017-10-10 21:14:24vstinnercreate