Skip to content

Commit a3a8e70

Browse files
authored
Merge branch 'apache:trunk' into uuid_usability_test_fix
2 parents eee1ad8 + ed9cb1c commit a3a8e70

File tree

19 files changed

+166
-128
lines changed

19 files changed

+166
-128
lines changed

.github/workflows/linux.yml

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,55 +17,79 @@ jobs:
1717
matrix:
1818
include:
1919
- name: Default
20+
os: ubuntu-latest
21+
# Check default shm decision logic for Linux:
22+
config-output: APR_USE_SHMEM_MMAP_SHM APR_USE_SHMEM_MMAP_ANON
23+
# Check various defaults for Linux
24+
config-private: >-
25+
HAVE_EPOLL HAVE_C_VARARRAYS HAVE_CALLOC HAVE_EXPAT_H HAVE_FLOCK HAVE_FORK
26+
HAVE_GAI_ADDRCONFIG HAVE_GAI_STRERROR GETSERVBYNAME_R_GLIBC2
27+
- name: Default (arm64)
28+
os: ubuntu-22.04-arm
2029
# Check default shm decision logic for Linux:
2130
config-output: APR_USE_SHMEM_MMAP_SHM APR_USE_SHMEM_MMAP_ANON
2231
- name: Static
32+
os: ubuntu-latest
2333
config: --enable-static
2434
- name: Maintainer-mode
35+
os: ubuntu-latest
2536
config: --enable-maintainer-mode
2637
- name: Named SHM - SysV, Maintainer-mode
38+
os: ubuntu-latest
2739
config: --enable-maintainer-mode --enable-sysv-shm
2840
config-output: APR_USE_SHMEM_SHMGET
2941
- name: Named SHM - Classic mmap, Maintainer-mode
42+
os: ubuntu-latest
3043
config: --enable-maintainer-mode ac_cv_func_shm_open=no ac_cv_func_shmget=no
3144
config-output: APR_USE_SHMEM_MMAP_TMP
3245
- name: Pool-debug
46+
os: ubuntu-latest
3347
config: --enable-pool-debug
3448
- name: Pool-debug, maintainer-mode
49+
os: ubuntu-latest
3550
config: --enable-pool-debug --enable-maintainer-mode
3651
- name: Thread-debug, maintainer-mode
52+
os: ubuntu-latest
3753
config: --enable-thread-debug --enable-maintainer-mode
3854
- name: Maintainer-mode, no IPv6
55+
os: ubuntu-latest
3956
config: --enable-maintainer-mode --disable-ipv6
4057
- name: Maintainer-mode, -Werror
58+
os: ubuntu-latest
4159
notest-cflags: -Werror
4260
config: --enable-maintainer-mode
4361
- name: With crypto
62+
os: ubuntu-latest
4463
config: --with-crypto=yes --with-openssl=yes
4564
config-output: APU_HAVE_CRYPTO APU_HAVE_OPENSSL
4665
- name: ASan
66+
os: ubuntu-latest
4767
# w/o ODBC since DSO unload leaks memory and fails the tests
4868
notest-cflags: -fsanitize=address -fno-sanitize-recover=address -fno-omit-frame-pointer -Werror -O2
4969
config: --with-odbc=no
5070
- name: ASan, pool-debug
71+
os: ubuntu-latest
5172
# w/o ODBC since DSO unload leaks memory and fails the tests
5273
notest-cflags: -fsanitize=address -fno-sanitize-recover=address -fno-omit-frame-pointer -Werror -O2
5374
config: --enable-pool-debug --with-odbc=no
5475
- name: UBsan
76+
os: ubuntu-latest
5577
notest-cflags: -fsanitize=undefined -fno-sanitize-recover=undefined -fno-omit-frame-pointer -Werror -O2
5678
- name: LMDB
79+
os: ubuntu-latest
5780
packages: liblmdb-dev
5881
notest-cflags: -Werror
5982
config: --enable-maintainer-mode --with-lmdb --with-dbm=lmdb
6083
config-output: APU_HAVE_LMDB
6184
- name: Berkeley DB v5.3
85+
os: ubuntu-latest
6286
packages: libdb5.3-dev
6387
notest-cflags: -Werror
6488
config: --enable-maintainer-mode --with-berkeley-db --with-dbm=db5
6589
config-output: APU_HAVE_DB
6690
fail-fast: false
6791

