From 61e8450d7ae54e03555d21063b964f7781bb92fd Mon Sep 17 00:00:00 2001 From: Nalin Dahyabhai Date: Dec 01 2009 20:54:54 +0000 Subject: Don't depend on a consumer of to be using autoconf, and to be checking for for the presence of and , and including its own "config.h" before including , in order for this to be correct on 64-bit machines. --- diff --git a/cracklib-2.8.13-inttypes.patch b/cracklib-2.8.13-inttypes.patch deleted file mode 100644 index 1709817..0000000 --- a/cracklib-2.8.13-inttypes.patch +++ /dev/null @@ -1,71 +0,0 @@ -Don't depend on a consumer of to be using autoconf, and to be -checking for for the presence of and , and including -its own "config.h" before including , in order for this to be -correct on 64-bit machines. -diff -up cracklib-2.8.13/configure.in cracklib-2.8.13/configure.in ---- cracklib-2.8.13/configure.in 2008-09-23 07:53:24.000000000 -0400 -+++ cracklib-2.8.13/configure.in 2008-10-28 13:39:08.000000000 -0400 -@@ -26,6 +26,19 @@ AC_CHECK_HEADERS(zlib.h, AC_DEFINE(HAVE_ - - AC_SEARCH_LIBS(gzopen, z) - -+if test x$ac_cv_header_inttypes_h = xyes ; then -+ CRACKLIB_INTEGER_TYPES1="#include " -+ CRACKLIB_INTEGER_TYPES2= -+elif test x$ac_cv_header_stdint_h = xyes ; then -+ CRACKLIB_INTEGER_TYPES1="#include " -+ CRACKLIB_INTEGER_TYPES2= -+else -+ CRACKLIB_INTEGER_TYPES1="typedef unsigned int uint32_t;" -+ CRACKLIB_INTEGER_TYPES2="typedef unsigned short uint16_t;" -+fi -+AC_SUBST(CRACKLIB_INTEGER_TYPES1) -+AC_SUBST(CRACKLIB_INTEGER_TYPES2) -+ - dnl Cygwin workaround - AC_MSG_CHECKING(if LINE_MAX is defined) - AC_EGREP_CPP(yes, -@@ -90,6 +103,8 @@ AM_CONDITIONAL(BUILD_PYTHON,[test "$buil - dnl Handle local dict compiling properly - AC_SUBST(CROSS_COMPILING, $cross_compiling) - --AC_OUTPUT(util/Makefile lib/Makefile doc/Makefile python/Makefile Makefile \ -- po/Makefile.in m4/Makefile dicts/Makefile cracklib.spec) -+AC_CONFIG_FILES(util/Makefile lib/Makefile doc/Makefile python/Makefile \ -+ Makefile po/Makefile.in m4/Makefile dicts/Makefile \ -+ cracklib.spec lib/packer.h) -+AC_OUTPUT - -diff -up cracklib-2.8.13/lib/packer.h.in cracklib-2.8.13/lib/packer.h.in ---- cracklib-2.8.13/lib/packer.h.in 2008-10-28 13:38:25.000000000 -0400 -+++ cracklib-2.8.13/lib/packer.h.in 2008-10-28 13:38:25.000000000 -0400 -@@ -30,17 +30,8 @@ - #define _(String) (String) - #endif - --#if defined(HAVE_INTTYPES_H) --#include --#else --#if defined(HAVE_STDINT_H) --#include --#else --typedef unsigned int uint32_t; --typedef unsigned short uint16_t; --#endif --#endif -- -+@CRACKLIB_INTEGER_TYPES1@ -+@CRACKLIB_INTEGER_TYPES2@ - - struct pi_header - { -@@ -83,6 +74,9 @@ typedef struct { - int dummy; - } PWDICT; - -+@CRACKLIB_INTEGER_TYPES1@ -+@CRACKLIB_INTEGER_TYPES2@ -+ - #endif - - extern PWDICT *PWOpen(const char *prefix, char *mode); diff --git a/cracklib-2.8.15-inttypes.patch b/cracklib-2.8.15-inttypes.patch new file mode 100644 index 0000000..d1d6a23 --- /dev/null +++ b/cracklib-2.8.15-inttypes.patch @@ -0,0 +1,68 @@ +Don't depend on a consumer of to be using autoconf, and to be +checking for for the presence of and , and including +its own "config.h" before including , in order for this to be +correct on 64-bit machines. + +diff -up cracklib-2.8.15/configure.in cracklib-2.8.15/configure.in +--- cracklib-2.8.15/configure.in 2009-11-18 18:58:21.000000000 -0500 ++++ cracklib-2.8.15/configure.in 2009-12-01 15:16:35.000000000 -0500 +@@ -26,6 +26,19 @@ AC_CHECK_HEADERS(zlib.h, AC_DEFINE(HAVE_ + + AC_SEARCH_LIBS(gzopen, z) + ++if test x$ac_cv_header_inttypes_h = xyes ; then ++ CRACKLIB_INTEGER_TYPES1="#include " ++ CRACKLIB_INTEGER_TYPES2= ++elif test x$ac_cv_header_stdint_h = xyes ; then ++ CRACKLIB_INTEGER_TYPES1="#include " ++ CRACKLIB_INTEGER_TYPES2= ++else ++ CRACKLIB_INTEGER_TYPES1="typedef unsigned int uint32_t;" ++ CRACKLIB_INTEGER_TYPES2="typedef unsigned short uint16_t;" ++fi ++AC_SUBST(CRACKLIB_INTEGER_TYPES1) ++AC_SUBST(CRACKLIB_INTEGER_TYPES2) ++ + dnl Cygwin workaround + AC_MSG_CHECKING(if LINE_MAX is defined) + AC_EGREP_CPP(yes, +@@ -92,5 +105,6 @@ AC_SUBST(CROSS_COMPILING, $cross_compili + + AC_OUTPUT(util/Makefile lib/Makefile doc/Makefile python/Makefile Makefile \ + python/setup.py \ ++ lib/packer.h \ + po/Makefile.in m4/Makefile dicts/Makefile cracklib.spec) + +diff -up cracklib-2.8.15/lib/packer.h.in cracklib-2.8.15/lib/packer.h.in +--- cracklib-2.8.15/lib/packer.h.in 2009-12-01 15:15:38.000000000 -0500 ++++ cracklib-2.8.15/lib/packer.h.in 2009-12-01 15:15:38.000000000 -0500 +@@ -30,17 +30,8 @@ + #define _(String) (String) + #endif + +-#if defined(HAVE_INTTYPES_H) +-#include +-#else +-#if defined(HAVE_STDINT_H) +-#include +-#else +-typedef unsigned int uint32_t; +-typedef unsigned short uint16_t; +-#endif +-#endif +- ++@CRACKLIB_INTEGER_TYPES1@ ++@CRACKLIB_INTEGER_TYPES2@ + + struct pi_header + { +@@ -83,6 +74,9 @@ typedef struct { + int dummy; + } PWDICT; + ++@CRACKLIB_INTEGER_TYPES1@ ++@CRACKLIB_INTEGER_TYPES2@ ++ + #endif + + extern PWDICT *PWOpen(const char *prefix, char *mode);