Hi Jim,

Does CFLAGS -std=c99 solve your issue? It seems to work here. I'm building
on the Fedora 29, largely frozen end-of-july. Reverting the patch below and
toggling -std=c89 to -std=c99 in configure.in building all but two modules
from trunk is building clean, and results in this command for error
checking;
/usr/lib64/apr-1/build/libtool --silent --mode=compile gcc  -pthread
-std=c99 -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes
-Wmissing-declarations -Wdeclaration-after-statement -Wpointer-arith
-Wformat -Wformat-security -Wunused     -DLINUX -D_REENTRANT -D_GNU_SOURCE
-DAP_DEBUG

Is it reasonable to enforce c99 limitations at this late date? I'm not
suggesting we change the general builds from c89 in the 2.4 branch, but
that is something we might want to consider for trunk, 20 years out.

If we did use the patch below, I suspect we would rather tweak the CPPFLAGS
of only the single module, and not modify the CPPFLAGS of all sources, if
we can avoid that unexpected side-effect.

On Tue, Jan 8, 2019 at 7:12 AM <j...@apache.org> wrote:

> Author: jim
> Date: Tue Jan  8 13:12:34 2019
> New Revision: 1850745
>
> URL: http://svn.apache.org/viewvc?rev=1850745&view=rev
> Log:
> This just got me. I upgraded macOS to Mojave (w/ latest Xcode) and I
> always build w/ maintainer-mode. The problem is that libxml2 will include
> various unicode/*.h files that have C++ type comments, which causes
> building to fail (due to Werror). Work around this.
>
> Modified:
>     httpd/httpd/trunk/modules/filters/config.m4
>
> Modified: httpd/httpd/trunk/modules/filters/config.m4
> URL:
> http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/filters/config.m4?rev=1850745&r1=1850744&r2=1850745&view=diff
>
> ==============================================================================
> --- httpd/httpd/trunk/modules/filters/config.m4 (original)
> +++ httpd/httpd/trunk/modules/filters/config.m4 Tue Jan  8 13:12:34 2019
> @@ -114,6 +114,10 @@ AC_DEFUN([FIND_LIBXML2], [
>      if test -n "${xml2_path}" ; then
>        ac_cv_libxml2=yes
>        XML2_INCLUDES="${xml2_path}"
> +      dnl libxml2 includes unicode/*.h files which uses C++ comments
> +      if test "$GCC" = "yes"; then
> +        APACHE_ADD_GCC_CFLAG([-Wno-error=comment])
> +      fi
>      else
>        ac_cv_libxml2=no
>      fi
>
>
>

Reply via email to