Kaydet (Commit) 40a6164a authored tarafından Jesse Noller's avatar Jesse Noller

Apply patch for netbsd multiprocessing support

üst 3476d127
...@@ -509,7 +509,11 @@ mmap_resize_method(mmap_object *self, ...@@ -509,7 +509,11 @@ mmap_resize_method(mmap_object *self,
#ifdef MREMAP_MAYMOVE #ifdef MREMAP_MAYMOVE
newmap = mremap(self->data, self->size, new_size, MREMAP_MAYMOVE); newmap = mremap(self->data, self->size, new_size, MREMAP_MAYMOVE);
#else #else
#if defined(__NetBSD__)
newmap = mremap(self->data, self->size, self->data, new_size, 0);
#else
newmap = mremap(self->data, self->size, new_size, 0); newmap = mremap(self->data, self->size, new_size, 0);
#endif /* __NetBSD__ */
#endif #endif
if (newmap == (void *)-1) if (newmap == (void *)-1)
{ {
......
...@@ -379,7 +379,7 @@ const char *inet_ntop(int af, const void *src, char *dst, socklen_t size); ...@@ -379,7 +379,7 @@ const char *inet_ntop(int af, const void *src, char *dst, socklen_t size);
#define SOCKETCLOSE close #define SOCKETCLOSE close
#endif #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 #define USE_BLUETOOTH 1
#if defined(__FreeBSD__) #if defined(__FreeBSD__)
#define BTPROTO_L2CAP BLUETOOTH_PROTO_L2CAP #define BTPROTO_L2CAP BLUETOOTH_PROTO_L2CAP
......
...@@ -1280,6 +1280,15 @@ class PyBuildExt(build_ext): ...@@ -1280,6 +1280,15 @@ class PyBuildExt(build_ext):
) )
libraries = [] 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 else: # Linux and other unices
macros = dict( macros = dict(
HAVE_SEM_OPEN=1, HAVE_SEM_OPEN=1,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment