|
|
2a06ea |
Don't depend on a consumer of <packer.h> to be using autoconf, and to be
|
|
|
2a06ea |
checking for for the presence of <inttypes.h> and <stdint.h>, and including
|
|
|
2a06ea |
its own "config.h" before including <packer.h>, in order for this to be
|
|
|
2a06ea |
correct on 64-bit machines.
|
|
|
2a06ea |
|
|
|
2a06ea |
diff -up cracklib-2.8.15/configure.in cracklib-2.8.15/configure.in
|
|
|
2a06ea |
--- cracklib-2.8.15/configure.in 2009-11-18 18:58:21.000000000 -0500
|
|
|
2a06ea |
+++ cracklib-2.8.15/configure.in 2009-12-01 15:16:35.000000000 -0500
|
|
|
2a06ea |
@@ -26,6 +26,19 @@ AC_CHECK_HEADERS(zlib.h, AC_DEFINE(HAVE_
|
|
|
2a06ea |
|
|
|
2a06ea |
AC_SEARCH_LIBS(gzopen, z)
|
|
|
2a06ea |
|
|
|
2a06ea |
+if test x$ac_cv_header_inttypes_h = xyes ; then
|
|
|
2a06ea |
+ CRACKLIB_INTEGER_TYPES1="#include <inttypes.h>"
|
|
|
2a06ea |
+ CRACKLIB_INTEGER_TYPES2=
|
|
|
2a06ea |
+elif test x$ac_cv_header_stdint_h = xyes ; then
|
|
|
2a06ea |
+ CRACKLIB_INTEGER_TYPES1="#include <stdint.h>"
|
|
|
2a06ea |
+ CRACKLIB_INTEGER_TYPES2=
|
|
|
2a06ea |
+else
|
|
|
2a06ea |
+ CRACKLIB_INTEGER_TYPES1="typedef unsigned int uint32_t;"
|
|
|
2a06ea |
+ CRACKLIB_INTEGER_TYPES2="typedef unsigned short uint16_t;"
|
|
|
2a06ea |
+fi
|
|
|
2a06ea |
+AC_SUBST(CRACKLIB_INTEGER_TYPES1)
|
|
|
2a06ea |
+AC_SUBST(CRACKLIB_INTEGER_TYPES2)
|
|
|
2a06ea |
+
|
|
|
2a06ea |
dnl Cygwin workaround
|
|
|
2a06ea |
AC_MSG_CHECKING(if LINE_MAX is defined)
|
|
|
2a06ea |
AC_EGREP_CPP(yes,
|
|
|
2a06ea |
@@ -92,5 +105,6 @@ AC_SUBST(CROSS_COMPILING, $cross_compili
|
|
|
2a06ea |
|
|
|
2a06ea |
AC_OUTPUT(util/Makefile lib/Makefile doc/Makefile python/Makefile Makefile \
|
|
|
2a06ea |
python/setup.py \
|
|
|
2a06ea |
+ lib/packer.h \
|
|
|
2a06ea |
po/Makefile.in m4/Makefile dicts/Makefile cracklib.spec)
|
|
|
2a06ea |
|
|
|
2a06ea |
diff -up cracklib-2.8.15/lib/packer.h.in cracklib-2.8.15/lib/packer.h.in
|
|
|
2a06ea |
--- cracklib-2.8.15/lib/packer.h.in 2009-12-01 15:15:38.000000000 -0500
|
|
|
2a06ea |
+++ cracklib-2.8.15/lib/packer.h.in 2009-12-01 15:15:38.000000000 -0500
|
|
|
2a06ea |
@@ -30,17 +30,8 @@
|
|
|
2a06ea |
#define _(String) (String)
|
|
|
2a06ea |
#endif
|
|
|
2a06ea |
|
|
|
2a06ea |
-#if defined(HAVE_INTTYPES_H)
|
|
|
2a06ea |
-#include <inttypes.h>
|
|
|
2a06ea |
-#else
|
|
|
2a06ea |
-#if defined(HAVE_STDINT_H)
|
|
|
2a06ea |
-#include <stdint.h>
|
|
|
2a06ea |
-#else
|
|
|
2a06ea |
-typedef unsigned int uint32_t;
|
|
|
2a06ea |
-typedef unsigned short uint16_t;
|
|
|
2a06ea |
-#endif
|
|
|
2a06ea |
-#endif
|
|
|
2a06ea |
-
|
|
|
2a06ea |
+@CRACKLIB_INTEGER_TYPES1@
|
|
|
2a06ea |
+@CRACKLIB_INTEGER_TYPES2@
|
|
|
2a06ea |
|
|
|
2a06ea |
struct pi_header
|
|
|
2a06ea |
{
|
|
|
2a06ea |
@@ -83,6 +74,9 @@ typedef struct {
|
|
|
2a06ea |
int dummy;
|
|
|
2a06ea |
} PWDICT;
|
|
|
2a06ea |
|
|
|
2a06ea |
+@CRACKLIB_INTEGER_TYPES1@
|
|
|
2a06ea |
+@CRACKLIB_INTEGER_TYPES2@
|
|
|
2a06ea |
+
|
|
|
2a06ea |
#endif
|
|
|
2a06ea |
|
|
|
2a06ea |
extern PWDICT *PWOpen(const char *prefix, char *mode);
|