Line
Link Here
|
0 |
-- a/portage/pym/portage/util/locale.py |
0 |
++ b/portage/pym/portage/util/locale.py |
Lines 13-22
import logging
Link Here
|
13 |
import os |
13 |
import os |
14 |
import textwrap |
14 |
import textwrap |
15 |
import traceback |
15 |
import traceback |
|
|
16 |
from ctypes import CDLL |
16 |
|
17 |
|
17 |
import portage |
18 |
import portage |
18 |
from portage.util import writemsg_level |
19 |
from portage.util import writemsg_level |
19 |
from portage.util._ctypes import find_library, LoadLibrary |
|
|
20 |
|
20 |
|
21 |
|
21 |
|
22 |
locale_categories = ( |
22 |
locale_categories = ( |
Lines 35-46
def _check_locale(silent):
Link Here
|
35 |
The inner locale check function. |
35 |
The inner locale check function. |
36 |
""" |
36 |
""" |
37 |
|
37 |
|
38 |
libc_fn = find_library("c") |
38 |
libc = CDLL("libc.so.6") |
39 |
if libc_fn is None: |
|
|
40 |
return None |
41 |
libc = LoadLibrary(libc_fn) |
42 |
if libc is None: |
43 |
return None |
44 |
|
39 |
|
45 |
lc = list(range(ord('a'), ord('z')+1)) |
40 |
lc = list(range(ord('a'), ord('z')+1)) |
46 |
uc = list(range(ord('A'), ord('Z')+1)) |
41 |
uc = list(range(ord('A'), ord('Z')+1)) |