]> granicus.if.org Git - python/commitdiff
- Comment out socket (SO_REUSEPORT) and posix (O_SHLOCK, O_EXLOCK) constants
authordoko@ubuntu.com <doko@ubuntu.com>
Mon, 13 Jun 2016 14:33:04 +0000 (16:33 +0200)
committerdoko@ubuntu.com <doko@ubuntu.com>
Mon, 13 Jun 2016 14:33:04 +0000 (16:33 +0200)
  exposed on the API which are not implemented on GNU/Hurd. They would not
  work at runtime anyway.

Misc/NEWS
Modules/posixmodule.c
Modules/socketmodule.c

index e22ac6fa3ec1c993ff4b54877a7a1e9aeccc079f..005954f1900bd81b0dd15478e08706865519402e 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -50,6 +50,10 @@ Core and Builtins
 Library
 -------
 
+- Comment out socket (SO_REUSEPORT) and posix (O_SHLOCK, O_EXLOCK) constants
+  exposed on the API which are not implemented on GNU/Hurd. They would not
+  work at runtime anyway.
+
 - Issue #25455: Fixed crashes in repr of recursive ElementTree.Element and
   functools.partial objects.
 
index ecdeab4925cd11cc7209c6a9a6703031fbec319b..7d8249095d08a58f903851e589ae39dc8a876a74 100644 (file)
@@ -12658,12 +12658,14 @@ all_ins(PyObject *m)
 #ifdef O_LARGEFILE
     if (PyModule_AddIntMacro(m, O_LARGEFILE)) return -1;
 #endif
+#ifndef __GNU__
 #ifdef O_SHLOCK
     if (PyModule_AddIntMacro(m, O_SHLOCK)) return -1;
 #endif
 #ifdef O_EXLOCK
     if (PyModule_AddIntMacro(m, O_EXLOCK)) return -1;
 #endif
+#endif
 #ifdef O_EXEC
     if (PyModule_AddIntMacro(m, O_EXEC)) return -1;
 #endif
index dc57810a0792cc2e582a160264aa2ef3e824cc74..6355e4a59a61b52095ab26c359410f9e68444116 100644 (file)
@@ -6529,9 +6529,11 @@ PyInit__socket(void)
 #ifdef  SO_OOBINLINE
     PyModule_AddIntMacro(m, SO_OOBINLINE);
 #endif
+#ifndef __GNU__
 #ifdef  SO_REUSEPORT
     PyModule_AddIntMacro(m, SO_REUSEPORT);
 #endif
+#endif
 #ifdef  SO_SNDBUF
     PyModule_AddIntMacro(m, SO_SNDBUF);
 #endif