Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a6535fd

Browse files
committed
Shut up warnings for setgroups() on Linux -- you have to #include
<grp.h> it seems. This requires yet another configure test.
1 parent 91b81c4 commit a6535fd

4 files changed

Lines changed: 18 additions & 10 deletions

File tree

Modules/posixmodule.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ corresponding Unix manual entries for more information on calls.";
2828

2929
#include <sys/types.h>
3030
#include <sys/stat.h>
31+
3132
#ifdef HAVE_SYS_WAIT_H
3233
#include <sys/wait.h> /* For WNOHANG */
3334
#endif
@@ -40,6 +41,10 @@ corresponding Unix manual entries for more information on calls.";
4041
#include <fcntl.h>
4142
#endif /* HAVE_FCNTL_H */
4243

44+
#ifdef HAVE_GRP_H
45+
#include <grp.h>
46+
#endif
47+
4348
/* pick up declaration of confstr on some systems? */
4449
#ifdef HAVE_UNISTD_H
4550
#include <unistd.h>

configure

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#! /bin/sh
22

3-
# From configure.in Revision: 1.270
3+
# From configure.in Revision: 1.272
44

55
# Guess values for system-dependent variables and create Makefiles.
66
# Generated automatically using autoconf version 2.13
@@ -1968,7 +1968,7 @@ EOF
19681968

19691969
fi
19701970

1971-
for ac_hdr in dlfcn.h fcntl.h limits.h langinfo.h locale.h \
1971+
for ac_hdr in dlfcn.h fcntl.h grp.h limits.h langinfo.h locale.h \
19721972
ncurses.h poll.h pthread.h \
19731973
signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
19741974
sys/audioio.h sys/file.h sys/lock.h sys/modem.h db_185.h db.h \

configure.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ dnl AC_MSG_RESULT($cpp_type)
499499

500500
# checks for header files
501501
AC_HEADER_STDC
502-
AC_CHECK_HEADERS(dlfcn.h fcntl.h limits.h langinfo.h locale.h \
502+
AC_CHECK_HEADERS(dlfcn.h fcntl.h grp.h limits.h langinfo.h locale.h \
503503
ncurses.h poll.h pthread.h \
504504
signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
505505
sys/audioio.h sys/file.h sys/lock.h sys/modem.h db_185.h db.h \

pyconfig.h.in

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -312,9 +312,6 @@
312312
/* The number of bytes in a wchar_t. */
313313
#undef SIZEOF_WCHAR_T
314314

315-
/* Define if you have the _getpty function. */
316-
#undef HAVE__GETPTY
317-
318315
/* Define if you have the alarm function. */
319316
#undef HAVE_ALARM
320317

@@ -417,6 +414,9 @@
417414
/* Define if you have the getpriority function. */
418415
#undef HAVE_GETPRIORITY
419416

417+
/* Define if you have the _getpty function. */
418+
#undef HAVE__GETPTY
419+
420420
/* Define if you have the getpwent function. */
421421
#undef HAVE_GETPWENT
422422

@@ -591,14 +591,14 @@
591591
/* Define if you have the waitpid function. */
592592
#undef HAVE_WAITPID
593593

594-
/* Define if you have the <db.h> header file. */
595-
#undef HAVE_DB_H
594+
/* Define if you have the <db_185.h> header file. */
595+
#undef HAVE_DB_185_H
596596

597597
/* Define if you have the <db1/ndbm.h> header file. */
598598
#undef HAVE_DB1_NDBM_H
599599

600-
/* Define if you have the <db_185.h> header file. */
601-
#undef HAVE_DB_185_H
600+
/* Define if you have the <db.h> header file. */
601+
#undef HAVE_DB_H
602602

603603
/* Define if you have the <dirent.h> header file. */
604604
#undef HAVE_DIRENT_H
@@ -612,6 +612,9 @@
612612
/* Define if you have the <gdbm/ndbm.h> header file. */
613613
#undef HAVE_GDBM_NDBM_H
614614

615+
/* Define if you have the <grp.h> header file. */
616+
#undef HAVE_GRP_H
617+
615618
/* Define if you have the <langinfo.h> header file. */
616619
#undef HAVE_LANGINFO_H
617620

0 commit comments

Comments
 (0)