]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
added check for ptrdiff_t type.
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Fri, 7 Jun 2002 19:03:37 +0000 (19:03 +0000)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Fri, 7 Jun 2002 19:03:37 +0000 (19:03 +0000)
configure.in
libextra/crypt_bcrypt.c
libextra/crypt_srpsha1.c

index 9b1c3abb8735d9784b6d92bc15967b65cbdbc4ed..b46327af45ce05904b3e628c173be4551239387e 100644 (file)
@@ -151,6 +151,9 @@ AC_CHECK_SIZEOF(unsigned int, 4)
 AC_CHECK_SIZEOF(unsigned short int, 2)
 AC_CHECK_SIZEOF(unsigned char, 1)
 
+AC_CHECK_TYPE( ptrdiff_t, long)
+AC_CHECK_SIZEOF(ptrdiff_t)
+
 AC_CHECK_TYPE(size_t,
 DEFINE_SIZE_T="#include <sys/types.h>"
 AC_SUBST( DEFINE_SIZE_T)
index 73cf342b01ae47c49179f68f76519ea55bd5f20c..2e7dabf1414705d9139f1c1ae77ed0fb2cb4fd98 100644 (file)
@@ -641,7 +641,7 @@ char *crypt_bcrypt(const char* username, const char *passwd, const char *salt, G
        if (spe == NULL) { /* no ':' was found */
                len = strlen(sp);
        } else
-               len = (unsigned long int)spe - (unsigned long int)sp;
+               len = (ptrdiff_t)spe - (ptrdiff_t)sp;
 
        if (_gnutls_sbase64_decode(sp, len, &csalt) < 0) {
                gnutls_assert();
index cfeda1ca575031ca31e2907127cc009fc1b6adc9..78d8764f05bbe4317eefeb783d3a0b787e32e558 100644 (file)
@@ -74,7 +74,7 @@ char *crypt_srpsha1(const char *username, const char *passwd,
        if (spe==NULL) { /* parse error */
                len = strlen(sp);
        } else
-               len = (unsigned long int)spe - (unsigned long int)sp;
+               len = (ptrdiff_t)spe - (ptrdiff_t)sp;
        
        rsalt_size = _gnutls_sbase64_decode(sp, len, &csalt);
        if (rsalt_size < 0) {