Author: stsp
Date: Mon Oct  5 13:36:53 2026
New Revision: 1938795

Log:
* tools/dev/unix-build/ Makefile.svn: Fix build of APR-util 1.6.5 with older
   compilers which lack the __has_attribute() macro.

Modified:
   subversion/trunk/tools/dev/unix-build/Makefile.svn

Modified: subversion/trunk/tools/dev/unix-build/Makefile.svn
==============================================================================
--- subversion/trunk/tools/dev/unix-build/Makefile.svn  Mon Oct  5 13:18:09 
2026        (r1938794)
+++ subversion/trunk/tools/dev/unix-build/Makefile.svn  Mon Oct  5 13:36:53 
2026        (r1938795)
@@ -713,14 +713,44 @@ apr-util-reset:
 apr-util-clean:
        -(cd $(APR_UTIL_OBJDIR) && env MAKEFLAGS= make clean)
 
+$(APR_UTIL_OBJDIR)/has-attribute.diff:
+       mkdir -p $(dir $@)
+       echo > [email protected] '--- crypto/apr_crypto.c.orig'
+       echo >> [email protected] '+++ crypto/apr_crypto.c'
+       echo >> [email protected] '@@ -194,6 +194,9 @@'
+       echo >> [email protected] '  * Paper:'
+       echo >> [email protected] '  *   https://cr.yp.to/papers/cryptoint-20250424.pdf'
+       echo >> [email protected] '  */'
+       echo >> [email protected] '+#ifndef __has_attribute'
+       echo >> [email protected] '+#define __has_attribute(__x)    0'
+       echo >> [email protected] '+#endif'
+       echo >> [email protected] ' #if __has_attribute(always_inline)'
+       echo >> [email protected] ' __attribute__((always_inline))'
+       echo >> [email protected] ' #endif'
+       echo >> [email protected] '--- crypto/apr_passwd.c.orig'
+       echo >> [email protected] '+++ crypto/apr_passwd.c'
+       echo >> [email protected] '@@ -64,11 +64,9 @@'
+       echo >> [email protected] '  * Paper:'
+       echo >> [email protected] '  *   https://cr.yp.to/papers/cryptoint-20250424.pdf'
+       echo >> [email protected] '  */'
+       echo >> [email protected] '-#if (defined(__xlc__) && !defined(__GNUC__))'
+       echo >> [email protected] ' #ifndef __has_attribute'
+       echo >> [email protected] ' #define __has_attribute(__x)    0'
+       echo >> [email protected] ' #endif'
+       echo >> [email protected] '-#endif'
+       echo >> [email protected] ' '
+       echo >> [email protected] ' #if __has_attribute(always_inline)'
+       echo >> [email protected] ' __attribute__((always_inline))'
+       mv -f [email protected] $@
 
 # retrieve apr-util if not present yet
-$(APR_UTIL_OBJDIR)/.retrieved:
+$(APR_UTIL_OBJDIR)/.retrieved: $(APR_UTIL_OBJDIR)/has-attribute.diff
        [ -d $(APR_UTIL_OBJDIR) ] || mkdir -p $(APR_UTIL_OBJDIR)
        if [ ! -d $(APR_UTIL_SRCDIR) ]; then \
                svn export $(APR_UTIL_URL)/tags/$(APR_UTIL_VER)/ \
                        $(APR_UTIL_SRCDIR); \
        fi
+       (cd $(APR_UTIL_SRCDIR) && patch -p0 < 
$(APR_UTIL_OBJDIR)/has-attribute.diff)
        touch $@
 
 ifeq ($(USE_APR_ICONV),yes)

Reply via email to