[issue3876] multiprocessing does not compile on systems which do not define sem_timedwait

2008-10-25 Thread Piotr Meyer

Piotr Meyer <[EMAIL PROTECTED]> added the comment:

I confirm build failure on NetBSD 4.0.1 (latest stable) - but
NetBSD-current is - probably - also affected:

*** WARNING: renaming "_multiprocessing" since importing it failed:
build/lib.netbsd-4.0.1-i386-2.6/_multiprocessing.so: Undefined PLT
symbol "sem_timedwait" (symnum = 20)

system: NetBSD 4.0.1 (i386)
Python version: 2.6

--
nosy: +aniou

___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3876>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5400] patches for multiprocessing module on NetBSD

2009-03-01 Thread Piotr Meyer

New submission from Piotr Meyer :

Multiprocessing module needs some patches to succesfully builing
and running on NetBSD. I made this patch and test on NetBSD 5rc2
(upcoming release).

1. we need working socket module (Modules/socketmodule.c)

2. mremap under NetBSD has different semantics:
   (Modules/mmapmodule.c)

3. finally, we need settings for netbsd in setup.py:
   (setup.py)  

After patching and building:

netbsd5#  ./python -bb -E Lib/test/regrtest.py test_multiprocessing
test_multiprocessing
1 test OK.

--
components: Build
files: py-netbsd-multiprocessing.diff
keywords: patch
messages: 82991
nosy: aniou
severity: normal
status: open
title: patches for multiprocessing module on NetBSD
type: compile error
versions: Python 3.0
Added file: http://bugs.python.org/file13224/py-netbsd-multiprocessing.diff

___
Python tracker 
<http://bugs.python.org/issue5400>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5510] patches for Modules/socketmodule.c for NetBSD

2009-03-31 Thread Piotr Meyer

Changes by Piotr Meyer :


--
nosy: +aniou

___
Python tracker 
<http://bugs.python.org/issue5510>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5510] patches for Modules/socketmodule.c for NetBSD

2010-08-02 Thread Piotr Meyer

Piotr Meyer  added the comment:

On Sun, Aug 01, 2010 at 12:27:50AM +, Éric Araujo wrote:
> 
> Éric Araujo  added the comment:
> 
> Does the bug still exist in 3.2 (branch named py3k in subversion)? Do
> the patch still apply? (The workflow is to patch the version in
> development and then backport fixes to stable branches.)

As far I see - yes, py3k still needs patch provided by wiz, even on 
NetBSD 5.1 (current RC stable). Oryginal diff doesn't apply, I made 
some amateur changes and "my" version of wiz's patch is in attachment. 

But we have another problem, use sem_timedwait in Python/thread_pthread.h 
- not directly connected with this case, but prevent py3k from build.  
I copy some lines from Modules/_multiprocessing/semaphore.c, but this is 
very ugly workaround and someone should look at this...

--
Added file: http://bugs.python.org/file18326/netbsd-wizs-mod.patch

___
Python tracker 
<http://bugs.python.org/issue5510>
___--- Modules/socketmodule.c.orig 2010-08-02 18:48:32.0 +0200
+++ Modules/socketmodule.c  2010-08-02 18:59:51.0 +0200
@@ -382,7 +382,7 @@
 #define SOCKETCLOSE close
 #endif
 
-#if defined(HAVE_BLUETOOTH_H) || defined(HAVE_BLUETOOTH_BLUETOOTH_H) &&  
!defined(__NetBSD__)
+#if defined(HAVE_BLUETOOTH_H) || defined(HAVE_BLUETOOTH_BLUETOOTH_H) &&  
!defined(__NetBSD__) && !defined(__DragonFly__)
 #define USE_BLUETOOTH 1
 #if defined(__FreeBSD__)
 #define BTPROTO_L2CAP BLUETOOTH_PROTO_L2CAP
@@ -396,11 +396,13 @@
 #define _BT_L2_MEMB(sa, memb) ((sa)->l2cap_##memb)
 #define _BT_RC_MEMB(sa, memb) ((sa)->rfcomm_##memb)
 #define _BT_HCI_MEMB(sa, memb) ((sa)->hci_##memb)
-#elif defined(__NetBSD__)
+#elif defined(__NetBSD__) || defined(__DragonFly__)
 #define sockaddr_l2 sockaddr_bt
 #define sockaddr_rc sockaddr_bt
 #define sockaddr_hci sockaddr_bt
 #define sockaddr_sco sockaddr_bt
+#define SOL_HCI BTPROTO_HCI
+#define HCI_DATA_DIR SO_HCI_DIRECTION
 #define _BT_L2_MEMB(sa, memb) ((sa)->bt_##memb)
 #define _BT_RC_MEMB(sa, memb) ((sa)->bt_##memb)
 #define _BT_HCI_MEMB(sa, memb) ((sa)->bt_##memb)
@@ -1040,9 +1042,13 @@
 case BTPROTO_HCI:
 {
 struct sockaddr_hci *a = (struct sockaddr_hci *) addr;
+#if defined(__NetBSD__) || defined(__DragonFly__)
+return makebdaddr(&_BT_HCI_MEMB(a, bdaddr));
+#else
 PyObject *ret = NULL;
 ret = Py_BuildValue("i", _BT_HCI_MEMB(a, dev));
 return ret;
+#endif
 }
 
 #if !defined(__FreeBSD__)
@@ -1326,12 +1332,25 @@
 case BTPROTO_HCI:
 {
 struct sockaddr_hci *addr = (struct sockaddr_hci *)addr_ret;
+#if defined(__NetBSD__) || defined(__DragonFly__)
+   char *straddr = PyBytes_AS_STRING(args);
+
+   _BT_HCI_MEMB(addr, family) = AF_BLUETOOTH;
+if (straddr == NULL) {
+PyErr_SetString(socket_error, "getsockaddrarg: "
+"wrong format");
+return 0;
+}
+if (setbdaddr(straddr, &_BT_HCI_MEMB(addr, bdaddr)) < 0)
+return 0;
+#else
 _BT_HCI_MEMB(addr, family) = AF_BLUETOOTH;
 if (!PyArg_ParseTuple(args, "i", &_BT_HCI_MEMB(addr, dev))) {
 PyErr_SetString(socket_error, "getsockaddrarg: "
 "wrong format");
 return 0;
 }
+#endif
 *len_ret = sizeof *addr;
 return 1;
 }
@@ -4417,9 +4436,13 @@
 PyModule_AddIntConstant(m, "BTPROTO_L2CAP", BTPROTO_L2CAP);
 PyModule_AddIntConstant(m, "BTPROTO_HCI", BTPROTO_HCI);
 PyModule_AddIntConstant(m, "SOL_HCI", SOL_HCI);
+#if !defined(__NetBSD__) && !defined(__DragonFly__)
 PyModule_AddIntConstant(m, "HCI_FILTER", HCI_FILTER);
+#endif
 #if !defined(__FreeBSD__)
+#if !defined(__NetBSD__) && !defined(__DragonFly__)
 PyModule_AddIntConstant(m, "HCI_TIME_STAMP", HCI_TIME_STAMP);
+#endif
 PyModule_AddIntConstant(m, "HCI_DATA_DIR", HCI_DATA_DIR);
 PyModule_AddIntConstant(m, "BTPROTO_SCO", BTPROTO_SCO);
 #endif
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com