Skip to content

Commit

Permalink
posixmodule: undefine HAVE_OPENDIR
Browse files Browse the repository at this point in the history
opendir is detected by configure on mingw-w64, and for some reason
things don't work as expected. For example, os.listdir always returns
the cwd's directory listing instead of the one specified. By
un-defining, this, os.listdir will use the one which uses native
windows API.
  • Loading branch information
naveen521kk authored and lazka committed Jul 19, 2023
1 parent 34824c9 commit 3973987
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Modules/posixmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,12 @@ corresponding Unix manual entries for more information on calls.");
# elif defined(__MINGW32__) /* GCC for windows hosts */
/* getlogin is detected by configure on mingw-w64 */
# undef HAVE_GETLOGIN
/* opendir is detected by configure on mingw-w64, and for some reason
things don't work as expected. For example, os.listdir always returns
the cwd's directory listing instead of the one specified. By
un-defining, this, os.listdir will use the one which uses native
windows API. */
# undef HAVE_OPENDIR
/*# define HAVE_GETCWD 1 - detected by configure*/
# define HAVE_GETPPID 1
# define HAVE_GETLOGIN 1
Expand Down

0 comments on commit 3973987

Please sign in to comment.