Merged revisions 70849 via svnmerge from

svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70849 | jesse.noller | 2009-03-31 13:12:35 -0500 (Tue, 31 Mar 2009) | 1 line

  Apply patch for netbsd multiprocessing support
........
This commit is contained in:
Jesse Noller 2009-03-31 18:20:48 +00:00
parent 8b56d47d01
commit 040bc1bb4b
3 changed files with 15 additions and 2 deletions

View file

@ -509,7 +509,11 @@ mmap_resize_method(mmap_object *self,
#ifdef MREMAP_MAYMOVE
newmap = mremap(self->data, self->size, new_size, MREMAP_MAYMOVE);
#else
newmap = mremap(self->data, self->size, new_size, 0);
#if defined(__NetBSD__)
newmap = mremap(self->data, self->size, self->data, new_size, 0);
#else
newmap = mremap(self->data, self->size, new_size, 0);
#endif /* __NetBSD__ */
#endif
if (newmap == (void *)-1)
{

View file

@ -379,7 +379,7 @@ const char *inet_ntop(int af, const void *src, char *dst, socklen_t size);
#define SOCKETCLOSE close
#endif
#if defined(HAVE_BLUETOOTH_H) || defined(HAVE_BLUETOOTH_BLUETOOTH_H)
#if defined(HAVE_BLUETOOTH_H) || defined(HAVE_BLUETOOTH_BLUETOOTH_H) && !defined(__NetBSD__)
#define USE_BLUETOOTH 1
#if defined(__FreeBSD__)
#define BTPROTO_L2CAP BLUETOOTH_PROTO_L2CAP

View file

@ -1291,6 +1291,15 @@ class PyBuildExt(build_ext):
)
libraries = []
elif platform.startswith('netbsd'):
macros = dict( # at least NetBSD 5
HAVE_SEM_OPEN=1,
HAVE_SEM_TIMEDWAIT=0,
HAVE_FD_TRANSFER=1,
HAVE_BROKEN_SEM_GETVALUE=1
)
libraries = []
else: # Linux and other unices
macros = dict(
HAVE_SEM_OPEN=1,