68-
runs-on: ubuntu-latest
92+
runs-on: ${{ matrix.os }}
6993
env:
7094
NOTEST_CFLAGS: ${{ matrix.notest-cflags }}
7195
name: ${{ matrix.name }}
@@ -81,8 +105,11 @@ jobs:
81105
- name: configure
82106
run: ./configure --prefix=/tmp/apr ${{ matrix.config }}
83107
- if: ${{ matrix.config-output != '' }}
84-
name: check for expected configure output ${{ matrix.config-output }}
108+
name: check for expected apr.h definitions ${{ matrix.config-output }}
85109
run: for var in ${{ matrix.config-output }}; do grep "^#define *${var} *1" include/apr.h; done
110+
- if: ${{ matrix.config-private != '' }}
111+
name: check for expected apr_private.h definitions ${{ matrix.config-private }}
112+
run: for var in ${{ matrix.config-private }}; do grep "^#define *${var} *1" include/arch/unix/apr_private.h; done
86113
- name: make
87114
run: make $MARGS
88115
- name: install

.github/workflows/windows.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@ jobs:
2828
generator: Ninja
2929
build-shared: ON
3030
dso-build: ON
31+
- name: Default arm64
32+
os: windows-11-arm
33+
triplet: arm64-windows
34+
arch: arm64
35+
build-type: Debug
36+
generator: Ninja
37+
build-shared: ON
38+
dso-build: ON
3139
- name: Use Expat
3240
os: windows-latest
3341
triplet: x64-windows
@@ -119,6 +127,17 @@ jobs:
119127
runs-on: ${{ matrix.os }}
120128

121129
steps:
130+
- name: Prepare Environment
131+
shell: pwsh
132+
run: |
133+
$root = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
134+
Import-Module "$root\Common7\Tools\Microsoft.VisualStudio.DevShell.dll"
135+
$OldEnv = ls env:
136+
Enter-VsDevShell -VsInstallPath $root -DevCmdArguments "-arch=${{ matrix.arch }}"
137+
$NewEnv = ls env:
138+
139+
Compare-Object $OldEnv $NewEnv -Property Name, Value -CaseSensitive | Where-Object -Property SideIndicator -EQ "=>" | foreach { "$($_.Name)=$($_.Value)" >> $env:GITHUB_ENV }
140+
122141
- name: Install dependencies
123142
if: ${{ matrix.packages != '' }}
124143
run: vcpkg install --triplet ${{ matrix.triplet }} ${{ matrix.packages }}
@@ -130,7 +149,6 @@ jobs:
130149
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
131150
shell: cmd
132151
run: |
133-
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=${{ matrix.arch }}
134152
cmake -B ${{github.workspace}}/build ^
135153
-G "${{ matrix.generator }}" ^
136154
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }} ^
@@ -145,7 +163,6 @@ jobs:
145163
# Build your program with the given configuration
146164
shell: cmd
147165
run: |
148-
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=${{ matrix.arch }}
149166
cmake --build ${{github.workspace}}/build --config ${{ matrix.build-type }}
150167
151168
- name: Test

build/apr_common.m4

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -439,14 +439,13 @@ eval "ac_decision_msg=\"\$ac_decision_${ac_decision}_msg\""
439439

440440
define(APR_END_DECISION,[dnl
441441
if test ".$ac_decision" = .; then
442-
echo "[$]0:Error: decision on $ac_decision_item failed" 1>&2
443-
exit 1
442+
AC_MSG_ERROR([decision on $ac_decision_item failed])
444443
else
445444
if test ".$ac_decision_msg" = .; then
446445
ac_decision_msg="$ac_decision"
447446
fi
448447
AC_DEFINE_UNQUOTED(${ac_decision_item})
449-
AC_MSG_RESULT([decision on $ac_decision_item... $ac_decision_msg])
448+
AC_MSG_NOTICE([decision on $ac_decision_item... $ac_decision_msg])
450449
fi
451450
])
452451

@@ -467,19 +466,11 @@ AC_DEFUN([APR_TRY_COMPILE_NO_WARNING],
467466
CFLAGS="$CFLAGS -Werror"
468467
fi
469468
AC_COMPILE_IFELSE(
470-
[AC_LANG_SOURCE(
471-
[
472-
#ifndef PACKAGE_NAME
473-
#include "confdefs.h"
474-
#endif
475-
]
476-
[[$1]]
477-
[int main(int argc, const char *const *argv) {]
478-
[[$2]]
479-
[ return 0; }]
480-
)], [CFLAGS=$apr_save_CFLAGS
481-
$3], [CFLAGS=$apr_save_CFLAGS
482-
$4])
469+
[AC_LANG_PROGRAM([[$1]], [[$2]])],
470+
[CFLAGS=$apr_save_CFLAGS
471+
$3],
472+
[CFLAGS=$apr_save_CFLAGS
473+
$4])
483474
])
484475

