Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8caceb7

Browse filesBrowse files
authored
bpo-40280: Add configure check for socket shutdown (GH-29795)
1 parent db671b0 commit 8caceb7
Copy full SHA for 8caceb7

6 files changed

+15-2Lines changed: 15 additions & 2 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file
+3Lines changed: 3 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
``configure`` now checks for socket ``shutdown`` function. The check makes
2+
it possible to disable ``SYS_shutdown`` with ``ac_cv_func_shutdown=no`` in
3+
CONFIG_SITE.
Collapse file

‎Modules/socketmodule.c‎

Copy file name to clipboardExpand all lines: Modules/socketmodule.c
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4788,6 +4788,7 @@ Set operation mode, IV and length of associated data for an AF_ALG\n\
47884788
operation socket.");
47894789
#endif
47904790

4791+
#ifdef HAVE_SHUTDOWN
47914792
/* s.shutdown(how) method */
47924793

47934794
static PyObject *
@@ -4812,6 +4813,7 @@ PyDoc_STRVAR(shutdown_doc,
48124813
\n\
48134814
Shut down the reading side of the socket (flag == SHUT_RD), the writing side\n\
48144815
of the socket (flag == SHUT_WR), or both ends (flag == SHUT_RDWR).");
4816+
#endif
48154817

48164818
#if defined(MS_WINDOWS) && defined(SIO_RCVALL)
48174819
static PyObject*
@@ -4957,8 +4959,10 @@ static PyMethodDef sock_methods[] = {
49574959
gettimeout_doc},
49584960
{"setsockopt", (PyCFunction)sock_setsockopt, METH_VARARGS,
49594961
setsockopt_doc},
4962+
#ifdef HAVE_SHUTDOWN
49604963
{"shutdown", (PyCFunction)sock_shutdown, METH_O,
49614964
shutdown_doc},
4965+
#endif
49624966
#ifdef CMSG_LEN
49634967
{"recvmsg", (PyCFunction)sock_recvmsg, METH_VARARGS,
49644968
recvmsg_doc},
Collapse file

‎PC/pyconfig.h‎

Copy file name to clipboardExpand all lines: PC/pyconfig.h
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,9 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */
517517
/* Define if you have siginterrupt. */
518518
/* #undef HAVE_SIGINTERRUPT */
519519

520+
/* Define to 1 if you have the `shutdown' function. */
521+
#define HAVE_SHUTDOWN 1
522+
520523
/* Define if you have symlink. */
521524
/* #undef HAVE_SYMLINK */
522525

Collapse file

‎configure‎

Copy file name to clipboardExpand all lines: configure
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13395,7 +13395,7 @@ for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
1339513395
setgid sethostname \
1339613396
setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
1339713397
sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
13398-
sched_rr_get_interval \
13398+
sched_rr_get_interval shutdown \
1339913399
sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
1340013400
sigtimedwait sigwait sigwaitinfo snprintf splice strftime strlcpy strsignal symlinkat sync \
1340113401
sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Collapse file

‎configure.ac‎

Copy file name to clipboardExpand all lines: configure.ac
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3956,7 +3956,7 @@ AC_CHECK_FUNCS(alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
39563956
setgid sethostname \
39573957
setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
39583958
sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
3959-
sched_rr_get_interval \
3959+
sched_rr_get_interval shutdown \
39603960
sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
39613961
sigtimedwait sigwait sigwaitinfo snprintf splice strftime strlcpy strsignal symlinkat sync \
39623962
sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Collapse file

‎pyconfig.h.in‎

Copy file name to clipboardExpand all lines: pyconfig.h.in
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -992,6 +992,9 @@
992992
/* Define to 1 if you have the `shm_unlink' function. */
993993
#undef HAVE_SHM_UNLINK
994994

995+
/* Define to 1 if you have the `shutdown' function. */
996+
#undef HAVE_SHUTDOWN
997+
995998
/* Define to 1 if you have the `sigaction' function. */
996999
#undef HAVE_SIGACTION
9971000

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.