svn commit: r1937013 - apr/apr-util/branches/1.6.x/crypto

[email protected]
Newsgroups gmane.comp.apache.apr.cvs
Message-ID <178630962155.198039.6999193900023563969@svn03-he-fi>
Author: rjung
Date: Sun Aug  9 21:07:01 2026
New Revision: 1937013

Log:
Simplify check for __has_attribute() and apply to second use as well.

Backport of r1937012 from 1.7.x.

Modified:
   apr/apr-util/branches/1.6.x/crypto/apr_crypto.c
   apr/apr-util/branches/1.6.x/crypto/apr_passwd.c

Modified: apr/apr-util/branches/1.6.x/crypto/apr_crypto.c
==============================================================================
--- apr/apr-util/branches/1.6.x/crypto/apr_crypto.c	Sun Aug  9 21:02:50 2026	(r1937012)
+++ apr/apr-util/branches/1.6.x/crypto/apr_crypto.c	Sun Aug  9 21:07:01 2026	(r1937013)
@@ -194,6 +194,10 @@ static volatile const apr_uint32_t optbl
  * Paper:
  *   https://cr.yp.to/papers/cryptoint-20250424.pdf
  */
+#ifndef __has_attribute
+#define __has_attribute(__x)    0
+#endif
+
 #if __has_attribute(always_inline)
 __attribute__((always_inline))
 #endif

Modified: apr/apr-util/branches/1.6.x/crypto/apr_passwd.c
==============================================================================
--- apr/apr-util/branches/1.6.x/crypto/apr_passwd.c	Sun Aug  9 21:02:50 2026	(r1937012)
+++ apr/apr-util/branches/1.6.x/crypto/apr_passwd.c	Sun Aug  9 21:07:01 2026	(r1937013)
@@ -64,11 +64,9 @@ static volatile const apr_uint32_t optbl
  * Paper:
  *   https://cr.yp.to/papers/cryptoint-20250424.pdf
  */
-#if (defined(__xlc__) && !defined(__GNUC__))
 #ifndef __has_attribute
 #define __has_attribute(__x)    0
 #endif
-#endif
 
 #if __has_attribute(always_inline)
 __attribute__((always_inline))
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.