Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build/apr_common.m4: avoid explicit inclusion of '"confdefs.h"' #25

Closed
wants to merge 1 commit into from
Closed

Commits on Jan 15, 2021

  1. build/apr_common.m4: avoid explicit inclusion of '"confdefs.h"'

    The failure is observed on `autoconf-2.69d` (soon to be released
    as `autoconf-2.70`). There `int64_t` detection fails as:
    
    ```
    $ autoreconf && ./configure
    ...
    checking whether int64_t and int use fmt %d... no
    checking whether int64_t and long use fmt %ld... no
    checking whether int64_t and long long use fmt %lld... no
    configure: error: could not determine the string function for int64_t
    ```
    
    This happens because `./configure` always stumbles on warning:
    
    ```
    configure:3350: gcc -c -g -O2 -Werror  conftest.c >&5
    In file included from conftest.c:31:
    confdefs.h:22: error: "__STDC_WANT_IEC_60559_ATTRIBS_EXT__" redefined [-Werror]
       22 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1
          |
    ```
    
    It's triggered by double inclusion of `"confdefs.h"` contents:
    explicitly in `APR_TRY_COMPILE_NO_WARNING` macro and implicitly
    via `AC_LANG_SOURCE` use.
    
    To fix it and avoid having to define `main()` declaration the change
    uses `AC_LANG_PROGRAM` instead.
    
    Tested on both `autoconf-2.69` and `autoconf-2.69d`.
    
    Bug: https://bugs.gentoo.org/738156
    Bug: https://bugs.gentoo.org/750353
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
    Sergei Trofimovich committed Jan 15, 2021
    Configuration menu
    Copy the full SHA
    50c8c92 View commit details
    Browse the repository at this point in the history