[Python-checkins] bpo-45743: Move __APPLE_USE_RFC_3542 into socketmodule.c (GH-29456)
tiran
webhook-mailer at python.org
Mon Nov 8 06:48:49 EST 2021
https://github.com/python/cpython/commit/24af9a40a8f85af813ea89998aa4e931fcc78cd9
commit: 24af9a40a8f85af813ea89998aa4e931fcc78cd9
branch: main
author: Christian Heimes <christian at python.org>
committer: tiran <christian at python.org>
date: 2021-11-08T12:48:34+01:00
summary:
bpo-45743: Move __APPLE_USE_RFC_3542 into socketmodule.c (GH-29456)
files:
M Modules/socketmodule.c
M setup.py
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index 50962c41cd3a6..ed1043c0c43a5 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -86,6 +86,8 @@ Local naming conventions:
*/
#ifdef __APPLE__
+// Issue #35569: Expose RFC 3542 socket options.
+#define __APPLE_USE_RFC_3542 1
#include <AvailabilityMacros.h>
/* for getaddrinfo thread safety test on old versions of OS X */
#ifndef MAC_OS_X_VERSION_10_5
diff --git a/setup.py b/setup.py
index b6bf8e129373b..fb641bd57d0d6 100644
--- a/setup.py
+++ b/setup.py
@@ -1222,13 +1222,7 @@ def detect_crypt(self):
self.add(Extension('_crypt', ['_cryptmodule.c'], libraries=libs))
def detect_socket(self):
- # socket(2)
- kwargs = {'depends': ['socketmodule.h']}
- if MACOS:
- # Issue #35569: Expose RFC 3542 socket options.
- kwargs['extra_compile_args'] = ['-D__APPLE_USE_RFC_3542']
-
- self.add(Extension('_socket', ['socketmodule.c'], **kwargs))
+ self.add(Extension('_socket', ['socketmodule.c'], depends=['socketmodule.h']))
def detect_dbm_gdbm(self):
# Modules that provide persistent dictionary-like semantics. You will
More information about the Python-checkins
mailing list