485476
dnl
@@ -775,8 +766,7 @@ if test -z "$LAYOUT"; then
775766
fi
776767
APR_LAYOUT($srcdir/config.layout, $LAYOUT, $2)
777768
778-
AC_MSG_CHECKING(for chosen layout)
779-
AC_MSG_RESULT($layout_name)
769+
AC_MSG_NOTICE([chosen layout: $layout_name])
780770
])
781771

782772

build/apr_network.m4

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -259,11 +259,12 @@ APR_TRY_COMPILE_NO_WARNING([
259259
#ifdef HAVE_STDLIB_H
260260
#include <stdlib.h>
261261
#endif
262+
#include <stdio.h>
262263
],[
263264
int tmp = gethostbyname_r((const char *) 0, (struct hostent *) 0,
264265
(char *) 0, 0, (struct hostent **) 0, &tmp);
265266
/* use tmp to suppress the warning */
266-
tmp=0;
267+
puts(tmp ? "non-zero" : "zero");
267268
], ac_cv_gethostbyname_r_style=glibc2, ac_cv_gethostbyname_r_style=none))
268269
269270
if test "$ac_cv_gethostbyname_r_style" = "glibc2"; then
@@ -287,11 +288,12 @@ APR_TRY_COMPILE_NO_WARNING([
287288
#ifdef HAVE_STDLIB_H
288289
#include <stdlib.h>
289290
#endif
291+
#include <stdio.h>
290292
],[
291293
int tmp = gethostbyname_r((const char *) 0, (struct hostent *) 0,
292294
(struct hostent_data *) 0);
293295
/* use tmp to suppress the warning */
294-
tmp=0;
296+
puts(tmp ? "non-zero" : "zero");
295297
], ac_cv_gethostbyname_r_arg=hostent_data, ac_cv_gethostbyname_r_arg=char))
296298
297299
if test "$ac_cv_gethostbyname_r_arg" = "hostent_data"; then
@@ -327,12 +329,13 @@ APR_TRY_COMPILE_NO_WARNING([
327329
#ifdef HAVE_STDLIB_H
328330
#include <stdlib.h>
329331
#endif
332+
#include <stdio.h>
330333
],[
331334
int tmp = getservbyname_r((const char *) 0, (const char *) 0,
332335
(struct servent *) 0, (char *) 0, 0,
333336
(struct servent **) 0);
334337
/* use tmp to suppress the warning */
335-
tmp=0;
338+
puts(tmp ? "non-zero" : "zero");
336339
], ac_cv_getservbyname_r_style=glibc2, ac_cv_getservbyname_r_style=none)
337340
338341
if test "$ac_cv_getservbyname_r_style" = "none"; then
@@ -354,11 +357,12 @@ if test "$ac_cv_getservbyname_r_style" = "none"; then
354357
#ifdef HAVE_STDLIB_H
355358
#include <stdlib.h>
356359
#endif
360+
#include <stdio.h>
357361
],[
358362
struct servent *tmp = getservbyname_r((const char *) 0, (const char *) 0,
359363
(struct servent *) 0, (char *) 0, 0);
360364
/* use tmp to suppress the warning */
361-
tmp=NULL;
365+
puts(tmp ? "non-zero" : "zero");
362366
], ac_cv_getservbyname_r_style=solaris, ac_cv_getservbyname_r_style=none)
363367
fi
364368
@@ -381,11 +385,12 @@ if test "$ac_cv_getservbyname_r_style" = "none"; then
381385
#ifdef HAVE_STDLIB_H
382386
#include <stdlib.h>
383387
#endif
388+
#include <stdio.h>
384389
],[
385390
int tmp = getservbyname_r((const char *) 0, (const char *) 0,
386391
(struct servent *) 0, (struct servent_data *) 0);
387392
/* use tmp to suppress the warning */
388-
tmp=0;
393+
puts(tmp ? "non-zero" : "zero");
389394
], ac_cv_getservbyname_r_style=osf1, ac_cv_getservbyname_r_style=none)
390395
fi
391396
])

build/buildcheck.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ else
1515
echo "buildconf: python version $py_version (ok)"
1616
fi
1717

