summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Neulinger <nneul@neulinger.org>2010-09-28 15:50:13 +0000
committerNathan Neulinger <nneul@neulinger.org>2010-09-28 15:50:13 +0000
commitfc67e201f498c59ae03f5671039cf57f32ce69f1 (patch)
tree1589254cab7f2d1fd1f67e9f09dc643bcf175fcb
parentf4af4e23096f9108ae760ecd04dacc321cc67031 (diff)
downloadcracklib-fc67e201f498c59ae03f5671039cf57f32ce69f1.tar.gz
wrap nls includes/calls in python modulev2.8.17cracklib-2.8.17
git-svn-id: file:///tmp/cracklib-svn/trunk@175 4175fe1e-86d5-4fdc-8e6a-506fab9d8533
-rw-r--r--cracklib/NEWS1
-rw-r--r--cracklib/python/_cracklibmodule.c4
2 files changed, 5 insertions, 0 deletions
diff --git a/cracklib/NEWS b/cracklib/NEWS
index 3ee7fe8..72daf5b 100644
--- a/cracklib/NEWS
+++ b/cracklib/NEWS
@@ -5,6 +5,7 @@ v2.8.17 fixed compilation on interix systems
fix segmentation fault in Python extension (Peter Palfrader)
add -Wall to AM_CFLAGS to discover possible programming errors (Jan Dittberner)
updated Wei Liu (zh_CN) translation (Leah Liu)
+ fixed NLS support in python module compilation (Mike Frysinger)
v2.8.16 update licensing information in Python extension (Jan Dittberner)
make translations work in Python extension (Jan Dittberner)
fix Python extension compilation warning (Jan Dittberner)
diff --git a/cracklib/python/_cracklibmodule.c b/cracklib/python/_cracklibmodule.c
index b94825c..5b668c6 100644
--- a/cracklib/python/_cracklibmodule.c
+++ b/cracklib/python/_cracklibmodule.c
@@ -33,7 +33,9 @@
#endif
#include <crack.h>
#include <locale.h>
+#ifdef HAVE_LIBINTL_H
#include <libintl.h>
+#endif
#ifdef HAVE_PTHREAD_H
static pthread_mutex_t cracklib_mutex = PTHREAD_MUTEX_INITIALIZER;
@@ -135,7 +137,9 @@ _cracklib_FascistCheck(PyObject *self, PyObject *args, PyObject *kwargs)
}
setlocale(LC_ALL, "");
+#ifdef ENABLE_NLS
textdomain("cracklib");
+#endif
LOCK();
result = FascistCheck(candidate, dict ? dict : defaultdict);