apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s.@apache.org
Subject svn commit: r1422413 - /apr/apr/trunk/crypto/apr_passwd.c
Date Sat, 15 Dec 2012 23:22:35 GMT
Author: sf
Date: Sat Dec 15 23:22:34 2012
New Revision: 1422413

URL: http://svn.apache.org/viewvc?rev=1422413&view=rev
Log:
Split glibc version detection in two #if directives.

If __GLIBC_PREREQ is undefined, the single-line version expands to
'#if 0 && 0(2,4)', which causes a syntax error.

PR: 54275

Modified:
    apr/apr/trunk/crypto/apr_passwd.c

Modified: apr/apr/trunk/crypto/apr_passwd.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/crypto/apr_passwd.c?rev=1422413&r1=1422412&r2=1422413&view=diff
==============================================================================
--- apr/apr/trunk/crypto/apr_passwd.c (original)
+++ apr/apr/trunk/crypto/apr_passwd.c Sat Dec 15 23:22:34 2012
@@ -137,7 +137,8 @@ APR_DECLARE(apr_status_t) apr_password_v
 #elif defined(CRYPT_R_STRUCT_CRYPT_DATA)
         struct crypt_data buffer;
 
-#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2,4)
+#ifdef __GLIBC_PREREQ
+#if __GLIBC_PREREQ(2,4)
         buffer.initialized = 0;
 #else
         /*
@@ -146,6 +147,8 @@ APR_DECLARE(apr_status_t) apr_password_v
          */
         memset(&buffer, 0, sizeof(buffer));
 #endif
+#endif /* defined __GLIBC_PREREQ */
+
         crypt_pw = crypt_r(passwd, hash, &buffer);
         if (!crypt_pw) {
             return APR_EMISMATCH;



Mime
View raw message