1 |
vapier 10/09/28 15:35:45 |
2 |
|
3 |
Added: cracklib-2.8.16-no-nls.patch |
4 |
Log: |
5 |
Fix nls handling in python module too. |
6 |
|
7 |
(Portage version: 2.2_rc86/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 sys-libs/cracklib/files/cracklib-2.8.16-no-nls.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/cracklib/files/cracklib-2.8.16-no-nls.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/cracklib/files/cracklib-2.8.16-no-nls.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: cracklib-2.8.16-no-nls.patch |
16 |
=================================================================== |
17 |
fix building on uclibc when nls is disabled |
18 |
|
19 |
--- util/check.c |
20 |
+++ util/check.c |
21 |
@@ -21,7 +21,9 @@ |
22 |
int i; |
23 |
|
24 |
setlocale(LC_ALL, ""); |
25 |
+#ifdef ENABLE_NLS |
26 |
textdomain(PACKAGE); |
27 |
+#endif |
28 |
|
29 |
while (fgets(buf, sizeof(buf), stdin) != NULL) { |
30 |
while (((i = strlen(buf)) > 0) && (i > 0)) { |
31 |
--- python/_cracklibmodule.c |
32 |
+++ python/_cracklibmodule.c |
33 |
@@ -32,7 +32,9 @@ |
34 |
#endif |
35 |
#include <crack.h> |
36 |
#include <locale.h> |
37 |
+#ifdef HAVE_LIBINTL_H |
38 |
#include <libintl.h> |
39 |
+#endif |
40 |
|
41 |
#ifdef HAVE_PTHREAD_H |
42 |
static pthread_mutex_t cracklib_mutex = PTHREAD_MUTEX_INITIALIZER; |
43 |
@@ -133,7 +135,9 @@ |
44 |
} |
45 |
|
46 |
setlocale(LC_ALL, ""); |
47 |
+#ifdef ENABLE_NLS |
48 |
textdomain("cracklib"); |
49 |
+#endif |
50 |
|
51 |
LOCK(); |
52 |
result = FascistCheck(candidate, dict ? dict : defaultdict); |