18-
# autoconf 2.59 or newer
18+
# autoconf 2.61 or newer
1919
ac_version=`${AUTOCONF:-autoconf} --version 2>/dev/null|sed -e 's/^[^0-9]*//;s/[a-z]* *$//;q'`
2020
if test -z "$ac_version"; then
2121
echo "buildconf: autoconf not found."
22-
echo " You need autoconf version 2.59 or newer installed"
22+
echo " You need autoconf version 2.61 or newer installed"
2323
echo " to build APR from SVN."
2424
res=1
2525
else

configure.in

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -156,12 +156,14 @@ if test "x$host_alias" != x; then
156156
APR_CROSS_COMPILING=maybe
157157
elif test "x$build_alias" != "x$host_alias"; then
158158
APR_CROSS_COMPILING=yes
159+
else
160+
APR_CROSS_COMPILING=no
159161
fi
160162
else
161163
APR_CROSS_COMPILING=no
162164
fi
163-
164165
AC_SUBST(APR_CROSS_COMPILING)
166+
AC_MSG_NOTICE([cross-compilation detection: $APR_CROSS_COMPILING])
165167

166168
# Libtool might need this symbol -- it must point to the location of
167169
# the generated libtool script (not necessarily the "top" build dir).
@@ -1831,6 +1833,7 @@ AC_TYPE_UID_T
18311833
AC_CHECK_TYPE(ssize_t, int)
18321834
AC_C_INLINE
18331835
AC_C_CONST
1836+
AC_C_VARARRAYS
18341837
AC_FUNC_SETPGRP
18351838

18361839
APR_CHECK_SOCKLEN_T
@@ -1926,6 +1929,8 @@ else
19261929
AC_ERROR([could not detect a 64-bit integer type])
19271930
fi
19281931

1932+
AC_MSG_NOTICE([for apr_(u)int64_t using $int64_strfn and ${int64_value}/${uint64_value}])
1933+
19291934
# If present, allow the C99 macro INT64_C to override our conversion.
19301935
#
19311936
# HP-UX's ANSI C compiler provides this without any includes, so we
@@ -2107,7 +2112,6 @@ else
21072112
aprlfs=0
21082113
fi
21092114

2110-
AC_MSG_CHECKING([which type to use for apr_off_t])
21112115
if test "${ac_cv_sizeof_off_t}${apr_cv_use_lfs64}" = "4yes"; then
21122116
# LFS is go!
21132117
off_t_fmt='#define APR_OFF_T_FMT APR_INT64_T_FMT'
@@ -2163,7 +2167,7 @@ else
21632167
off_t_strfn='strtoi'
21642168
off_t_size=4
21652169
fi
2166-
AC_MSG_RESULT($off_t_value)
2170+
AC_MSG_NOTICE([for apr_off_t using $off_t_strfn and $off_t_value])
21672171

21682172

21692173
# Regardless of whether _LARGEFILE64_SOURCE is used, on some
@@ -2195,7 +2199,7 @@ case $host in
21952199
fi
21962200
;;
21972201
esac
2198-
AC_MSG_NOTICE([using $ino_t_value for ino_t])
2202+
AC_MSG_NOTICE([for apr_ino_t using $ino_t_value])
21992203

22002204
# Checks for endianness
22012205
AC_C_BIGENDIAN
@@ -2418,18 +2422,6 @@ fi
24182422

24192423
AC_SUBST(have_proc_invoked)
24202424

2421-
AC_MSG_CHECKING(for Variable Length Arrays)
2422-
APR_TRY_COMPILE_NO_WARNING([#include <stdio.h>],
2423-
[
2424-
int foo[argc];
2425-
foo[0] = 0;
2426-
printf("%d\n", foo[0]);
2427-
], vla_msg=yes, vla_msg=no )
2428-
AC_MSG_RESULT([$vla_msg])
2429-
if test "$vla_msg" = "yes"; then
2430-
AC_DEFINE(HAVE_VLA, 1, [Define if C compiler supports VLA])
2431-
fi
2432-
24332425
AC_CACHE_CHECK(struct rlimit,ac_cv_struct_rlimit,[
24342426
AC_TRY_RUN([
24352427
#include <sys/types.h>

docs/doxygen.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,4 @@ EXCLUDE_PATTERNS="*/acconfig.h" \
4141

4242
GENERATE_TAGFILE=docs/dox/apr.tag
4343

44+
DOT_GRAPH_MAX_NODES=99

include/apr_general.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ APR_DECLARE(void) apr_terminate2(void);
239239
/** @} */
240240

241241
/**
242-
* @defgroup apr_random Random Functions
242+
* @defgroup apr_random PRNG Functions
243243
* @{
244244
*/
245245

0 commit comments

Comments
 (0)