1 This patch contains some workarounds specially needed for Solaris 11. |
|
2 |
|
3 Due to |
|
4 |
|
5 18617452 SIZEOF_WCHAR_T undefined in pyconfig.h on 11.2 |
|
6 |
|
7 SIZEOF_WCHAR_T isn't ever defined, leading to poor support of wchar_t and |
|
8 unicode. Defining that constant prior to including wchar_helper.h helps |
|
9 work around most of the resulting test failures. |
|
10 |
|
11 In Solaris 12, libnsl has been turned into a filter library for libc, and |
|
12 symbols like inet_ntoa are available directly from libc. But this has not |
|
13 happened in Solaris 11, so opening libnsl is required in order to find that |
|
14 particular symbol. |
|
15 |
|
16 --- cffi-0.8.2/c/_cffi_backend.c 2014-03-06 22:51:56.000000000 -0800 |
|
17 +++ cffi-0.8.2/c/_cffi_backend.c 2014-04-17 15:46:17.277512131 -0700 |
|
18 @@ -219,6 +219,7 @@ static void init_errno(void) { } |
|
19 # include "file_emulator.h" |
|
20 #endif |
|
21 |
|
22 +#define SIZEOF_WCHAR_T 4 |
|
23 #ifdef HAVE_WCHAR_H |
|
24 # include "wchar_helper.h" |
|
25 #endif |
|
26 --- cffi-0.8.2/testing/test_function.py 2014-03-06 22:51:56.000000000 -0800 |
|
27 +++ cffi-0.8.2/testing/test_function.py 2014-04-17 13:37:51.091873904 -0700 |
|
28 @@ -286,7 +286,7 @@ class TestFunction(object): |
|
29 struct in_addr { unsigned int s_addr; }; |
|
30 char *inet_ntoa(struct in_addr in); |
|
31 """) |
|
32 - ffi.C = ffi.dlopen(None) |
|
33 + ffi.C = ffi.dlopen("nsl") |
|
34 ina = ffi.new("struct in_addr *", [0x04040404]) |
|
35 a = ffi.C.inet_ntoa(ina[0]) |
|
36 assert ffi.string(a) == b'4.4.4.4' |
|