equal
deleted
inserted
replaced
1 This patch was developed in-house, but not contributed upstream because |
|
2 Python 2.6 has been abandoned by the community. |
|
3 |
|
4 --- Python-2.6.8/Lib/ctypes/util.py.~1~ 2012-04-10 08:32:04.000000000 -0700 |
|
5 +++ Python-2.6.8/Lib/ctypes/util.py 2015-01-20 15:17:51.156728249 -0800 |
|
6 @@ -164,6 +164,24 @@ |
|
7 res.sort(cmp= lambda x,y: cmp(_num_version(x), _num_version(y))) |
|
8 return res[-1] |
|
9 |
|
10 + elif sys.platform == "sunos5": |
|
11 + |
|
12 + def _findLib_path(name, is64): |
|
13 + if is64: |
|
14 + paths = "/lib/64:/usr/lib/64" |
|
15 + else: |
|
16 + paths = "/lib:/usr/lib" |
|
17 + |
|
18 + for dir in paths.split(":"): |
|
19 + libfile = os.path.join(dir, "lib%s.so" % name) |
|
20 + if os.path.exists(libfile): |
|
21 + return libfile |
|
22 + |
|
23 + return None |
|
24 + |
|
25 + def find_library(name, is64 = False): |
|
26 + return _get_soname(_findLib_path(name, is64) or _findLib_gcc(name)) |
|
27 + |
|
28 else: |
|
29 |
|
30 def _findLib_ldconfig(name): |
|