On 30. 6. 25 23:53, Graham Leggett wrote:
On 30 Jun 2025, at 09:31, br...@apache.org wrote:

Author: brane
Date: Mon Jun 30 08:31:43 2025
New Revision: 1926869

URL: http://svn.apache.org/viewvc?rev=1926869&view=rev
Log:
In the CMake build, make MockHTTPinC a separats static library and change
flags to use C99 and silence all warnings only for that target.

* test/CMakeLists.txt: Include the MockHTTPinC subdirectory and don't
  fiddle with the CMAKE_C_FLAGS.
 (TEST_ALL_SOURCES): Remove the MockHTTPinC source files.
 (test_all): Depend on an link the mockhttpinc library.

* test/MockHTTPinC/CMakeLists.txt: New. Build the mockhttpinc library.

I'm getting this sudden build failure on RHEL9, looks like some header files are being included in the wrong order if google is to be believed. Do you see anything like this?

[ 88%] Building C object test/MockHTTPinC/CMakeFiles/mockhttpinc.dir/MockHTTP.c.o

In file included from /usr/include/apr-1/apr.h:19,

            from /usr/include/apr-1/apr_pools.h:43,

            from /home/minfrin/src/apache/sandbox/serf/test/MockHTTPinC/MockHTTP_private.h:19,

            from /home/minfrin/src/apache/sandbox/serf/test/MockHTTPinC/MockHTTP.c:16:

/usr/include/apr-1/apr-x86_64.h:632:2: error: #error no decision has been made on APR_PATH_MAX for your platform

632 | #errorno decision has been made on APR_PATH_MAX for your platform

  | ^~~~~


No, I'm not seeing that, and I tested on macOS, Debian 12 and Windows. Looking at the include trace, the headers are included are in the correct order. APR_PATH_MAX should be defined in apr.h, based on PATH_MAX from <limits.h>.

apr-x86_64.h is not an APR header, so I can't even begin to guess what was patched on RHEL, sorry. I can't imagine in which universe it wouldn't have a standard <limits.h> header.

By the way, all I did was restrict the -std=c99 to the MockHTTP sources; before this change, all the tests, including MockHTTP, used C99. So there's really no change in the context of that source file.

-- Brane

Reply via email to