[Python-checkins] r50899 - in python/trunk: Misc/ACKS Misc/NEWS Modules/socketmodule.c
matt.fleming
python-checkins at python.org
Fri Jul 28 13:27:32 CEST 2006
Author: matt.fleming
Date: Fri Jul 28 13:27:27 2006
New Revision: 50899
Modified:
python/trunk/Misc/ACKS
python/trunk/Misc/NEWS
python/trunk/Modules/socketmodule.c
Log:
Allow socketmodule to compile on NetBSD -current, whose bluetooth API
differs from both Linux and FreeBSD. Accepted by Neal Norwitz.
Modified: python/trunk/Misc/ACKS
==============================================================================
--- python/trunk/Misc/ACKS (original)
+++ python/trunk/Misc/ACKS Fri Jul 28 13:27:27 2006
@@ -203,6 +203,7 @@
Russell Finn
Nils Fischbeck
Frederik Fix
+Matt Fleming
Hernán Martínez Foffani
Doug Fort
John Fouhy
Modified: python/trunk/Misc/NEWS
==============================================================================
--- python/trunk/Misc/NEWS (original)
+++ python/trunk/Misc/NEWS Fri Jul 28 13:27:27 2006
@@ -132,6 +132,9 @@
methods now allow their database parameter to be None as the
sleepycat API allows.
+- Bug #1526460: Fix socketmodule compile on NetBSD as it has a different
+ bluetooth API compared with Linux and FreeBSD.
+
Tests
-----
Modified: python/trunk/Modules/socketmodule.c
==============================================================================
--- python/trunk/Modules/socketmodule.c (original)
+++ python/trunk/Modules/socketmodule.c Fri Jul 28 13:27:27 2006
@@ -367,6 +367,14 @@
#define _BT_SOCKADDR_MEMB(s, proto) &((s)->sock_addr)
#define _BT_L2_MEMB(sa, memb) ((sa)->l2cap_##memb)
#define _BT_RC_MEMB(sa, memb) ((sa)->rfcomm_##memb)
+#elif defined(__NetBSD__)
+#define sockaddr_l2 sockaddr_bt
+#define sockaddr_rc sockaddr_bt
+#define sockaddr_sco sockaddr_bt
+#define _BT_SOCKADDR_MEMB(s, proto) &((s)->sock_addr)
+#define _BT_L2_MEMB(sa, memb) ((sa)->bt_##memb)
+#define _BT_RC_MEMB(sa, memb) ((sa)->bt_##memb)
+#define _BT_SCO_MEMB(sa, memb) ((sa)->bt_##memb)
#else
#define _BT_SOCKADDR_MEMB(s, proto) (&((s)->sock_addr).bt_##proto)
#define _BT_L2_MEMB(sa, memb) ((sa)->l2_##memb)
More information about the Python-checkins
mailing list